Getting Started

The In-Sight vision system is typically integrated into a factory automation environment, where it is programmed to perform a visual inspection of an object. Programming a vision system involves the following:

  • Teaching the vision system what to look for, based on distinctive"features of interest" (also known as features) in the image.
  • When to take a picture, and how best to illuminate the part.
  • How to communicate the results of its analysis, and the actions to take, based on the results.

In-Sight Vision System Machine Vision Solution

A typical In-Sight solution to a machine vision problem involves the following:

  • An In-Sight vision system, which contains a digital greyscale or color camera to acquire images and an imager to digitize them; a PC processor to run the programmed image analysis; and Input/Output hardware and communication links to report results and send/receive messages from other devices, such as an HMI, PLC or robot.
  • In-Sight Explorer software, which is used to program In-Sight vision systems to perform image analysis and communicate with other devices.
  • A lens that optimizes the feature(s) of interest in the Field of View (FOV).
  • Some form of lighting to enhance the contrast of the features in the image.

Optional components include:

  • An object-sensing synchronizing sensor (usually an optical or magnetic sensor) that triggers the vision system to acquire and process an image.
  • An actuator to reject or sort parts based on the results o f the image analysis.

In this system, the synchronizing sensor indicates when a part or object is in position to be inspected. The synchronizing sensor triggers the In-Sight vision system to take a picture of the part or object as it passes by the vision system. During this phase, a pulse is also typically directed to the lighting mechanism, triggering the lights. The lighting used to illuminate the part or object is designed to highlight the features of interest and obscure or minimize the appearance of features that are not, such as shadows or reflections.

In the process of acquiring the image, the lens of the In-Sight vision system captures the light energy from the FOV (the physical area seen by the In-Sight vision system) and converts it into a digital format – a 2D grid of values called pixels, where each individual pixel corresponds to a location (X,Y coordinate) and a greyscale value (0-255; 0 = pure black and 255 = pure white) that expresses the light intensity at that location.

Note: In-Sight Color vision systems report the color components of the pixel.

Example - Image Coordinates:

Then, the In-Sight vision system processes the image and performs its image analysis – counting, measuring and/or identifying objects, dimensions or other features in the image. Based on the results of the image analysis, the vision system passes or fails the part, sending a signal to the actuators and/or communicating the image analysis results to a networked device.

Example of networked In-Sight vision systems in a factory automation environment:

In-Sight Explorer Development Environments

Analyze the Problem

Build the Job

Test and Deploy

Copyright © 1999 - 2019 | Cognex Corporation | All Rights Reserved.

In-Sight® Explorer Help | 2019 August 02 | Revision: 5.7.3.6


In-Sight Explorer Development Environments

In-Sight Explorer includes two development environments to program and manage In-Sight vision systems: EasyBuilder and Spreadsheet.

EasyBuilder

EasyBuilder features a step-by-step template (in the form of Applications Steps) to break-down the tasks of building machine vision applications, called jobs, for In-Sight vision systems. For more information, see Application Steps.

  • EasyBuilder revolves around an image-centric interface, where the interactive graphics (regions) of Location and Inspection Tools can be moved around in the image and return instantaneous feedback.
  • The Settings Pane in the bottom pane of the interface updates based on the selected step. For more information, see Settings Pane.
  • It also includes a Results Table to monitor tool results and troubleshoot applications. For more information, see Results Table.
  • An integrated Help and Input/Output monitoring provides guidance and useful feedback during application development and deployment. For more information, see Palette: EasyBuilder View.
Note: Please consult the EasyBuilder Help file for more information about using the EasyBuilder development environment.

Spreadsheet

The Spreadsheet is the classic In-Sight Explorer programming environment, which utilizes a semitransparent Spreadsheet overlay to configure In-Sight vision systems for vision tasks.

  • The Spreadsheet provides the most comprehensive set of vision and communication functions, which are located in the Palette. For more information, see Palette: Spreadsheet View.
  • The Palette contains an expandable menu of In-Sight functions and snippets that can be inserted into the spreadsheet with drag-and-drop ease. For more information, see Function Reference and Snippet Dialog.
  • The menus and toolbars provide access to acquire images, insert functions into cells and configure all other aspects of your vision application. For more information, see Toolbars: Spreadsheet View.
Note: Not all In-Sight vision systems can access the Spreadsheet.

EasyBuilder and the Spreadsheet

EasyBuilder facilitates programming In-Sight vision systems without having to directly interact with the Spreadsheet environment. When creating a job in EasyBuilder, a Spreadsheet is automatically being populated with specific In-Sight functions that correspond to the programmed Application Steps. However, the flexibility and comprehensive toolset of the Spreadsheet environment is still accessible, and In-Sight Explorer allows the viewing and programming of jobs in either the EasyBuilder or Spreadsheet environments, by selecting Spreadsheet in the View menu of EasyBuilder, or EasyBuilder in the View menu of Spreadsheet.

Note: Not all In-Sight vision systems may access the Spreadsheet.

The functions and cells inserted into the Spreadsheet may be edited, allowing for customization of exposed parameters in the EasyBuilder interface. Parameters for Location and Inspection Tools may be added, removed or renamed.

Note: Editing EasyBuilder parameters in the Spreadsheet environment requires advanced knowledge of the Spreadsheet programming environment.

EasyBuilder is ideally suited for the following types of machine vision applications:

  • Component assembly verification, utilizing the Presence/Absence and/or Counting Inspection Tools.
  • Product verification, utilizing the Read ID Code, Pattern or Color Identification Inspection Tools.
  • Gauging applications, utilizing the Distance and Angle Measurement Inspection Tools, with the added ability of calibrating the results to real-world measurement units using the calibration features in the Set Up Image step.
  • Vision guided robotics applications, utilizing PatMax Pattern Location Tools and the vendor-specific communication protocols in the Communication step.
  • High-contrast OCV/OCR applications, utilizing the Read Text Identification Inspection Tool, with the added ability to input text strings from external devices.
  • Simple defect detection applications, utilizing the Blob, Brightness, Contrast and Pixel Count Presence/Absence Inspection Tools.

The following types of applications represent areas where accessing the capabilities and functions of the Spreadsheet would be necessary:

  • Applications requiring Image filtering functions, such as advanced defect detection or difficult ID and OCV/OCR. For more information, see Image.
  • ID verification applications, which typically require a significant amount of customization and are ideal for the capabilities of the Spreadsheet. For more information, see ID.
  • Applications involving logic and custom results, such as combining tool results using complex logic or classifying tool results and customizing the output based on the tool results.
  • Applications involving multiple objects, in a random orientation. While Location Tools can locate multiple parts, there is no ability to sort the results.
  • Applications involving an unknown number of objects, which require complex editing in the Spreadsheet.


Analyze the Problem

For machine vision applications, analyzing the problem can be broken down to four pieces:

Image Analysis

Acquire Images

External Interactions

Operator Interactions


Image Analysis

When considering image analysis criteria, first define the inspection. Define what the part's potential pass/fail criteria are; the type of inspection that will be performed (qualifications, such as good/bad judgments, or quantification, such as how much or how many), for example, counting, measuring, presence/absence and/or identification; and the compromises that will need to be made, such as speed versus accuracy.

Note: Pass/Fail criteria may not be subjective. There must be clear classifications for what constitutes a Pass and what is a Fail.

Also think about the following:

  • Will the part be in a fixed location or if it will move around (and if it moves, what type of movement will there be)?
  • How much time will the vision system have to acquire an image of the part?
  • How quickly will the vision system need to communicate its results?

Next, look at the part and identify what will be the features of interest. In machine vision, features of interest typically are one of the following: patterns, blobs, edges, codes/symbols or text. Consider what makes those features "good" or "bad" or gauges the size, shape or quantity. If a good part cannot be readily distinguished from a bad part, it will be extremely difficult to design a proper vision inspection. To help facilitate this part of the process, try listing out all of the criteria that must be met for the part to pass.


Acquire Images

In machine vision applications, without good quality images, no matter how well designed the application, it will not perform well. When considering how to acquire the best image of the part (it must highlights the part's features of interest), first calculate the physical setup that will be required. Determining the proper physical setup of an In-Sight vision system involves calculating the optimal size of the part in the image, the working distance between the vision system and the part, and the optimal Field of View (FOV).

Note: Use the Cognex Lens Advisor to determine the correct lens for your machine vision application.

Next, the most difficult aspect of the problem: designing a lighting and optical solution that best optimizes the features of interest and minimizes shadows.


External Interactions

The In-Sight vision system will typically be incorporated into a factory automation environment, where the vision system must interact with other devices, such as robots or Programmable Logic Controllers (PLC), human operators through Human Machine Interfaces (HMI) and/or FTP file servers. Within this environment:

  • Decide if the vision system will be expected to receive data from an external device, and/or if the vision system will be expected to communicate results of its inspection, which results to send and the actions to take based on those results.
  • Determine if the vision system will communicate via serial (robots), discrete (PLCs) and/or Ethernet communication protocols.
  • Consider if a Cognex Input/Output (I/O) module will be necessary to facilitate extra discrete lines, and the types of signals to use to trigger the vision system to acquire images, inspect the part and communicate results.
  • Consider whether or not inspection images should be stored on an FTP file server.

 | Factory Device | Protocol | Protocol Type
PLCs | Mitsubishi | SLMP | Industrial Ethernet
 |  | CC-Link | Fieldbus
 |  | PLC Function Blocks | Pre-configured device commands and attributes
 | Rockwell | EtherNet/IP | Industrial Ethernet
 |  | DeviceNet | Fieldbus
 |  | AOP | Pre-configured device commands and attributes
 | Siemens | PROFINET | Industrial Ethernet
 |  | PROFIBUS | Fieldbus
 | Other Protocols | MODBUS TCP | Industrial Ethernet
 |  | Modbus | Serial
 |  | ASCII String commands | Serial
 |  | OPC | Industrial Ethernet
 |  | TCP | Industrial Ethernet
 |  | UDP | Industrial Ethernet
FTP Server |  | FTP | FTP Image Transfer
Robots | ABB, Denso, FANUC, Kuka, Mitsubishi, Motoman & Staubli | Pre-configured drivers and ASCII String commands | Serial/Ethernet
 | Adept, Epson, IAI, Kawasaki, Nachi, Yamaha & other Robots | ASCII String commands | Serial/Ethernet


Operator Interactions

Within the factory automation environment, operators are the people responsible for managing and maintaining the equipment within the environment. Most operators will not be responsible for designing and programing the machine vision applications, so considerations need to be made regarding user accessibility.

Think through what type of startup options should be implemented, as well as how to manage the users (user names and user lists must be created, as well as their passwords). The operators will also need an interface with which to interact with the vision system. Here, consider what parameters should be configurable, the level of interaction the operator will be responsible for, and the layout and presentation of the interface, depending on the development environment the job was created in.


Build the Job

Creating a machine vision application, called a "job" in In-Sight nomenclature, involves four steps:

Connect to an In-Sight Vision System

Set up the Inspection Tools

Configure the Results

Run-time Settings


Connect to an In-Sight Vision System

In-Sight Explorer automatically detects any In-Sight vision systems on your local subnet and displays them. The [image] icon represent actual In-Sight vision systems (for example, the In-Sight 7802) while the [image] icon represent In-Sight emulators running on networked PCs. The name of an emulator is the computer's name under Microsoft Windows.

Note: If the job is being built on the emulator, input/output capabilities cannot be developed. Previously acquired images will also need to be loaded.

By default, all In-Sight vision systems are configured to use DHCP network settings. I if your network uses a DHCP server, you can simply plug a new vision system into any active network port and communicate with it. If your network does not use a DHCP server, or if you want to connect the vision system directly to your computer, use the Add Sensor/Device to Network dialog to establish communication with your vision system. For more information, see Add Sensor/Device to Network Dialog.

You must log on to the vision system to program or view them during run-mode operation. To log on to a vision system, you must supply a valid user name and password. New vision systems are shipped with a User List containing three standard accounts: admin, monitor and operator; each of these accounts is configured with a blank password. For more information, see User Access Settings Dialog.

When In-Sight Explorer is launched, the admin user is logged on by default; this startup user can be changed in the Options dialog. To change the current user name and password, click Log On/Off on the System menu; whenever the current user is changed, In-Sight Explorer retains this information and uses it when connecting to other vision systems. For more information, see Access Management Panel.

Connecting to an In-Sight vision system (typically by double-clicking any vision system or emulator from the list of available vision systems or emulators) sends the user name and password to the vision system or emulator and displays the following: its buffered images, settings and jobs; its view which consists of the acquired image; and a status bar.

After connecting to a vision system or emulator, configure the necessary network settings, and then move on to the image acquisition parameters (if connected to a vision system). For more information, see Network Settings Dialog. Here, adjust focus and lighting to optimize features, set acquisition triggers and exposure timing, and, if necessary, calibrate the image from pixels to real-world units.


Set up the Inspection Tools

The In-Sight Vision Tools and EasyBuilder Location and Inspection Tools are used for:

  • Inspection: Presence/Absence, Defect Analysis, Pattern Matching
  • Identification: Colors, Data Codes, Lot Codes, Serial Numbers, Text
  • Measurements: Gauging, Counting, Locating

Based upon the image analysis, select the appropriate tools for your inspection:

  • Blob tools are used when locating splotch-like features, and the feature's size and shape may vary somewhat, from part to part. Blobs can be used in both Inspection and Measurement applications. For more information, see Blob.
  • Color tools are used to identify and match objects based on their color data. Color tools require an In-Sight color vision system, and these tools can be used in Inspection, Identification and Measurement applications. For more information, see Color.
  • Edge tools are used to find either circular, curved or straight edges - distinct discontinuities between pixel greyscale values. Edge tools are typically used in Inspection and Measurement applications. For more information, see Edge.
  • Flaw Detection tools are used to perform advanced pattern matching analysis to verify the presence/absence of defects. These tools are typically used in Inspection applications, while also being used in some Measurement applications. For more information, see Flaw Detection.
  • Histogram tools return data about pixel values, such as their contrast or average greyscale (or color) value. For more information, see Histogram.
  • ID tools are used to identify 1D and 2D codes and symbols in Identification applications. Found codes/symbols can also provide position data for other types of inspections. For more information, see ID.
  • Image tools are used to used to enhance or diminish features in the image, for further image analysis or used by other functions. These tools can be used on their own for Inspection and Measurement applications, or used as input images to other Vision Tools. For more information, see Image.
  • InspectEdge tools are used to perform advanced edge analysis, measuring the location of edges, the location and spacing of edge pairs and the width of edges, to determine if there are defects or gaps in the edges. These tools are used in Inspection and Measurement applications. For more information, see InspectEdge.
  • OCR/OCV tools are used to read and/or verify alphanumeric characters, such as ABC/123. These tools are typically used in Identification applications, and like the ID tools, the found text can also provide position information for other types of inspections. For more information, see OCV/OCR.
  • Pattern Matching is based on area and other geometric criteria. For more information, see Pattern Match.
Tip: When configuring tools, it's best to load several images of the part, so they may be played back and the tools' ranges and thresholds can be adjusted to compensate for the variations. The images should contain the expected range of acceptable variations the part is allowed to exhibit, as well as several of known failure quality.

Color, Flaw Detection, InspectEdge and Pattern tools are typically the slowest, but most accurate, while the Blob, Histogram, ID and OCV/OCR tools are somewhere between, with the Edge tools being the fastest.

Note: The EasyBuilder Location and Inspection Tools are categorized by their application functionality.

Fixtures

If the part will exhibit movement in the image, a fixture, which locates a feature on the part and orients the other vision tools to where they should perform their inspection, will need to be created. The fixture can be based on a pattern, blob or edge feature, depending on the type of movement the part exhibits. In situations where the part moves in only a horizontal or vertical direction, edges may be used to fixture other tools. Where angular orientation is not a requirement, and the shape is roughly the same in each image, blobs may be used. When precise coordinates are required, and the feature may exhibit translation or slight changes in scale or size, patterns are very effective.

Calibration

For Measurement applications, especially, converting the pixel coordinates returned by the vision system into real-world coordinates is very important. In the EasyBuilder development environment, in the Set Up Image step, use the Calibrate Image to Real World Units group box to configure pixel results as real world measurement units. In the Spreadsheet, the Calibration tools are used. For more information, see Calibrate.

Logic

Logic for the job, such as configuring a tool to only function based on the results or another tool or set of tools, can be added through the use of the Math & Logic Tools in the Inspect Part step of the EasyBuilder development environment, and conditional references, cell states and Mathematics Functions in the Spreadsheet development environment. Additional image enhancement and modification tools can also be added to filter and further process the image prior to inspection. For more information, see Cell References - Relative/Absolute, Cell State Dialog and Mathematics Functions.


Configure the Results

Once the inspection tools are in place and returning results, the results need to be put to use, by sharing the results with devices that initiate actions based on the results. In this part of the job development, inputs and outputs between the vision system and external devices are defined. The complexity of the discrete inputs and outputs depends largely on whether or not a Cognex I/O Module is being used, because the In-Sight vision system by itself is limited to the on-board I/O of the vision system (which varies, depending upon the model). The I/O Module offers access to additional discrete I/O lines, in addition to powering the vision system.

For more information, regarding this functionality, please see Input/Output Functions and In-Sight Communications.


Run-time Settings

With the inspection tools in place and the communication of results established, it's time to focus on the final steps of the job development. During this process:

  1. Consider the type of interface and the parameters that will need to be exposed for the operators by building a Custom View (Spreadsheet) or EasyView (EasyBuilder), which can be displayed on a VisionView Interface Panel or another supported HMI. For more information, see Custom View Settings Dialog and EasyView Settings Dialog.
  2. Using the Filmstrip, set up the vision system to record images based on pass/fail criteria for later review. For more information, see Sensor Filmstrip: EasyBuilder View.
  3. Save the job file to the vision system, and backup the job file to a PC. For more information, see Backup Dialog.
  4. Finally, place the vision system Online and test the job before deployment. For more information, see Online/Offline.

Here, you can establish the job's run time:

Run-time = Latency + Acquisition Time + Job Execution + Display Time

  • Latency: The time necessary to trigger the vision system to acquire an image, either internally (up to 250 microseconds) or externally (a few milliseconds). To decrease latency, use the vision system's internal trigger.
  • Acquisition Time: The amount of time given for the exposure and the time to transfer the image to the image processing process. To decrease the acquisition time, lower the exposure time and take a partial image acquisition.
  • Job Execution: The sum of all of the execution times within the job file. To decrease the job execution time, use smaller regions of interest and allow less variation.
  • Display Time: The time used to render the image and graphical overlays. To decrease the display time, disable the Image, Graphics and Overlay display elements in operator interfaces such as a Custom View or an EasyView.


Test and Deploy

Testing the job before deployment involves four steps:

  1. Go Online: At this step, the vision system is placed in its Online state, where it will run the job based on the job's execution order and external interactions.
  2. Test the job: Monitor the results being returned and ensure that proper communication is occurring between external devices. TestRun provides a built-in method to confirm that a machine vision application is operating within expected parameters. TestRun performs tests on the In-Sight vision system and compares the results of those tests against expected values. For more information, see TestRun™.
  3. Fine-tune ranges and limits: During this phase, you may need to place the vision system Offline and adjust the parameters of various tools, as needed. Here again, TestRun provides a built-in method to confirm that a machine vision application is operating within expected parameters.
  4. Deploy: Place the vision system Online and operate it within the factory automation environment.


Spreadsheet View

The main component of In-Sight Explorer's graphical user interface (GUI) is a spreadsheet, an adjustable, semi-transparent overlay that is superimposed onto a video image acquired from an In-Sight vision system.

Note: Right-clicking within the spreadsheet displays a shortcut menu that allows various spreadsheet operations to be performed. For more information, see Right-Click Menu.

In addition to the semi-transparent spreadsheet overlay containing the active job, the Spreadsheet View consists of:

  • The active image from the In-Sight sensor.
  • The status bar, which indicates the current available job size, as the number of available, allocated cells (use the Job Size Limit dialog to modify the value), the Flintstones status and job execution time of the active In-Sight sensor.
  • The title bar indicating the sensor name and file name of the active job.
Note:
  • If you drag and drop or load the job from your PC, the title bar displays "Spreadsheet View" until the job is saved to the sensor. Once the job is saved, the file name is displayed.
  • Shortcuts to images cannot be dragged to Spreadsheet Views or the In-Sight Files pane. Drag the original source image, rather than the shortcut, to the desired location.
  • The number of Spreadsheet Views you can simultaneously display depends on your PC's hardware (CPU speed and memory, primarily). Opening more than 10 windows might exceed memory resources and cause unexpected behavior if the jobs are particularly complex.
  • Not all In-Sight sensors can access the Spreadsheet View.

To display the Spreadsheet View of an In-Sight vision system or emulator, do one of the following:

  • Double-click on the desired vision system/emulator in the In-Sight Network pane; if necessary, click Show Spreadsheet View on the Window menu.
  • Right-click on the sensor/emulator in the In-Sight Network pane and click Show Spreadsheet View from the drop-down menu that appears.
Note: If another user is already logged onto the desired In-Sight sensor/emulator, a warning message will appear. Click Yes to disconnect the other user from the destination system and continue with the logon process. Click No to cancel the logon attempt and return to In-Sight Explorer.


In-Sight Network

The In-Sight Network pane offers a great deal of flexibility when managing multiple In-Sight devices at once. The In-Sight Network pane is a "tree" containing all the In-Sight vision systems, vision sensors and emulators automatically detected on the subnet, as well as any host tables that have been entered manually into the Explorer Host Table dialog. For more information, see Explorer Host Table Setup Dialog.

Display or Hide the In-Sight Network Pane

  • On the View menu, click In-Sight Network (alternately, click the In-Sight Network [image] button on the Explorer toolbar, or press CTRL+SHIFT+1).

In-Sight Network Pane Properties

Note:
  • Double-clicking a device from the In-Sight Network pane opens the EasyBuilder View. A Spreadsheet View is also available for the selected vision system and emulator. You can make the Spreadsheet View the default view from the Job View Panel. For more information, see Job View Panel.
  • If logged onto an In-Sight device with an active view open, and another user logs on to the same device, the device's icon still displays a "logged on" status.
  • The SD Card folder and the RAM Disk folder only display in the In-Sight Files pane. For more information, see In-Sight Files.
  • Filter textbox: Filters the In-Sight devices.
  • Apply button: Creates tokens to filter the In-Sight devices.

  • Name: The host name of the In-Sight device.

    Note:
    • You can configure the host name of an In-Sight vision system or vision sensor in the Network Settings dialog. You can configure the host name of a host table in the Explorer Host Table dialog.
    • In-Sight emulators use Microsoft Windows' local compute name as the host name.

  • Icon: The icon next to each host name indicates the device type and whether or not logged on to the device. The following table summarizes the various In-Sight Network status icons for In-Sight devices:

    Icon

    Device Type

             Description

    In-Sight Micro 1000 Series or In-Sight 8000 Series Vision System

             An In-Sight vision system that has not been logged on to.

    An In-Sight vision system that is logged on to.

    In-Sight 2000 Series Vision Sensor | An In-Sight vision sensor that has not been logged on to.
    An In-Sight vision sensor that is logged on to.
    In-Sight 2000 Mini Series Vision Sensor | An In-Sight vision sensor that has not been logged on to.
    An In-Sight vision sensor that is logged on to.

    In-Sight 5000 Series Vision System

    An In-Sight vision system that has not been logged on to.

    An In-Sight vision system that is logged on to.

    In-Sight 70xx - 74xx Series Vision System | An In-Sight vision system that has not been logged on to.
    An In-Sight vision system that is logged on to.
    IIn-Sight 7000 Gen2 Series Vision System | An In-Sight vision system that has not been logged on to.
    An In-Sight vision system that is logged on to.
    In-Sight 9000 Series Vision System | An In-Sight vision system that has not been logged on to.
    An In-Sight vision system that is logged on to.

    In-Sight Emulator

    An In-Sight emulator that has not been logged onto.

    In-Sight Emulator

    An In-Sight emulator that is logged on to.

Customize Columns

You can customize the In-Sight Network pane by displaying the Model, IP, MAC, Version and/or Web HMI columns. These columns are hidden by default.

Note: The Name column is always displayed and cannot be hidden.

  1. Right-click any column. The Column Chooser menu displays.

  2. Check the checkboxes you want to display.

    • Model: The model type of the In-Sight device.

      Note:
      • If it is a host table, "Host Table Entry" is displayed.
      • If it is an emulator and the Emulation Model is set to Standard, "PCHOST" is displayed. If it is an emulator and Emulation Model is set to a specific In-Sight model, "PC-xxxx" (xxxx = model number) is displayed. For example, if Emulator Model is set to In-Sight 5705, "PC-5705" is displayed. For more information, see Emulation Panel.
    • IP: The IP address of the In-Sight device.
    • MAC: The Media Access Control (MAC) address of the In-Sight device. The MAC address is a hardware address that identifies a specific node of a network. Every In-Sight vision system has a unique MAC address assigned to it, which cannot be changed. For example, 00-d0-24-01-02-03. To locate the MAC address of an In-Sight vision system, look at the serial number label affixed to the vision system. Alternately, you can open the About In-Sight Explorer dialog. For more information, see About In-Sight Explorer Dialog.
    • Version: The firmware version of the In-Sight device. For more information, see Firmware Versions.
    • Web HMI: The Web HMI connection status of the In-Sight device: HTTP, HTTPS or Disabled. For more information, see HMI Settings Dialog.
  3. The selected columns displays.

Network Operations

Right-clicking an In-Sight device from the In-Sight Network pane displays a menu that allows you to perform the following operations:

  • Show EasyBuilder View: Shows the current image from the In-Sight device and the current job in the EasyBuilder graphical user interface. The status bar indicates the Online/Offline status. For more information, see EasyBuilder View.

  • Show Spreadsheet View: Shows the current image from the In-Sight vision system as well as the semi-transparent spreadsheet overlay or Custom View (optional). The status bar indicates the Online/Offline status. Spreadsheet Views for multiple vision systems may be shown simultaneously. For more information, see Spreadsheet Navigator.

    Note: This option is not available on the EasyBuilder-only vision sensors.
  • Show Sensor Status View: The Sensor Status View displays information contained within the memory buffers that make up the Machine Status Stack. For more information, see Sensor Status View.

  • Change Emulator Model: Opens the Emulator Options dialog to select your desired local emulator model from the Model drop-down list. You can filter emulator models by using the Filter box that appears when you expand the drop-down.

    Note:
    • This option only displays when you right-click on your local emulator.
    • You can also change the emulator model by using the Options dialog. For more information on emulator models, see Emulation Panel.

  • Open Web Browser View: The Open Web Browser View opens the default browser to the web-based human-machine interface (HMI) of the selected In-Sight vision system or sensor. For more information, see Open Web Browser View.
  • Paste: Pastes job files that have been copied to the clipboard.
  • Create Report: Generates an .HTML or .XML report that contains job and network configuration details for one or more In-Sight devices(s). For more information, see Create Report Dialog.
  • Backup: Stores an archive of job and configuration data for this device to the Backup directory. For more information, see Backup Dialog.
  • Restore: Retrieves an archive of job and configuration data for this device.

  • Properties: Displays details of the hardware information and network identification, as well as the flash, RAM memory and SD Card configuration.

    Note: The SD Card configuration displays only on the In-Sight vision systems where the SD card is installed.

  • Group or UnGroup: Groups the selected In-Sight devices or ungroups the selected group. For more information refer to Group Operations.

  • Move To: Moves the selected In-Sight device(s) to another Group. For more information refer to Group Operations.

Note:
  • You can drag files from both the In-Sight Files pane and Microsoft Windows Explorer folders to any device within the In-Sight Network pane. This is equivalent to a copy operation. For more information, see In-Sight Files.
  • Performing cut or copy operations from either the In-Sight Files pane or a Microsoft Windows Explorer folder places files on the Windows clipboard. You can paste these files to a device by right-clicking the device and selecting Paste.

Filter Operations Using Tokens

You can filter the In-Sight devices using multiple "tokens."

  1. Type a keyword in the Filter textbox.
  2. Click Apply. The keyword displays as a "token" in the Filter textbox.
  3. Repeat steps 1 and 2 until all the keywords are added.
  4. The filtered In-Sight devices are displayed.
  5. To remove a token from the Filter textbox click "x" on the token.

Group Operations

You can create one or more Groups to organize In-Sight devices.

Create a Group

  1. Select one or more In-Sight devices from the In-Sight Network pane.

    Tip: To select multiple, non-consecutive items, hold down the CTRL key and highlight the items. To select multiple, consecutive items, hold down the SHIFT key and highlight the first item, and then the last item in the pane.
  2. Right-click the selected devices and select Group.
  3. The selected devices are placed in a group called <New Group>.

Rename a Group

  1. Select the group that you want to rename.
  2. Click the text of the group again or press F2.
  3. Type a new name for the group and press Enter on your keyboard, or click outside of the textbox.
  4. The group is now renamed.

Ungroup

  1. Right-click the group that you want to ungroup, and select Ungroup.
  2. The selected group is removed from the In-Sight Network pane and the In-Sight devices in the group are now moved to the In-Sight Sensors node.

Move In-Sight Devices to Another Group

  1. Select the In-Sight device you want to move to another group.

    Tip: You can move multiple In-Sight devices at the same time too.
  2. Right-click the selected In-Sight device(s) and select Move To > desired Group.
  3. The selected In-Sight device(s) are moved to the Group.

Sort Operations Using Columns

You can sort the In-Sight devices in ascending (default) or descending order using the columns.

  1. Click one or more columns that you want to use to sort.

    Note: To select multiple columns hold down the SHIFT key and highlight the Column.
  2. The In-Sight vision devices are now sorted in ascending or descending order.
    • If the arrow is hidden the column is sorted in ascending order.
    • If the arrow points down the column is sorted in ascending order.
    • If the arrow points up the column is sorted in descending order.


In-Sight Files

The In-Sight Files pane can display two different sets of information:

  • Initially, the In-Sight Files pane displays all In-Sight vision systems detected on the network as well as any Explorer Host Table entries. For more information, see Explorer Host Table Setup Dialog.
  • Double-clicking on a device displays the files and any enabled, configured RAM Disk folders and SD Card folders on that device. For more information, see RAM Disk Settings Dialog.

Display/Hide the In-Sight Files Pane

From the View menu, click In-Sight Files.

Note: You may see AAF files (*.aaf) in the In-Sight Files pane. AAF files are audit messages saved to the In-Sight flash memory when the Audit Message Server is unreachable. Once the connection to the Audit Message Server is reestablished, the AAF files are sent one at a time, and deleted upon receipt of the expected response from the Audit Message Server. For more information, see Audit Message Settings Dialog.

Drag-and-Drop Files

A job or image file on an In-Sight vision system can be loaded by dragging it from the In-Sight Files pane onto the spreadsheet. Files can be dragged from both the In-Sight Files pane and Microsoft Windows Explorer folders to any device within the In-Sight Network pane. This is equivalent to a Copy operation.

Note:
  • The vision system's title bar indicates the vision system name and file name of the active job. If you drag-and-drop the job file from your PC, the title bar does not display the job name until the job is saved to the vision system.
  • If drag-and-dropping a job file from the PC, the Sensor Status View displays the Current Job as "Drag And Drop Job" until the job is saved to the vision system.
  • If drag-and-dropping a job file from the In-Sight Files pane, click on the Spreadsheet View's scroll bar and then use the mouse wheel to scroll, the In-Sight Files pane will scroll instead of the Spreadsheet pane. Use the arrows or sliders on the Spreadsheet View to scroll instead of the mouse wheel.

Copy, Delete and Rename

Right-clicking a file from the In-Sight Files pane presents a shortcut menu allowing you to copy, delete and rename files.

Copied jobs can be pasted to other In-Sight vision systems, emulators or SD Cards. Copied images can be pasted as well, but note that for In-Sight vision systems, the pasted file will replace image.bmp and image.jpg as the active image on the destination vision system, rather than retaining the original filename.

Note: image.bmp, image.jpg, image2.bmp and image4.bmp cannot be pasted to an emulator.

Non-Deletable Files

The following In-Sight system files cannot be deleted:

  • hosts.net: Contains In-Sight host table entries. For more information, see Host Table Dialog.
  • image.jpg: The active image.
  • image.bmp: The active image.
  • image2.bmp: ½ high by ½ wide version of the active image (firmware 2.60 and greater).
  • image4.bmp: ¼ high by ¼ wide version of the active image (firmware 2.60 and greater).
  • proc.set: Contains network configuration and vision system settings.

Images cannot be stored as "files" on an In-Sight vision system. If an image file is dragged to a vision system's In-Sight File pane or active view, it will become the active image on that vision system. In-Sight emulators, however, are able to store images with arbitrary file names.

SD Card Folder

If an SD Card is installed to a vision system, the SD Card folder is displayed in the In-Sight File pane. The SD Card supports jobs/images (Save and Open dialog) and cell data (Export/Import Cells dialog, ExportData and ImportData functions).

Note:
  • The SD Card does not support the following dialogs and features: Record/Playback Options and Filmstrip.
  • Use the following path to access a file in the SD Card: SDCARD/filename.type
  • The time that the file is created on the SD card will not be accurate unless the SNTP service is enabled and the SNTP server can acquire the network time. For more information, see Date/Time Settings Dialog.

RAM Disk Folder

If a vision system or emulator has an enabled and configured RAM Disk folder, the RAM folder is displayed in the In-Sight File pane. For more information, see RAM Disk Settings Dialog.


Menu Bar

The following menus are available from the Spreadsheet view:

File Menu

Edit Menu

View Menu

Insert Menu

Format Menu

Image Menu

Sensor Menu

System Menu

Window Menu

Help Menu


File Menu: Spreadsheet View

The File menu allows you to load and save job files and image files, import and export Cell Data (.CXD) files, protect the job and print a hard copy of the active spreadsheet. You can also close In-Sight Explorer from this menu.

Note: The following options of the File menu are available only when a Spreadsheet View is the active window.

  • New Job: Closes the current job and opens a blank spreadsheet. You are prompted to save the active job before the new job is created.

    Note: When a job is saved with the filename New.job in the same directory that stores In-Sight Explorer.exe, this job file becomes the New Job template. Any time New Job is selected, the saved job will load rather than a blank spreadsheet. If New.job uses features of a specific sensor model or firmware revision, it can load with errors when a new job is created on incompatible sensors. Invalid functions will be converted to text strings.
  • Open Job: Loads a job file from an In-Sight sensor or emulator using the Open dialog. After the job is opened, it becomes the active job. For more information, see Save & Open Dialogs.
  • Save Job: Writes the active job to a file using the Save As dialog. If the active job has already been saved, this option will overwrite the existing file with any changes that have been made since the last save; you will not be prompted with a Save dialog. Jobs can be saved to In-Sight sensors or emulators. For more information, see Save & Open Dialogs.
  • Save Job As: Writes the active job to a new file. This option displays the Save As dialog, which prompts you for a filename before saving. Jobs can be saved to In-Sight sensors or emulators. For more information, see Save & Open Dialogs.
  • Snippet: Accesses the Snippet dialog to automate frequently performed tasks by exporting groups of preconfigured cells, saved as a Cell Data (.CXD) file, to the Snippets folder on the PC. The snippet can then be imported into the spreadsheet. Alternately, snippets can be imported by dragging and dropping the snippet directly from the Palette into the spreadsheet. For more information, see Snippet Dialog.
    • Import: Opens the Snippet dialog to import the snippet into the spreadsheet.
    • Export: Opens the Snippet dialog to export the snippet to the Snippets folder on the PC.
  • Import Cells: Provides user-initiated means of importing the data or function of another cell as a .CXD file into the spreadsheet, using the Import Cell dialog. This data file can be loaded from another local or networked sensor's flash memory or RAM Disk, or from an FTP server. For more information, see Import/Export Cells Dialog.
  • Export Cells: Provides user-initiated means of saving the data or function within a cell as a .CXD file, using the Export Cell dialog. This data file can be saved to a local or remote sensor's flash memory, a sensor or emulator's RAM Disk, to an FTP server or the Snippets folder on the local PC. For more information, see Import/Export Cells Dialog.
  • Protect Job: Prevents users from changing, moving or deleting data within a job. This option displays the Protect Job dialog, which prompts you for a password to protect the job. For more information, see Protect Job Dialog.
  • Open Image: Loads an image from an In-Sight sensor or emulator using the Open dialog. Once the image has been opened, it is placed behind the transparent spreadsheet overlay. For more information, see Save & Open Dialogs.

  • Save Image As: Writes the current image to a file. This option displays the Save As dialog, which prompts you for a filename before saving. Images can be saved to In-Sight sensors or emulators. For more information, see Save & Open Dialogs.

    Note: When an image is saved to an In-Sight sensor, it becomes the current image (image.bmp), irrespective of the chosen filename; In-Sight sensors do not support image files with arbitrary names.
  • Page Setup: Displays the Page Setup dialog, which allows you to set the paper size, orientation and margins. For more information, see Page Setup Dialog.
  • Print Preview: Displays the Print Preview window, which allows you to preview the page(s) before printing. For more information, see Print Preview.
  • Print: Displays the Print dialog, which allows you to print the spreadsheet of the active job to a local or network printer. For more information, see Print Dialog.
  • Exit: Closes In-Sight Explorer. If running, the local In-Sight emulator will be shut down with the application.

New Job

Open Job

Save Job

Save Job As

Snippet

Import Cells

Export Cells

Protect Job

Open Image

Save Image As

Page Setup

Print Preview

Print

Exit


Save & Open Dialogs

The Save and Open dialogs are essentially FTP clients that establish a connection either between two In-Sight vision systems. Job and image files can be loaded from remote vision systems, as well as saved to remote vision systems.

Note:
  • In-Sight vision system settings (for example, network configuration) cannot be saved using the Save As dialog. A vision system settings file (proc.set) can only be transferred using standard FTP commands from an In-Sight emulator or other non-In-Sight FTP device on the network.
  • An In-Sight vision system can store over 1024 files, but when viewing the file list from an FTP prompt or Telnet session, only 1024 files are listed and the Save and Open dialogs can only display 1024 files.
  • There are two Working Emulator Directories (C:\ProgramData\Cognex\In-Sight\Emulators\5.x.x and C:\ProgramData\Cognex\In-Sight\Emulators\4.x.x). When the In-Sight emulator is used, depending on the Emulation Model, a different directory will be used for saving or opening jobs/images. For example, when the Emulator Model is set to In-Sight 8405, jobs/image will be saved to the 5.x.x directory. When the emulator Model is set to In-Sight Micro 1400, jobs/images will be saved to the 4.x.x directory. Therefore, if a job is saved to a 4.x.x emulator (e.g. In-Sight Micro 1400 Model) and then the emulator Model is changed to 5.x.x (e.g. Standard Model), when attempting to open the job from the Open dialog, the job will not be listed in the dialog. For more information on the Emulator Model and Emulator versions, see Emulation Panel.

Open a Job

The Open dialog allows you to load a job file into the memory of an In-Sight vision system as the active job.

To open a job file from an In-Sight vision system:

  1. On the File Menu, click Open Job.

  2. Choose the location that contains the desired job file to open. The Look In: drop-down list contains drives on your local PC, network drives, detected In-Sight vision systems and emulators, including RAM Disk (enabled and configured) and SD Card folders on your local subnet, Job Server as well as any devices defined in the Explorer Host Table. To list the available jobs on a vision system, select the vision system from the drop-down list. To choose the RAM Disk or the SD Card folder of an In-Sight vision system or emulator, first click on the In-Sight vision system or emulator that has the desired RAM Disk or SD Card folder, and then double-click the "RAMDisk" or "SDCARD" folder once it appears.

  3. Highlight the desired job and click Open. Alternatively, you can double-click the job file or type in the file name.

    Note:
    • Unless defined within the Explorer Host Table, In-Sight vision systems that are not located on your subnet do not automatically appear within the Look In: drop-down list.
    • The Open dialog is not accessible under any of the following conditions:
      • The active In-Sight vision system is Online.
      • The user's access level is locked.
    • The Open dialog is accessible for a user with protected access only if FTP-Read privileges are granted to that particular user within the user list.
    • In-Sight vision system settings cannot be loaded from the Open dialog. A vision system settings file (proc.set) can only be transferred using standard FTP commands from an In-Sight emulator or another non-In-Sight FTP device on the network.

    • The Job Server location only appears when the Job Server is enabled using the Job Server Settings dialog.

    • Job Server is not supported on the In-Sight 2000 series vision sensor.
    • Right-clicking a file from the dialog allows you to copy, delete and rename files. Copied jobs can be pasted to other In-Sight vision systems, emulators or SD Cards.

Save a Job

The Save As dialog stores a job file into flash memory on an In-Sight vision system. When the destination is an In-Sight emulator, the job is saved to a file on the PC's hard disk.

To save a job file on an In-Sight vision system:

  1. On the File menu, click Save Job.

  2. Choose the location where you want to save the file. The Look In: drop-down list contains drives on your local PC, network drives, detected In-Sight vision systems and emulators, including RAM Disk (enabled and configured) and SD Card folders on your local subnet, Job Server as well as any devices defined in the Explorer Host Table. To list the available jobs on a vision system, select the vision system from the drop-down list. To choose the RAM Disk or the SD Card folder of an In-Sight vision system or emulator, first click on the In-Sight vision system or emulator that has the desired RAM Disk or SD Card folder, and then double-click the "RAMDisk" or "SDCARD" folder once it appears.

  3. To save the active job as a new file, enter a name inside the File name: text box and click Save. To replace an existing file, select that file from the list and click Save.

    Note:
    • If you are saving the file for the first time, you will be asked to specify a file name. When naming files, avoid using the backslash character ("\") because files with a backslash character in their name cannot be copied or deleted without first renaming the file and removing the backslash character; file names with a backslash will also cause an error during a restore operation.
    • A file Name can contain spaces.
    • A file Name cannot contain any of the following characters: / : , ; * ? " < > | %
    • Do not cycle power on the vision system while a job is being saved. If power is interrupted while the file is being saved, the file must be saved again.
    • Depending on the size of the job or the connection speed of the device the job is being saved to, some jobs may take longer to save than others.
    • To save a copy of the file or select a different location to save the file, select Save Job As from the File Menu.
    • Job file path names can contain a maximum of 255 characters. The job file path name refers to all of the characters from the root directory through the file name and file extension. If you will be using Native Mode commands, job slots that are pre-pended to the filename have to be factored into the total number of characters.
    • Unless defined within the Explorer Host Table, In-Sight vision systems that are not located on your subnet do not automatically appear within the Look In: drop-down list.
    • The Save As dialog is not accessible under either of the following conditions:

      • The active In-Sight vision system is Online. However, if the Allow Online Job Save checkbox on the User dialog is enabled, users with Full or Protected access are allowed to access the Save As dialog.

      • The user's access level is locked.

    • The Save As dialog is accessible for a user with protected access only if FTP-Write privileges are granted to that particular user within the user list.
    • Beginning with In-Sight Explorer 4.4.1, if a job has been protected, a drop-down menu option, Encryption, will become enabled. There are two options: Fast (default) and Legacy. The Fast option reduces job-related delays, especially with large job files; the Legacy option is used for jobs that must be compatible with In-Sight vision systems running 4.4.0 or earlier. The Encryption drop-down is set to the current encryption option used by the job.

    • The Job Server location only appears when the Job Server is enabled using the Job Server Settings dialog.

    • Job Server is not supported on the In-Sight 2000 series vision sensor.
    • Right-clicking a file from the dialog allows you to copy, delete and rename files. Copied jobs can be pasted to other In-Sight vision systems, emulators or SD Cards.

Open an Image

The Open dialog also allows you to load a standard .BMP or .JPG file onto an In-Sight vision system; the image becomes the active image on the destination vision system and replaces image.bmp on the In-Sight file system.

To load an image file as the active image on an In-Sight vision system:

  1. On the File menu, click Open Image.

  2. Choose the location that contains the desired image file to open. Choose the location that contains the desired image file to open. The Look In: drop-down list contains drives on your local PC, network drives, detected In-Sight vision systems and emulators (including SD Card folders) on your local subnet, as well as any devices defined in the Explorer Host Table. To choose the SD Card folder of an In-Sight vision system, first click on the In-Sight vision system that has the desired SD Card folder, and then double-click the "SDCARD" folder once it appears.

  3. Highlight the desired image and click Open. Alternatively, you can double-click an image file or type in the file name.

    Note:
    • The Open dialog is not accessible under either of the following conditions:
      • The active In-Sight vision system is Online.
      • The user's access level is locked.
    • The Open dialog is accessible for a user with protected access only if FTP-Read privileges are granted to that particular user within the User List.
    • In-Sight vision systems (except color vision systems) can output the last acquired image as a low-resolution image. Using the get [File Name] FTP command from a separate FTP connection, low-resolution images are available as image2.bmp (½ high by ½ wide) or image4.bmp (¼ high by ¼ wide). For example, from the FTP command line type, "get image2.bmp”.

Save an Image

The Save As dialog allows you to store the active image from an In-Sight vision system for later retrieval. Images may be saved in either bitmap (*.BMP) or JPEG (*.JPG) format onto any In-Sight vision system or emulator.

Note: Saving any image to an In-Sight vision system will replace image.bmp on that vision system, which becomes the active image. Alternate file names for images are not supported on In-Sight vision systems. On In-Sight emulators, however, alternate image file names are permitted; image storage space depends on the PC's hard drive capacity.

To save an image file on an In-Sight vision system:

  1. On the File menu, click Save Image As.

  2. Choose the In-Sight vision system on which you want to save the image. Choose the location that contains the desired image file to open. The Look In: drop-down list contains drives on your local PC, network drives, detected In-Sight vision systems and emulators (including SD Card folders) on your local subnet, as well as any devices defined in the Explorer Host Table. To choose the SD Card folder of an In-Sight vision system, first click on the In-Sight vision system that has the desired SD Card folder, and then double-click the "SDCARD" folder once it appears.

  3. To save the image as a new file, enter a name inside the File name: text box and click Save. To replace an existing file, select that file from the list and click Save.

    Note:
    • Image file names can contain a maximum of 251 characters (excluding the .BMP or .JPG extension).
    • A file Name cannot contain any of the following characters: / : , ; * ? " < > | %
    • To save images automatically while running in Online mode, insert a WriteImageFTP function into the spreadsheet.
    • The Save As dialog is not accessible under any of the following conditions:
      • The active In-Sight vision system is Online.
      • The user's access level is locked.
    • The Save As dialog is accessible for a user with protected access only if FTP-Write privileges are granted to that particular user within the User List.


Snippet Dialog

The Snippet dialog allows you to automate frequently performed spreadsheet tasks by exporting groups of pre-configured cells, saved as a Cell Data (.CXD) file, to the Snippets folder on the PC. The snippet is then imported into the spreadsheet. Alternately, snippets can be imported by dragging-and-dropping the snippet directly from the Tool Palette into the spreadsheet.

Note:
  • Snippets stored in the Snippets folder on the PC automatically populate in the Palette.
  • Snippets cannot be exported/imported to the PC using the ExportData/ImportData function.

Export Snippets

  1. Select the cell(s) whose data you would like to export.

  2. From the File menu, click Snippet > Export, or alternately, right-click on the cell(s) whose data you would like to export and select Snippet > Export from the shortcut menu.

  3. Choose the location where you want to save the exported snippet.

  4. To save the active cell(s) as a new file, enter a name inside the File name: text box and click Save. To replace an existing file, select that file from the list and click Save (this will overwrite any data contained in the file). In-Sight Explorer automatically appends the .CXD file extension to all exported cells.

    Note: Beginning with In-Sight Explorer 4.4.1, if a job has been protected, a drop-down menu option, Encryption, will become enabled. There are two options: Fast (default) and Legacy. The Fast option reduces job-related delays, especially with large job files; the Legacy option is used for jobs that must be compatible with In-Sight vision systems running 4.4.0 or earlier. The Encryption drop-down is set to the current encryption option used by the job.

Import Snippets

  1. Select an empty cell.

  2. From the File menu, click Snippet > Import, or alternately, right-click on the cell and select Snippet > Import from the shortcut menu.

  3. Choose the location that contains the snippet to open.
  4. Highlight the desired file and click Open. Alternately, you can double-click the snippet file or type in the file name.


Import/Export Cells Dialog

The Export Cells dialog allows spreadsheet cell data to be exported to a Cell Data (.CXD) file that can be stored:

  • On a central server via FTP.
  • On a local or remote In-Sight vision system or emulator.
  • In the RAMDisk folder of a local or remote In-Sight vision system or emulator.
  • In the SD Card folder of a local or remote In-Sight vision system.
  • In the Snippets folder on the PC.

The Import Cells dialog allows the data within the .CXD file to be imported into the spreadsheet from:

  • A central server via FTP.
  • A local or remote In-Sight vision system or emulator.
  • The RAMDisk folder of a local or remote In-Sight vision system or emulator.
  • In the SD Card folder of a local or remote In-Sight vision system.
  • The Snippets folder on the PC.

The Export/Import Cells dialog can export and import multiple cells, containing any cell data type, and the act of exporting and importing the cell is initiated by the user. When Export Cells/Import Cells dialog is used to import cell data, the imported data is editable in the spreadsheet.

Exporting Cells

  1. Select the cell(s) whose data you would like to export.

  2. From the File menu, click Export Cells…

  3. Choose the location where you want to save the exported cell(s). The Look in: drop-down list contains all local drives, network drives, detected In-Sight vision systems, emulators, RAMDisk and SD Card folders on your local subnet, as well as any devices defined in the Explorer Host Table.

    Note: CXD files that are exported to the Snippets folder automatically populate in the Palette.
  4. To save the active cell(s) as a new file, enter a name inside the File name: text box and click Save. To replace an existing file, select that file from the list and click Save (this will overwrite any data contained in the file). In-Sight Explorer automatically appends the .CXD file extension to all exported cells.

Importing Cells

  1. Select an empty cell.

  2. From the File menu, click Import Cells…

  3. Choose the location that contains the .CXD file to open. The Look in: drop-down list contains all local drives, network drives, detected In-Sight vision systems, emulators, RAMDisk and SD Card folders on your local subnet, as well as any devices defined in the Explorer Host Table. To list the available .CXD files on a vision system, select the vision system from the drop-down list.
  4. Highlight the desired file and click Open. Alternately, you can double-click the .CXD file or type in the file name.


Protect Job Dialog

The Protect Job dialog prevents the modification of certain portions of the job. This can be useful if, for example, you create a job with cells that must remain unchanged for the job to function correctly, but allow the rest of the job to be customized. A job is protected with a user-supplied password (which can remain blank); the password is required to un-protect the job.

When the job is protected, formulas within any locked cell cannot be modified, but the formatting of the locked cells can still be modified (font, color, etc.). The formula of a locked cell remains visible, but grayed out, in the formula bar and the Spreadsheet View's status bar, when the mouse pointer is resting on the locked cell. Menu items and toolbar buttons that are invalid for locked cells will be disabled when any locked cell is selected. Values within a formula of a locked cell can be modified using Edit functions. For example, an integer value can still be changed using the EditInt function. When a job is protected, a small lock icon appears in the upper-left corner of the sheet.

The following actions will be disabled for any cells that are locked when the Job is protected:

  • Clear All
  • Clear Contents
  • Cut
  • Delete Cells, Rows Or Columns
  • Edit Cell Expressions (from either the Formula Bar or Property Sheet)
  • Edit Cell Graphics
  • Edit Cell State
  • Insert Absolute and Relative references
  • Insert, delete or modify a symbolic tag
  • Insert Function
  • Paste

Also, the following actions will be disabled when the job is protected:

  • Insert Cells, Rows or Columns

Protect the Job

  1. On the File Menu, click Protect Job....

    Note: If you click OK, the job will be protected even if no password is entered.
  2. Enter a password then click OK.

  3. Re-enter the password for verification and click OK.

    If the confirmation password is different from the original password, the verification will fail and the following dialog will appear:

    If the verification fails, you will need to enter, then verify the password.


Page Setup Dialog

The Page Setup dialog allows you to specify page settings that will be used when printing.

  1. From the File Menu, click Page Setup....

  2. Specify the appropriate settings.
    • Paper: Enter the desired size and source of paper type. These two drop-down lists are auto-populated based on the printer that is currently selected in the Print dialog.
    • Orientation: Enter the desired orientation, either Portrait or Landscape.
    • Margin (inches): Enter the desired margins.


Print Preview

The Print Preview window allows you to preview the pages before printing. To display the Print Preview window, click Print Previewfrom the File Menu.

From the Print Preview window, you can print all pages, zoom using preset percentages, select the number of pages to view at one time and select a specific page to view. If cells are selected in the Spreadsheet View, only those cells will be displayed and printed. If no cells are selected, all cells containing data or formulas will be viewed and printed.


Print Dialog

The Print dialog allows you to select a specific printer and print data.

  1. On the File Menu, click Print or press CTRL+P.

  2. Select a printer from the Name drop-down list. Information about the selected printer is also displayed.

  3. Specify the Print Range.

    Note:
    • If you choose Pages, you must also enter the page numbers you want.
    • If you choose Selection, only cells that are highlighted will be printed.
  4. Specifies the number of Copies to be printed. If Collate is selected, a complete copy of the document is printed before the first page of the next copy is printed.
Note:
  • The size of the printed data is based on the percentage selected in the Sheet Zoom dialog.
  • To add a new printer to the list of printers, select Printer... from the Page Setup dialog.
  • When printing a Custom View or user-created dialog, the printout will automatically be reduced to fit the view on a single page.
  • Some older printer drivers may not print correctly. If this problem is encountered, try updating the printer driver from the manufacturer of the printer. If after updating the driver the problem persists, the printer may not support all of the features that In-Sight Explorer requires for printing. As an alternative, you can copy the visible portion of the screen to the clipboard (by pressing CTRL+SHIFT+C or ALT+PRINTSCREEN), paste it to another application that supports images, and print it from that application.


Edit Menu: Spreadsheet View

The Edit menu contains functionality to manipulate spreadsheet cell data, cell states, files and images. You can also create a new Custom View or modify the parameters of an existing Custom View.

Note: The following options of the Edit menu are available only when a Spreadsheet View is the active window.
  • Undo: Reverses the last action of the following:
    • An edit to a cell - cutting, copying, pasting or deleting.
    • An edit to the spreadsheet - adding, deleting or inserting rows/columns; adjusting the height or width of rows/columns; hiding/unhiding rows/columns.
    • An expression change - removing Absolute/Relative references or functions; reversing all the edits made during a dialog; Property Sheet or Interactive Graphics Mode session.
    • Actions within Interactive Graphics Mode sessions. For more information, see Interactive Graphics Mode.

  • Redo: Reverses the last action of the Undo command.

    Note: The Undo and Redo actions do not work on individual actions within a dialog or Property Sheet. Once a dialog or Property Sheet is accepted and closed, clicking the Undo button will reverse all the edits made during the entire session. For more information, see Property Sheet.

  • Cut: Removes content from any selected cell(s) and places a copy of the data into memory. Cut is often used (in conjunction with Paste) to "move" cell data.

    Note: If you cut data from one vision system's Spreadsheet View, you cannot paste it to a different vision system's Spreadsheet View; the data must be pasted into the same Spreadsheet View from which it was cut. Note that the clipboard data will be lost if a new job is loaded onto the active vision system or if the vision system is restarted. Use Copy and Paste instead of Cut and Paste when working among different vision systems.
  • Copy: Stores contents from selected cell(s) into memory for duplication into other cells within the spreadsheet; the original content remains intact. From the In-Sight Files pane, clicking Copy will place any highlighted file(s) onto the Windows clipboard for pasting to a destination vision system.

  • Paste: Writes cut or copied data from memory to the spreadsheet, relative to the active cell. Writes files to a destination vision system or any Microsoft Windows Explorer folder (including the Desktop).

    Note: When an image file is pasted toa vision system, that file becomes the active image and is represented by image.bmp. vision systems do not store images other than the active image; however, In-Sight emulators can store any number of image files (limited only by the PC's hard disk capacity).
  • Clear: Removes data, formatting, content(s), comments and symbolic tags from a cell.
    • All: Removes all contents and formatting, including comments and symbolic tags, from selected cells.
    • Formats: Removes only the formatting from your selection; the content and comments are unchanged.
    • Contents: Removes the cell contents (data and formulas) from selected cells without affecting cell formats or comments.
    • Comments: Removes only the comments attached to selected cells; cell contents and formats are unchanged. For more information, see Comment Dialog.
    • Symbolic Tag: Removes only the symbolic tags attached to selected cells; cell contents and formats are unchanged. For more information, see Symbolic Tag Editor.

  • Delete: Depending on which window is active, Delete can be used to remove files or cells from the spreadsheet. When the In-Sight Files pane is the active window, Delete can remove certain files. When the Spreadsheet View is the active window and the spreadsheet is visible, Delete is used to remove a cell(s) from the spreadsheet, relative to the currently selected cell(s) via the Delete Cells dialog. At least one cell must be highlighted before this option is available. The deleted cell(s) can be specified to shift the existing cell(s) right or down, or to delete a whole column or row of cells. For more information, see Delete Cells Dialog.

    Note: Cell A0 cannot be deleted from the spreadsheet. Also, certain files cannot be cut or deleted froma vision system. For more information, see In-Sight Files.
  • Find: Searches the spreadsheet for a text string or numeric value that you specify, and selects the first cell that contains that text or numeric value, using the parameters in the Find dialog. The search may be refined by specifying whether the text string or numeric value is located in a row, column, formula, value or comment, case sensitivity, and whether or not an entire cell must be located. For more information, see Find Dialog.
  • Go To: Allows you to jump directly to a specific cell and makes that cell the active cell via the Go To dialog. For more information, see Go To Dialog.
  • Cell Graphics: Invokes Interactive Graphics Mode if the function within the active cell has an interactive graphic associated with it; otherwise, this menu option is disabled. For more information, see Interactive Graphics Mode.
  • Maximize Cell Region: Resizes the region cell graphic equal to the image region in the referenced Image data structure. Cell A0 is the default image source. If the function within the active cell does not have a region cell graphic associated with it, this menu option is disabled.
  • Cell State: Allows you to enable or disable the selected cell(s) either explicitly or conditionally via the Cell State dialog; this determines whether or not to execute the formula(s) in the selected cell(s) on each acquisition cycle. For more information, see Cell State Dialog.
  • Custom View Settings: Defines the properties of the Custom View via the Custom View Settings dialog. If more than one cell is selected, then the selected range will be used as the new Custom View cell range. For more information, see Custom View Settings Dialog.
  • EasyView Settings: Opens the EasyView Settings dialog to customize how data is displayed on VisionView. For more information, see EasyView Settings Dialog.
  • HMI View Selection: Opens the HMI View Selection dialog to specify the Run Mode views that are visible to the user from the HMI application and the order of the views when you click the Switch View button in the HMI application. For more information, see HMI Settings Dialog.

Undo

Redo

Cut

Copy

Paste

Clear

Delete

Find

Go To

Cell Graphic

Maximize Cell Region

Cell State

Custom View Settings

EasyView Settings

HMI View Selection


Delete Cells Dialog

The Delete Cells dialog is used to remove a cell, a range of cells, a row or column of the spreadsheet.

Note: If your spreadsheet was created in EasyBuilder View, you will not be able to use the Delete Cells dialog. To use Delete, first go to the File menu and click Unprotect Job.

  1. Click a cell or a range of cells in which you would like to remove a cell, a range of cells, a row or column.

  2. On the Edit menu, click Delete.

  3. Select the appropriate delete action:
    • Shift cells left: Removes the selected cell(s) and shifts the remaining cells to the left. Select the same number of cells as you want to remove.
    • Shift cells up: Removes the selected cell(s) and shifts the remaining cells up. Select the same number of cells as you want to remove.
    • Entire row: Removes an entire row of cells; click a cell in the row that you want removed. For example, to delete row 5, click a cell in row 5.
    • Entire column: Removes an entire column of cells; click a cell in the column that you want to remove. For example, to delete column B, click a cell in column B.
  4. Click OK to delete the cell(s), row or column.


Find Dialog

The Find dialog is used to locate a text string or numeric value in the spreadsheet.

  1. To display the Find dialog, click Findfrom the Edit menu.

  2. Enter text or a numeric value in the Find what bar and click the Find Next button to begin the search.

    Note: For the Find dialog to be enabled, the sensor must be Offline, not in Live Video mode, and the spreadsheet overlay must be visible.

Find Dialog Controls

  • Find what: Use this box to enter the text or numeric value that will define your search. The drop-down menu can be used to recall past searches. If no text or numeric value is entered, In-Sight Explorer will find the next cell without a formula, value or comment.
  • Search: Determines the order of the search, either by rows or columns.
  • Look in: Determines where the search will be conducted, either in Formulas, Values or Comments.
  • Match case: Determines whether or not the search is case-sensitive. Check the box to enable a case-sensitive search.
  • Find entire cells only: Determines whether or not the search parameter must locate an entire string or a substring. Check the box to enable a search specified on locating an entire string.
  • Find Next: Press this button to initiate a search, and press it again to find the next repeated instance of your search criteria. Once all of the matching cells have been found, pressing Find Next will return you to the first instance of your search criteria.
  • Close: Press this button to exit the Find dialog.


Go To Dialog

The Go To dialog is used to locate a specific cell in the spreadsheet and make that cell the active cell. If the cell to be found is outside the visible area of the spreadsheet, the spreadsheet will automatically scroll to the specified cell.

  1. To display the Go To dialog, click Go To from the Edit menu.

    Note: In order for the Go To dialog to be enabled, the sensor must be Offline and not in Live Video, and the spreadsheet overlay must be visible.

  2. In the Go To text box, enter the cell to jump to and make active. Only one cell may be entered.
  3. Click OK to initiate the search.


Interactive Graphics Mode

The parameters for many In-Sight functions, particularly Vision Tool functions, can be configured by adjusting a graphic on top of the image. For more information, see Vision Tools.

  • An interactive graphic can be used to easily set the size, position, and rotation for a region of interest, or for training a model region.
  • You can adjust an interactive graphic from any spreadsheet cell that contains a function with a corresponding graphic, as well as from any parameter's value with a corresponding graphic on a property sheet. For more information, see Property Sheet.
  • Interactive graphics mode can be accessed in either standard view or Custom View of the spreadsheet, as permitted by the user's access level. For more information, see Custom View Settings Dialog and User Access Settings Dialog.

Use Interactive Graphics Mode

  1. Select a spreadsheet cell or property sheet value with an associated interactive graphic (the Edit Cell Graphic [image] icons will appear grayed out when their corresponding functions are not available in the current context).

  2. There are four methods for entering Interactive Graphics Mode:

    • Press F9.
    • Click the Edit Cell Graphic [image] button on the Job Edit toolbar.
    • From the property sheet, click the Edit Cell Graphic [image] button on the property sheet's toolbar.
    • Right-click and select Cells Graphics... from the shortcut menu. For more information, see Right-Click Menu.
  3. The semitransparent spreadsheet overlay or property sheet will disappear, and the interactive graphic will be displayed on top of the image. There are six types of interactive graphics modes: annulus, regions, circles, crosses, points, and lines. The type of Interactive Graphics Mode icon displayed in the interactive graphic depends on the type of input required by the cell or value:

    • Annulus:

      Move

      Repositions the annulus on the image. The pixel coordinates of the center point of the annulus are displayed. When using the mouse, the pixel coordinates are displayed in the status bar.

      Action Keyboard Mouse

      Move left

      LEFT ARROW

      Click inside the annulus and drag leftward.

      Move right

      RIGHT ARROW

      Click inside the annulus and drag rightward.

      Move up

      UP ARROW

      Click inside the annulus and drag upward.

      Move down

      DOWN ARROW

      Click inside the annulus and drag downward.

      Cycle to Resize mode

      F9

      N/A

      Change annulus color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

              On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

              On the Standard toolbar, click the Redo [image] button.

      Resize

      Increases or decreases the inner or outer radius of the annulus from the center. The inner radius (arrow right) and outer radius (arrow down) are indicated, in pixels. When using the mouse, the inner radius and outer radius values are displayed in the status bar.

      Action Keyboard Mouse

      Decrease inner radius

      UP ARROW

      Click the edge of the inner circle and drag toward the center.

      Increase inner radius

      DOWN ARROW

      Click the edge of the inner circle and drag away from the center.

      Decrease outer radius

      LEFT ARROW

      Click the edge of the outer circle and drag toward the center.

      Increase outer radius

      RIGHT ARROW

      Click the edge of the outer circle and drag away from the center.

      Cycle to Move mode

      F9

      N/A

      Change annulus color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

    • Regions: Regions behave in three different ways, depending on the value of the Bend parameter:
      • Bend = 0: The region behaves as a Rectangle.
      • 0 < Bend < 120: The region behaves as an Arc Segment.

      • Bend >= 120: The region behaves as a Circle.

      These different behaviors are evident when working in Resize mode only:

      Move

      Repositions the region on the image. The pixel coordinates of the center of the region are displayed. When using the mouse, the pixel coordinates are displayed in the status bar.

      Action Keyboard Mouse

      Move left

      LEFT ARROW

      Click within the region and drag leftward.

      Move right

      RIGHT ARROW

      Click within the region and drag rightward.

      Move up

      UP ARROW

      Click within the region and drag upward.

      Move down

      DOWN ARROW

      Click within the region and drag downward.

      Cycle to Resize mode

      F9

      N/A

      Change region color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

      Resize

      (Rectangle)

      If the Bend parameter of the region is set to 0, the region behaves like a rectangle. The height and width of the rectangle (in pixels) are displayed near its center point. When using the mouse, the height and width of the rectangle (in pixels) are displayed in the status bar. The height and width can be altered by the following methods:

      Action Keyboard Mouse

      Reduce width

      LEFT ARROW

      Click and drag any endpoint boundary [image] inward.

      Increase width

      RIGHT ARROW

      Click and drag any endpoint boundary [image] outward.

      Reduce height

      UP ARROW

      Click and drag any endpoint boundary [image] inward.

      Increase height

      DOWN ARROW

      Click and drag any endpoint boundary [image] outward.

      Cycle to Rotate mode

      F9

      N/A

      Change region color

      SHIFT+F9

      N/A

      Maximize Cell Region

      CTRL+SHIFT+M

              On the Job Edit toolbar, click the Maximize Cell Region [image] button.

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

      Resize

      (Arc Segment)

      If the Bend parameter of the region is between 0 and 120 (non-inclusive), the region behaves like an arc segment. In this case, the Wide parameter (width) refers to the length of the midpoint arc segment along the Y-axis, and the High parameter (height) refers to the length of the segment along the X-axis. The height and width of the arc-shaped region (in pixels) are displayed near its center point. When using the mouse, the height and width of the arc-shaped region are displayed in the status bar. The height and width can be altered by the following methods:

      Action | Keyboard | Mouse

      Reduce Y-axis arc length

              LEFT ARROW Click and drag any endpoint boundary [image] inward.

      Increase Y-axis arc length

              RIGHT ARROW Click and drag any endpoint boundary [image] outward.

      Reduce X-axis segment length

              UP ARROW Click and drag any endpoint boundary [image] inward.

      Increase X-axis segment length

              DOWN ARROW Click and drag any endpoint boundary [image] outward.

      Cycle to Rotate mode

              F9 N/A

      Change region color

              SHIFT+F9 N/A
      Maximize Cell Region | CTRL+SHIFT+M | On the Job Edit toolbar, click the Maximize Cell Region [image] button.

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click tthe Redo [image] button.

      Resize

      (Circle)

      If the Bend parameter of the region is greater than or equal to 120, the region behaves like a circle. In circle mode, you cannot resize both the inner and outer arc lengths simultaneously by using the mouse to drag endpoints; this eases the process of forming a region to a circular object.

      In circle mode, the Wide parameter (width) refers to the length of the midpoint arc segment along the Y-axis, and the High parameter (height) refers to the length of the segment along the X-axis. The height and width of the arc-shaped region (in pixels) are displayed near its center point. When using the mouse, the height and width of the arc-shaped region are displayed in the status bar. The height and width can be altered by the following methods:

      Action Keyboard Mouse

      Reduce Y-axis arc lengths (width)

      LEFT ARROW

      Click and drag any endpoint boundary [image] inward.

      Increase Y-axis arc lengths (width)

      RIGHT ARROW

      Click and drag any endpoint boundary [image] outward.

      Reduce X-axis segment length (height)

      UP ARROW

      Click and drag any endpoint boundary [image] inward.

      Increase X-axis segment length (height)

      DOWN ARROW

      Click and drag any endpoint boundary [image] outward.

      Cycle to Rotate mode

      F9

      N/A

      Change region color

      SHIFT+F9

      N/A

      Maximize Cell Region

      CTRL+SHIFT+M

      On the Job Edit toolbar, click the Maximize Cell Region [image] button.

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

      Rotate

      Adjusts the clockwise or counterclockwise rotation of the region. The angle of rotation (in degrees) is displayed in the center of the region (0 to 360). When using the mouse, the angle of rotation is displayed in the status bar.

      Action Keyboard Mouse

      Rotate clockwise

      RIGHT ARROW

      Click and drag the rotation [image] icon in a clockwise motion.

      Rotate counter-clockwise

      LEFT ARROW

      Click and drag the rotation [image] icon in a counter-clockwise motion.

      Cycle to Curve mode

      F9

      N/A

      Change region color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

      Bend

      Curves the region upward or downward. Used for creating arc-shaped and annular (circle-shaped) regions.

      Action Keyboard Mouse

      Bend up

      LEFT ARROW

      Click and drag the curve [image] icon upward.

      Bend down

      RIGHT ARROW

      Click and drag the curve [image] icon downward.

      Cycle to Move mode

      F9

      N/A

      Change region color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

    • Crosses:

      Move

      Repositions the cross on the image. The pixel coordinates of the center-point of the cross are displayed. When using the mouse, the pixel coordinates are displayed in the status bar.

      Action Keyboard Mouse

      Move left

      LEFT ARROW

      Click the cross and drag leftward.

      Move right

      RIGHT ARROW

      Click the cross and drag rightward.

      Move up

      UP ARROW

      Click the cross and drag upward.

      Move down

      DOWN ARROW

      Click the cross and drag downward.

      Cycle to Resize mode

      F9

      N/A

      Change cross color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

      Resize

      Increases or decreases the length of the vertical and horizontal axes of the cross. The length of each axis is shown (in pixels). When using the mouse, the length is displayed in the status bar.

      Action Keyboard Mouse

      Decrease vertical axis

      UP ARROW

      Click the vertical arrowhead and drag toward the center point of the cross.

      Increase vertical axis

      DOWN ARROW

      Click the vertical arrowhead and drag away from the center point of the cross.

      Decrease horizontal axis

      LEFT ARROW

      Click the horizontal arrowhead and drag toward the center point of the cross.

      Increase horizontal axis

      RIGHT ARROW

      Click the horizontal arrowhead and drag away from the center point of the cross.

      Cycle to Rotate mode

      F9

      N/A

      Change cross color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

      Rotate

      Adjusts the clockwise or counterclockwise rotation of the cross. The angle of rotation, in degrees, is displayed at the center of the cross (0 to 360). When using the mouse, the angle of rotation is displayed in the status bar.

      Action Keyboard Mouse

      Rotate clockwise

      LEFT ARROW

      Click and drag the rotation [image] icon in a clockwise motion.

      Rotate counter-clockwise

      RIGHT ARROW

      Click and drag the rotation [image] icon in a counter-clockwise motion.

      Cycle to Move mode

      F9

      N/A

      Change cross color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

    • Points:

      Move

      Repositions the point on the image. The pixel coordinates of the point are displayed. When using the mouse, the pixel coordinates are displayed in the status bar.

      Action Keyboard Mouse

      Move left

      LEFT ARROW

      Click the point and drag leftward.

      Move right

      RIGHT ARROW

      Click the point and drag rightward.

      Move up

      UP ARROW

      Click the point and drag upward.

      Move down

      DOWN ARROW

      Click the point and drag downward.

      Change point color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

    • Lines:

      Set Endpoint(s)

      Sets the position of both endpoints of the line. The pixel coordinates of the current endpoint are displayed. When using the mouse, the pixel coordinates are displayed in the status bar.

      Action Keyboard Mouse

      Move endpoint left

      LEFT ARROW

      Click and drag the endpoint boundary [image] leftward.

      Move endpoint right

      RIGHT ARROW

      Click and drag the endpoint boundary [image] rightward.

      Move endpoint up

      UP ARROW

      Click and drag the endpoint boundary [image] upward.

      Move endpoint down

      DOWN ARROW

      Click and drag the endpoint boundary [image] downward.

      Toggle between endpoints

      F9

      N/A

      Change line color

      SHIFT+F9

      N/A

      Undo an action

      CTRL+Z

      On the Standard toolbar, click the Undo [image] button.

      Redo an action

      CTRL+Y

      On the Standard toolbar, click the Redo [image] button.

  4. If you would like to accept the modifications, then press ENTER. The graphic will appear (in red, by default) over the image, but beneath the semitransparent spreadsheet. To cancel the modifications, press ESC. Once you accept the changes, the new values will automatically be entered into the cell formula or the property sheet value from which interactive graphics mode was accessed.

Interactive Graphics Mode Shortcuts

Action | Keyboard | Mouse

Enter interactive graphics mode

Note: In order to enter Interactive Graphics Mode, the active cell or property sheet value must have an associated interactive graphic.
 F9
  • On the Job Edit toolbar, click the Edit Cell Graphic [image] button.
  • From within the property sheet, click the Edit Graphic [image] button on the property sheet's toolbar.

Maximize a region cell graphic.

 N/A
  • On the Job Edit toolbar, click the Maximize Cell Region [image] button.
  • From within the property sheet, click the Maximize Region [image] button on the property sheet's toolbar.
The following actions are only available while in Interactive Graphics Mode:

Cycle between interactive graphics modes

Note: Depending upon the Interactive Graphics Mode being used, pressing F9 will cause the icon within the interactive graphic to change.
 F9 N/A

Move interactive graphic axially

Move up: UP ARROW

Move down: DOWN ARROW

Move left: LEFT ARROW

Move right: RIGHT ARROW
Click within the interactive graphic and drag to the desired location.

Move interactive graphic diagonally

Move up & left: HOME

Move up & right: PG UP

Move down and left: END

Move down and right: PG DN
Click within the interactive graphic and drag to the desired location.

Pan the Image (slowly)

Pan up: SHIFT+UP ARROW

Pan down: SHIFT+DOWN ARROW

Pan right: SHIFT+RIGHT ARROW

Pan left: SHIFT+LEFT ARROW
Click and drag the image scroll bars.

Pan the Image (quicker)

Pan up: SHIFT+PG UP

Pan down: SHIFT+PG DN

Pan right: SHIFT+END

Pan left: SHIFT+HOME
Click and drag the image scroll bars.

Zoom in (image)

 SHIFT+PLUS SIGN
(on the numeric keypad)
  • On the Job Display toolbar, click the Zoom In [image] button.
  • To zoom in on a specific location within the image, hold down SHIFT and double-left-click the location that you would like to be centered.
Zoom out (image) SHIFT+MINUS SIGN
(on the numeric keypad)
  • On the Job Display toolbar, click the Zoom Out [image] button.
  • To zoom out from a specific location within the image, hold down SHIFT and double-right-click the location that you would like to be centered.
Cycle graphic color. For more information, see Basic Colors. | SHIFT+F9 | N/A
Accept changes made to the interactive graphic | ENTER | Double-click within the interactive graphic, or on the Job Edit toolbar, click the Enter [image] button.
Cancel changes any changes to the interactive graphic | ESC | On the Job Edit toolbar, click the Cancel [image] button.

Undo an action

CTRL+Z

On the Standard toolbar, click the Undo [image] button.

Redo an action

CTRL+Y

On the Standard toolbar, click the Redo [image] button.
Display help on Interactive Graphics Mode | F1 | On the Help menu, click In-Sight Explorer Help.


Cell State Dialog

The Cell State dialog allows you to enable or disable the execution of cells either explicitly or conditionally, based upon the value of a reference cell. Disabled cells will not be executed when the spreadsheet updates, so these cells retain their current values indefinitely, unless they are re-enabled.

Configure the State of One or More Cells

  1. Select a cell or a range of cells in the spreadsheet.

  2. On the Edit menu, click Cell State.

  3. Choose one of the following states for the selected cell(s):
    • Disabled: Selected cell(s) will not execute upon trigger.
    • Enabled: Selected cell(s) will execute upon trigger.
    • Conditionally Enabled: Selected cell(s) will be Enabled if the value of a reference cell is non-zero.
  4. If you chose Conditionally Enabled in the previous step:
    1. Choose either Relative or Absolute for the type of cell reference. For more information, see Cell References - Relative/Absolute.

    2. Click Select Cell to enter cell selection mode.

      Note: If a cell is referenced to itself, that reference is ignored.
    3. Choose a cell whose value will determine the state of the selected cell(s) from Step (1). Whenever Cell Reference evaluates to 0, the selected cell(s) will be Disabled; otherwise, they will be Enabled.
    4. Click OK.

Copy and Paste Cell States

If you copy and paste a cell whose state is Conditionally Enabled, the state of the pasted cell will depend on the type of reference that was chosen for the copied cell's Conditional Reference. Cell Reference will behave as either a relative or an absolute cell reference when the cell is copied and pasted to a new location. Cut and paste, however, will always leave Cell Reference identical to the cell that was cut.

The difference between relative and absolute conditional cell states arises when copying and pasting cell contents. If you copy a cell whose state is Conditional - Relative and paste it to a new location, the state of the pasted cell will be dependent upon the value of a cell relative to the location of Cell Reference for the copied cell.

On the other hand, copying a cell whose state is Conditional - Absolute and pasting it to a new location will always result in a pasted cell whose state is absolutely dependent upon the evaluation of Cell Reference for the copied cell, no matter where it is pasted.

Note: Using Cut and Paste (instead of Copy and Paste) simply moves the cell contents; no translation of relative cell references is performed.

Example 1: Relative Conditional Cell State Example

Assume a spreadsheet is configured as follows:

A0 = AcquireImage(...)

A2 = 'Enabled

A3 = 1.000

B2 = 'Disabled

B3 = 0.000

D2 = 'Copied

D3 = 37.000

E4 = 'Pasted

  1. Right-click cell D3 and select Cell State.
  2. Click Conditionally Enabled.
  3. Under 'Conditional Reference', click Relative.
  4. Click Select Cell.
  5. Double-click cell A3.
  6. Click OK.
  7. Right-click cell D3 and select Copy.
  8. Select cell E3.

  9. On the Edit menu, click Paste.

    The value 37.000 is pasted to cell E3. Note that E3 is Disabled (dimmed), although the copied cell, D3, was Enabled. Since the cell state for D3 was relatively conditional on the value of A3, the state of our pasted version, E3, is now conditionally based upon the value of B3 since we "moved" one cell to the right; the Relative cell state reference translates the same distance (both horizontally and vertically) as the cell contents. Cell E3 is disabled because B3 contains the value 0.000.

    When cell E3 is selected, the relative cell state reference (if B3) can be visually identified on the Job Edit toolbar as follows:

    In words, E3 will equal 37 if B3 contains a non-zero value.

Example 2: Absolute Conditional Cell State Example

Expanding upon the previous illustration, we can add a few more cells to our spreadsheet:

A4 = 1.000

B4 = 0.000

D4 = 442.000

  1. Right-click cell D4 and select Cell State.
  2. Click Conditionally Enabled.
  3. Under 'Conditional Reference', select Absolute.
  4. Click Select Cell.
  5. Double-click cell A4.
  6. Click OK to close the Edit Cell State dialog.
  7. Right-click cell D4 and select Copy.

  8. Right-click cell E4 and select Paste.

    The value 442.000 is pasted to cell E4. Note that E4 is Enabled because the cell state of the copied cell, D4, was absolutely conditional on the value of A4; the Absolute conditional cell state reference does not translate when cells are pasted to new locations.

    When cell E4 is selected, the relative cell state reference (if $A$4) can be visually identified on the Job Edit toolbar as follows:

    In other words, E4 will equal 442 if A4 contains a non-zero value.


Custom View Settings Dialog

The Custom View Settings dialog configures the properties of the Custom View of the spreadsheet. A Custom View allows the application developer to create a run-time display that shows only pertinent job data, hiding all of the detailed formulas in the spreadsheet. When graphics controls, such as dialogs and wizards, are included in the Custom View, the operator on the production floor can make simple adjustments to the job configuration, but they cannot modify formulas directly in the spreadsheet or property sheets. For more information on how to define a Custom View, see Define a Custom View of the Spreadsheet. For more information on how to load a Custom View at start up, see Load a Custom View at Startup.

Note: The Custom View is the only view of the spreadsheet available for users who log on to an In-Sight sensor with an access level of Protected or Locked.

Define a Custom View of the Spreadsheet

Load a Custom View at Start Up


EasyView Settings Dialog

If using an HMI application, you can create an EasyView to customize how data is displayed and to determine if the data is editable by the operator. First, create the EasyView within In-Sight Explorer and save it with the job. Then, preview the EasyView using the VisionView PC Demo application on your PC, or the Web HMI to ensure it is configured correctly.

Note:
  • The VisionView PC Demo has an automatic timeout of forty-five minutes. To purchase a licensed version that provides complete functionality and does not timeout, install the VisionView PC Software, which is available for download on the VisionView support site.
  • The look-and-feel of the VisionView PC Demo will be slightly different than that of the VisionView Operator Interface Panel or VisionView VGA.

Configure an EasyView

  1. Select a cell in the spreadsheet that contains data you want to include in the EasyView.
  2. Create a symbolic tag for the cell. For more information on symbolic tags, see Symbolic Tag Editor.
  3. From the Symbolic Tag Editor, enable the In EasyView checkbox.

  4. From the Edit menu, click EasyView Settings to open the EasyView Settings dialog. The item is automatically displayed in the EasyView Settings dialog.

    Note:
    • If the job contains symbolic tags that were previously defined, press the Add button to launch the Select EasyView Items dialog and manually add the items to the EasyView Settings dialog.
    • If the job was originally created in EasyBuilder, the Select EasyView Items dialog automatically contains the data from any Location or Inspection Tools that were added to your job.

  5. Optionally, enable the Editable checkbox to allow the operator to modify the item from VisionView.

    Note: The item must have read-write permissions to be editable from VisionView.
  6. Optionally, press the Insert Label button to create a header label. Labels are a useful way to group items.
  7. The Caption is the name that is displayed from the HMI application. You can modify the default Caption by clicking within the Caption field of the item or label, and entering a descriptive name. Hit the ENTER key or click outside of the Caption field to commit the change; press the ESCAPE key to cancel the change.
  8. Rearrange the way the items and/or labels are displayed by selecting them from the list and clicking either the Up or Down buttons to set the desired order.
  9. Save the job file.

  10. To preview how the EasyView will be displayed, launch the VisionView PC Demo or the Web HMI.

    Note: If the VisionView PC Demo is installed to your PC, the default installation directory is: C:/Program Files/Cognex/VisionView/PC Demo x.x.x. If the VisionView PC Demo is not installed to your PC, you can download the application from the VisionView support site.
  11. Once the VisionView PC Demo or the Web HMI is launched, log off of the sensor.

  12. If you use the Web HMI, you can preview the EasyView in the EasyView pane.

    If you use the VisionView PC Demo, add your sensor to the Selected Sensors list, enter Run Mode and click the Switch View button to preview the EasyView.

    Note:
    • To preview an EasyView, you must enable the EasyView options in the HMI View Selection dialog first.
    • To preview an EasyView while logged onto an emulator, you must first add the emulator to the Selected Sensors list in the VisionView application.

EasyView Settings Dialog Controls

  • Add: Launches the Select EasyView Items dialog, to manually add items to the EasyView Settings dialog.

  • Remove: Removes the highlighted item from the EasyView Settings dialog.
  • Clear: Clears all items from the EasyView Settings dialog.
  • Insert Label: Creates a header label to group items.
  • Up: Moves the highlighted item up in the list.
  • Down: Moves the highlighted item down in the list.


HMI View Selection Dialog

The HMI View Selection dialog allows you to specify the Run Mode views visible to users from the human-machine interface (HMI) applications and the order of the views when you press the Switch View button in the HMI application. The HMI View Selection settings are saved in the job file.

Note:
  • The Current Image and Last Failed Image (Horizontal) and Current Image and Last Failed Image (Vertical) options are automatically included in job files created using In-Sight Explorer 4.5.0 or higher. If the job file was created using an earlier version of In-Sight Explorer, these options are only included if the job does not contain a Custom View or an EasyView.
  • The Current Image and Last Failed Image (Horizontal), Current Image and Last Failed Image (Vertical) and Image with Graphics and Custom View options are supported on VisionView only.
  • To toggle the Run Mode views in the Web HMI, you must first enable the Allow View Selection option in the HMI Settings dialog. For more information, see HMI Settings Dialog.
  • To toggle the Run Mode views in the VisionView, you must first enable the Switch View option in the VisionView Operator Controls screen.

HMI View Selection Dialog Controls

To display the HMI View Selection, click HMI View Selection from the Edit menu.

  • Views: Displays a list of all Run Mode views available for the active job file.

    • Image with Graphics and EasyView: Displays the image, tool graphics, and the EasyView. To make the Image with Graphics and EasyView option available in the dialog, you must first create an EasyView within In-Sight Explorer and save it with the job.

    • Image with Graphics and Custom View - VisionView Only: Displays the image, tool graphics, and the Custom View. To make the Image with Graphics and Custom View option available in the dialog, you must first create a Custom View within In-Sight Explorer and save it with the job.

    • Image Only: Displays only the image.

    • Image with Graphics: Displays the image and tool graphics.

    • Current Image and Last Failed Image (Horizontal) - VisionView Only: Displays the most recently acquired image and the last failed inspection image that is sent to the HMI display. The image is split in half, with the current image on the left and the last failed image on the right.

      Note:
      • If the VisionView Custom View Position is set to As Specified in Job, Upper Left, Upper Right, Lower Left, Lower Right or Centered, the Custom View will overlay the current image.
      • When the filmstrip is frozen, the highlighted filmstrip image is displayed in place of the current image and the last failed image is not updated.

    • Current Image and Last Failed Image (Vertical) - VisionView Only: Displays the most recently acquired image and the last failed inspection image that is sent to the HMI display. The image is split in half, with the current image on the top and the last failed image on the bottom.

      Note:
      • If the VisionView Custom View Position is set to As Specified in Job, Upper Left, Upper Right, Lower Left, Lower Right or Centered, the Custom View will overlay the current image.
      • When the filmstrip is frozen, the highlighted filmstrip image is displayed in place of the current image and the last failed image is not updated.
    • EasyView Only: Displays only the EasyView. To make the EasyView Only option available in the dialog, you must first create an EasyView within In-Sight Explorer and save it with the job.
  • Visible: When enabled, the corresponding Run Mode view is visible from the HMI application.
  • Up and Down: Use the Up and Down buttons to specify the order of the views after you press Switch View in the Web HMI application. Pressing the Up button moves the highlighted View up in the list; pressing the Down button moves the highlighted View down in the list. When you open an HMI application, the first view in the HMI View Selection dialog is displayed as the default view.


View Menu: Spreadsheet View

The View menu allows you to customize In-Sight Explorer's user interface.

Note: The following options of the View menu are available only when a Spreadsheet View is the active window.
  • In-Sight Network: Shows/hides the In-Sight Network pane, which displays all vision systems detected on your local subnet in addition to any vision systems defined within the Explorer Host Table. For more information, see In-Sight Network.
  • In-Sight Files: Shows/hides the In-Sight Files pane, which allows you view the files contained ona vision system or emulator. Drag-and-drop can be used to copy job files, images and vision system settings among the vision systems on your network via FTP. For more information, see In-Sight Files.
  • Palette: Shows/hides the Palette, which allows for drag-and-drop access to vision tools, graphics functions and snippets. For more information, see Palette: Spreadsheet View.
  • Spreadsheet Navigator: Shows/hides the Spreadsheet Navigator pane, which provides an overview of the spreadsheet and allows you to navigate the job file quickly. For more information, see Spreadsheet Navigator.

  • Script Console Output: Displays the Console Output for all of the Script functions for the currently connected vision system or emulator. For more information, see Edit Script Dialog.

    Note:
    • The Script Console Output is only available on vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
    • To increase performance, close the Script Console Output when the vision system is Online.
  • Toolbars: Shows/hides the Standard toolbar, Formatting toolbar, Job Display toolbar, Job Edit toolbar, Job Audit toolbar, Record/Playback toolbar and Explorer toolbar. For more information, see Toolbars: Spreadsheet View.
  • Refresh: Repopulates the In-Sight Network and In-Sight Files panes to account for any of the following:
    • Files or folders that have been remotely saved, renamed or deleted.
    • Vision systems or emulators that have been disconnected from the network
  • Custom View: Enables/disables the Custom View of the spreadsheet overlay. For more information, see Custom View Settings Dialog.
  • Overlay: Shows/hides the semitransparent spreadsheet overlay.
  • View Entire Spreadsheet: Shows/hides the dialog cells in the spreadsheet.
  • Graphics: Shows/hides overlay graphics associated with spreadsheet functions.
  • Text Scale Mode: Defines the scale for graphic overlay text. This setting is applied to all cells in the spreadsheet and is not saved to the job file. (default = Scale With Image)
    Tip: To only apply the scale setting to individual cell(s) and save the setting to the job file, use the Format Cells dialog. For more information, see Format Cells Dialog.
    • Scale With Image:As the image is zoomed in or out, the graphic overlay text is scaled proportionally with the image.
    • Shrink Only: As the image is zoomed out, the scale of the graphic overlay text is decreased. As the image is zoomed in, if the graphic overlay text is smaller than the default font size (9 point), the scale of the graphic overlay text is increased until it reaches the default font size.
    • Fixed: The graphic overlay text is a fixed size, regardless of the image zoom level.
  • Filmstrip: Shows/hides the filmstrip, which can display images stored to the PC or to the vision system. For more information, see Filmstrip.

  • Focus Metric: Shows/hides the Focus Metric, which is used to help determine an image focus score to indicate the degree to which the image, or a Region of the image, includes the smallest resolvable features in a "scene" (i.e., the object and its background, as captured in the image).

    Note: When connected to the In-Sight 2000 series vision sensor, Focus Metric's Minimum, Maximum and Focus values are hidden.
  • Sheet Zoom: Accesses the Sheet Zoom dialog, which allows you to increase or decrease the level of magnification on the spreadsheet. For more information, see Sheet Zoom Dialog .
  • Job Auditing: Shows/hides cell dependencies within a job, and jumps to the first error precedent of the active cell. For more information, see Job Auditing.
    • Increase Dependency Levels: Clicking this button turns on the display of dependency arrows, and will increase the number of displayed dependency levels. This button must be clicked to display any of the dependency arrows (precedents, dependents and errors).
    • Decrease Dependency Levels: Clicking this button will decrease the number of displayed dependency levels.
    • Reset Dependency Levels: Clicking this button will remove all of the displayed dependencies so that none are shown.
    • Show Dependency Errors Only: Clicking this button will display only the dependency arrows of dependencies whose precedent cell(s) are in error.
    • Go To First Error: Clicking this button while on a cell with an error (#ERR) causes the spreadsheet to make the precedent cell that is in error to become the active cell. This button has no effect unless the active cell depends on another cell in an error condition. For more information, see #ERR.
  • EasyBuilder: Displays the current job in the EasyBuilder View. For more information, see EasyBuilder View.

In-Sight Network

In-Sight Files

Palette

Spreadsheet Navigator

Script Console Output

Toolbars

Refresh

Custom View

Overlay

Graphics

Text Scale Mode

Filmstrip

Sheet Zoom

Job Auditing

EasyBuilder


Palette

Palette: Spreadsheet View

The Palette is a reference pane that provides user guidance through its tabs. To display the Palette, select Palette from the View menu.

Note: Customize In-Sight Explorer by docking or floating, moving and resizing the Palette.
Tab | Description
Functions Tab | The Functions tab populates its tree with all functions available on the active In-Sight vision system, allowing drag-and-drop access to In-Sight functions. For more information, see Function Reference.
Snippets Tab | The Snippets tab populates its tree with all of the snippets available in the Snippets folder on the PC. Use the Snippet dialog to export snippets to the PC. The snippets automatically populate in the Snippets tab. For more information, see Snippet Dialog. Note: Snippets cannot be exported to the PC using the ExportData function.
TestRun Tab | The TestRun tab is used to construct machine vision validation tests. Vision validation is the process of confirming that a machine vision application is operating within expected parameters. TestRun works by performing tests on the vision system and comparing the results of those tests against expected values.

Use the Palette

Tip: Use the Filter search box to quickly find a specific function or snippet.

Drag-and-drop functions or snippets from the Palette directly into spreadsheet cells. Alternately, double-click a function or snippet to insert it into the active cell. If the selected function has a property sheet, the sheet automatically opens when the function is placed into a cell.

Note:
  • The Palette may be disabled, depending on what action is being performed or what particular dialog is open. The most common conditions that cause the Palette to be disabled are:
    • The active vision system is Online.
    • The vision system is in Live video mode.
    • A property sheet is open.
    • An interactive graphic is being modified.
    • Cell Selection Mode is invoked.
  • Functions and snippets cannot be inserted into cell A0.
  • Cell A0 cannot be exported as a snippet.
  • If you attempt to drag-and-drop a function into a cell that already contains data, you are prompted before the cell is overwritten.
  • Snippets insert a range of cells into the spreadsheet. If you attempt to drag-and-drop a snippet into cells that already contain data, the cells are highlighted and you are prompted before the cells are overwritten.

Vision Tools

TestRun™


Spreadsheet Navigator

The spreadsheet navigator pane provides an overview of the spreadsheet that allows you to navigate the job file quickly.

How To Open/Hide the Spreadsheet Navigator Pane

Use the Spreadsheet Navigator Pane

Spreadsheet Navigator Operations


How To Open/Hide the Spreadsheet Navigator Pane

You can open or hide the spreadsheet navigator pane using menu selection or keyboard shortcut.

  • Menu Selection: On the View menu, click Spreadsheet Navigator.
  • Keyboard Shortcut: Press CTRL+SHIFT+4.


Use the Spreadsheet Navigator Pane

The spreadsheet navigator pane is displayed on the right side of the In-Sight Explorer user interface by default. You can drag or right-click the title bar of the spreadsheet navigator pane to customize your In-Sight Explorer user interface. For more information, see Customizing Window Panes.

    1. Viewer Box: The green viewer box Indicates the area of the spreadsheet that is currently visible in the spreadsheet display. You can move the viewer box around to change the visible spreadsheet area in the display.

    2. Dialog Cells: The dialog cells are displayed below the purple line. To navigate the dialog cells in the spreadsheet navigator pane, you need to enable the View Entire Spreadsheet option (View > View Entire Spreadsheet) first. If you do not enable the View Entire Spreadsheet option, the dialog cells will be hidden in the spreadsheet. You can view the dialog cells in the Spreadsheet Navigator pane, but cannot move the viewer box below the purple line.


Spreadsheet Navigator Operations

You can use the spreadsheet navigator right-click context menu to perform the following operations:

  • Show Cell Information ToolTips: Select this option if you want to display the cell location and expression information when hovering the mouse over an area in the spreadsheet navigator. By default, this option is selected.

    Note: If a cell is protected, the cell expression displays ***.

  • Occupancy: Select this option if you want to see all cells that have an expression. The color in the navigator pane is determined by the background color of the cell. By default, this option is selected.

  • Errors: Select this option if you want to highlight the error cells in the spreadsheet navigator pane. The error cell is highlighted in red.

  • Symbolic Tags: Select this option if you want to highlight the cells that contain symbolic tags in the spreadsheet navigator pane. The symbolic tagged cell is highlighted in sky blue.

  • Dependencies: Select this option if you want to highlight cell dependencies in the spreadsheet navigator pane.

Note: For a complete list of the spreadsheet navigator cell colors, see Spreadsheet Navigator Pane Cell Color Reference.


Edit Script Dialog

The Edit Script dialog is used in conjunction with the Script function to write, edit and test the JavaScript source code.

The Edit Script dialog is displayed when the cell containing the Script function is entered, and is used to create, edit and test the JavaScript source code. By default, the first time that the Edit Script dialog is opened, a sample script and arguments are loaded (the sample script is located at C:\ProgramData\Cognex\In-Sight\In-Sight Explorer 5.x.x\Scripts). The sample script may be used as a template for creating custom scripts.

Note: For more information on editing and writing scripts, see Script and Scripting.

Edit Script Dialog Panes and Controls

There are two methods to display the Edit Script dialog:

  • Add a Script function to an empty cell.

  • Double-click an existing Script function.

The Edit Script dialog is composed of four different panes: Arguments Textbox, Code Editor, Console Output and Results.

Note: Each of the panes within the dialog can be docked to the sides of the dialog. The position of the panes will be saved when the Edit Script dialog is closed by pressing the OK button.

In addition to the panes, the Edit Script dialog contains the following menu items and controls:

  • Script: Allows access to various actions to modify the script:
    • Test Script: Performs the same action as the Test Script button.
    • Import Script: Launches an Open dialog, which will display any saved script files (denoted by a .js file extension). Importing a script will replace the current script in the Code Editor.
    • Export Script: Launches a Save dialog, which allows a script file to be saved (with a .js file extension), or to write-over a previously saved script.
    • Revert: Restores the script to its state prior to the Edit Script dialog being opened.
    • Close: Closes the Edit Script dialog and prompts to save changes before closing the dialog, if changes have been made.
  • Edit: Allows various actions to modify the source code in the Code Editor:
    • Undo: Undoes the last change made to the script in the Code Editor.
    • Redo: Redoes the last change that was undone to the script in the Code Editor.
    • Copy: Copies the selected text in the Code Editor to the clipboard.
    • Cut: Cuts the selected text in the Code Editor and copies it to the clipboard.
    • Paste: Pastes the content in the clipboard to the Code Editor.
    • Find: Launches the Find tab of the Find and Replace dialog, to locate text in the code.
    • Replace: Launches the Replace tab of the Find and Replace dialog, to locate text in the code, and then replace them with other text.
    • Go To: Launches the Go To Line dialog, which is used to jump to a specific line number in the code.
  • Test Script: Applies the current JavaScript source code to the cell containing the function, and executes the cell and any of its dependencies.
  • OK: Applies the current JavaScript source code to the cell containing the function, executes the cell and any of its dependencies, and closes the dialog.
  • Cancel: Restores the cell to its state, prior to the Edit Script dialog being opened.

Arguments Textbox

The Arguments pane displays the input arguments to the Script function, which can be edited directly in the textbox. The script arguments are saved when the script is saved.

Code Editor

The Code Editor displays the JavaScript source code, and is used to create and edit scripts. Provided within the editor is syntax highlighting, line numbers and basic text editing functionality (undo/redo, copy/cut/paste, etc.).

Note:
  • If no text is selected and the cut operation is invoked, the entire line where the cursor is located will be cut.
  • The JavaScript language supports and utilizes Unicode characters, and Unicode characters are supported in both the Code Editor and the Console Output. Therefore, most international characters can be inserted into JavaScript code. However, when a Script function returns a string to the Spreadsheet, it will only correctly represent those characters that are supported by the currently selected language (set in the Options dialog).

Shortcuts

While in the Code Editor, the following shortcuts are available:

  • Ctrl + A: Selects all of the text in the code.
  • Ctrl + C: Copy the selected text.
  • Ctrl + F: Launches the Find tab of the Find and Replace dialog, to locate instances of values in the code.
  • Ctrl + G: Launches the Go To Line dialog, which is used to jump to a specific line number in the code.
  • Ctrl + H: Launches the Replace tab of the Find and Replace dialog, to locate instances of values in the code, and then replace them with a substitute value.
  • Ctrl + I: Launches the Quick Search icon; begin typing and the cursor will move to the next found instance of the typed characters in the code.
  • Ctrl + L: Deletes the line where the cursor is located.
  • Ctrl + P: Pastes the copied text.
  • Ctrl + T: Swaps the character where the cursor is located with the character after it.
  • Ctrl + W: Selects the word beside the cursor location.
  • Ctrl + X: Cuts the selected text and copies it to the clipboard.
  • Ctrl + Z: Undoes the last action performed.

Console Output

The Console Output pane displays the logged messages sent to the console object for all of the scripts for the currently selected In-Sight vision system or Emulator.

Note:
  • To display the logged messages in the Spreadsheet View, select the Script Console Output option from the View menu.
  • To increase performance, close the Script Console Output window when the vision system is Online.

Results

The Results pane displays the last value that was returned by the script's run() function. Pressing the Test Script button will refresh the displayed value.


Toolbars: Spreadsheet View

In-Sight Explorer provides seven toolbars (located below the menu bar) that allow single-click access to common tasks. The following toolbars can be hidden or shown using the View menu.

Note:
  • The Formatting, Job Display and Job Edit toolbars are available only when a Spreadsheet View is the active window.
  • Customize In-Sight Explorer by moving and resizing the toolbars.
  • Icons will appear grayed out when their corresponding functions are not available in the current context.
  • Icons can be added and removed from individual toolbars.
  • You can enable large icons in the Options Dialog.
Standard Toolbar

Load a blank, new job onto the active In-Sight sensor. Ensure that any desired changes have been saved in the previous job before creating a new job.

Display the Open dialog; this allows you to load a local or remote job file as the active job onto an In-Sight sensor. For more information, see Save & Open Dialogs.

Save the active job. If the job has not previously been saved, this button opens the Save As dialog. Otherwise, In-Sight Explorer will write the job contents to the current file name.For more information, see Save & Open Dialogs.

Open the Print dialog to print the current spreadsheet to a local or networked printer. For more information, see Print Dialog.

Open the Print Preview window to display a print preview of the active spreadsheet. For more information, see Print Preview.

Cut the selected cell(s). Often used in conjunction with Paste.

Copy the selected cell(s) or file(s) to the clipboard. Often used in conjunction with Paste.

Paste cell(s) that were cut or copied.

Undo the last action.

Redo the last action.

Open the Find dialog to search the spreadsheet for the text string that you specify, and select the first cell that contains that text. For more information, see Find Dialog.
Formatting Toolbar
Note: If a cell containing a PlotString function is highlighted, the Font, Font Size and Font Style formatting is applied to the PlotString cell and the plotted text string. The font size of the plotted text string changes with the image zoom level so the size of the text is proportional to the displayed size of the image. If the text size is too large or to small for your application, use the font size drop-down menu from the Formatting toolbar to change the font size.

Select a font type.

Select a font size.

Bold text.

Italicize text.

Align text to the left of the cell(s).

Align text to the center of the cell(s).

Align text to the right of the cell(s).

Increase the number of decimal places.

Decrease the number of decimal places.

Add a background color.

Note: Changes to the background color are ignored for any cell containing the ColorLabel function. For more information, see ColorLabel.

Add a foreground color.

Note: Changes to the foreground color are ignored for any cell containing the ColorLabel function.

Open the Format Cells dialog to format the number, alignment, font and protection of the selected cell(s). For more information, see Format Cells Dialog.

Increase the font size.

Decrease the font size.

Open the Column Width dialog to adjust the width of one or more spreadsheet columns. For more information, see Column Width Dialog.

Open the Row Height dialog to adjust the height of one or more spreadsheet rows. For more information, see Row Height Dialog.
Job Display Toolbar

Acquire one image from an In-Sight sensor (trigger).
Images are continuously acquired while the sensor is Offline.

Enter Live Video mode, where images are continuously acquired from the In-Sight sensor and displayed behind the semitransparent spreadsheet.

Increase the level of magnification on the background image.

Decrease the level of magnification on the background image.

Increase the level of magnification on the background image to the maximum level.

Set the zoom ratio to 1:1. The image will represent a 1:1 pixel mapping between the image and your display resolution. No automatic scaling will be performed.

Fill the entire display with the image. No empty space will appear around the image, but a portion of the image may be cropped (not visible) to achieve this.

Fit the image to the display. The image will automatically scale to be maximally displayed behind the spreadsheet, with the entire image visible. The image's original aspect ratio is maintained; some empty (grey) space may exist around the image.

Rotates the image 90° clockwise.

Enables/disables the highlighting of pixels in the image with a gray level less than or equal to the Low Saturation Level (in blue) and greater than or equal to the High Saturation Level (in red). For more information, see Image Display Panel.

Increase the spreadsheet overlay transparency; the image becomes more visible, while the spreadsheet becomes less opaque.

Decrease the spreadsheet overlay transparency; the image becomes less visible, while the spreadsheet becomes more opaque.

Access the Custom View Settings dialog.

Toggle the display of the Custom View, as defined within the Custom View Settings dialog. For more information, see Custom View Settings Dialog.

Open the EasyView Settings dialog. For more information, see EasyView Settings Dialog.
Open the HMI View Selection dialog to specify the Run Mode views that are visible to the user from the HMI application and the order of the views when you click the Switch View button in the HMI application. For more information, see HMI View Selection Dialog.

Show/hide the semitransparent spreadsheet overlay.

Shows/hides overlay graphics associated with spreadsheet functions.

As the image is zoomed in or out, the graphic overlay text is scaled proportionally with the image. (default) This setting is applied to all cells in the spreadsheet and is not saved to the job file.

As the image is zoomed out, the scale of the graphic overlay text is decreased. As the image is zoomed in, if the graphic overlay text is smaller than the default font size (9 point), the scale of the graphic overlay text is increased until it reaches the default font size.

The graphic overlay text is a fixed size, regardless of the image zoom level. This setting is applied to all cells in the spreadsheet and is not saved to the job file.
Tip: To only apply the scale setting to individual cell(s) and save the setting to the job file, use the Format Cells dialog. For more information, see Format Cells Dialog.

Show/hide the filmstrip.

Increase or decrease the level of magnification on the spreadsheet.
Show/hide the Focus Metric.

Toggle the Online/Offline state of the active In-Sight sensor.
Job Edit Toolbar

Insert an absolute cell reference into the active cell. For more information, see Cell References - Relative/Absolute.

Insert a relative cell reference into the active cell. For more information, see Cell References - Relative/Absolute.

Open the Insert Function dialog to insert a function into the active cell. If the active cell already contains a function with a property sheet, then the property sheet will open instead of the Insert Function dialog. For more information, see Insert Function Dialog and Property Sheet.

Enters Interactive Graphics Mode to edit the cell graphic. This button is available only when the active cell contains a function that has an associated cell graphic. For more information, see Interactive Graphics Mode.

Resizes the region cell graphic equal to the image region in the referenced Image data structure. Cell A0 is the default image source. This button is available only when the active cell contains a function that has an associated region cell graphic.

Open the Cell State dialog to enable or disable the execution of cells either explicitly or conditionally, based upon the value of a referenced cell. For more information, see Cell State Dialog.

Open the Edit Comment dialog to add or edit a comment for the active cell. For more information, see Comment Dialog.

Open the Symbolic Tag Editor to insert a new symbolic tag or edit an existing symbolic tag for the active cell. For more information, see Symbolic Tag Editor.

Accept the current modification.

Cancel the current modification and restore previous values (if any).

Enter a spreadsheet formula, value or label in the active cell.
Job Audit Toolbar

Turn on the display of dependency arrows and increases the number of displayed dependency levels. For more information, see Job Auditing.

Decrease the number of displayed dependency levels.

Set the number of displayed dependency levels to zero.

Display only dependencies for which the precedent cell is in error (#ERR).

Jump to the first #ERR precedent of the active cell.
Record/Playback Toolbar

During recording:

During playback:

Go to the first image stored in the Playback folder.

Go to the previous image stored in the Playback folder.

Play back all images stored in the Playback folder.

Pause playback of images stored in the Playback folder.

Go to the next image stored in the Playback folder.

Go to the last image stored in the Playback folder.

Record acquired images to the Record folder.

Stop the recording of acquired images to the Record folder.

Open the Record/Playback Options dialog to configure the Record/Playback settings. For more information, see Record/Playback Options Dialog: Spreadsheet View.
Note:
  • If the Record button is clicked during playback, the images being played back are recorded to the Record folder, Good folder or Bad folder, dependent on the Watch Cell Sort selection in the Record/Playback Options dialog. The images are recorded with the same name as the images stored in the Playback Folder.
  • To allow the playback of images when a sensor is in Online mode, the Trigger parameter of the AcquireImage function must be set to External, Manual or Network.
Explorer Toolbar

View the In-Sight Network pane. For more information, see In-Sight Network.

View the In-Sight Files pane. For more information, see In-Sight Files.

View the Palette. For more information, see Palette: Spreadsheet View.

Set the user name and password to use when logging on to In-Sight sensors. For more information, see Log On/Off Dialog.

Generate an HTML or XML report containing job and network details for one or more In-Sight sensors. For more information, see Create Report Dialog.

Back up jobs and sensor settings for one or more In-Sight sensors. For more information, see Backup Dialog.

Restore jobs and sensor settings for one or more In-Sight sensors. For more information, see Restore Dialog.

Open the Add Sensor/Device to Network dialog. For more information, see Add Sensor/Device to Network Dialog.

Access In-Sight Explorer Help.

Access Online Support at cognex.com/support/insight.


Filmstrip

The filmstrip can be used to play back images recorded to the PC or review images and results stored to the vision system.

  • PC Filmstrip: Spreadsheet View
  • Sensor Filmstrip: Spreadsheet View


Sheet Zoom Dialog

The Sheet Zoom dialog allows you to increase or decrease the level of magnification on the spreadsheet.

Note:
  • Separate sheet zoom values are maintained for the Spreadsheet View and the Custom View.
  • Alternately, you can enter a Sheet Zoom value in the Sheet Zoom [image] drop-down located on the Explorer toolbar.

Use the Sheet Zoom Dialog

  1. From the View menu, click Sheet Zoom.

  2. Enter the desired level of magnification.

  3. Click OK. The Sheet Zoom can be any percentage from 10% to 400%.

    Tip: After typing a Sheet Zoom value, press TAB to preview the Sheet Zoom setting in the spreadsheet.


Job Auditing

Job Auditing enables the graphic display of cell dependencies within a job, as well as displaying cells within a job that are in error (#ERR). A dependency exists when the expression in a cell references another cell or range of cells. There are two parts to each dependency: a precedent and a dependent. The precedent refers to the source of the data, i.e. the cell or range of cells that a cell's expression refers to; the dependent is the destination of the data, i.e. a cell that contains an expression that refers to other cells.

Every cell reference in an expression constitutes exactly one dependency, with one precedent and one dependent. Each dependency is displayed as a color-coded arrow that points from the precedent to the dependent. A small circle at the end of the arrow indicates the precedent cell. The arrows for errors appear over the arrows for non-errors, and the arrows of precedents appear over the arrows of dependents.

Dependencies are drawn in the following order:

  1. Normal dependents = green arrow

  2. Normal precedents = blue arrow

  3. Dependents in error = yellow arrow

  4. Precedents in error = red arrow

Dependencies are drawn differently for the following:

  • Multiple Cell Precedents: When multiple cells refer to a precedent, the range of cells is outlined and the arrow originates from a dot in the furthest left cell in the range. For example:

  • Conditional References: If a cell is conditionally enabled, the conditional references are drawn using a dashed line. For example:

  • Hidden Rows and Columns: When a dependency refers to a row or column that is hidden, the dependency lines will be drawn to the divider line that exists between the adjacent visible rows or columns. For example:

  • Empty Cells: If a cell's expression refers to an empty cell, this relationship is displayed when the dependent cell is selected, but is not displayed when the empty precedent cell is selected. A red question mark is displayed in the dependent cell, regardless of which cell is selected. For example:

    The dependent cell is selected.

    The precedent cell is selected.

  • Dialogs: It is possible to display dependencies between cells in the main spreadsheet and cells that belong to a Dialog. The dependency is displayed by drawing an arrow to or from the cell containing the Dialog function, rather than the individual cells contained in the Dialog. For example:

  • Dead-end Cells: If a cell has no precedent references, the cell is drawn with a dashed magenta border. The magenta border is displayed for all dead-end cells in the spreadsheet, regardless of the selected cell(s). For example:

    Cells A0 and C2 have no dependent
    references, therefore the cells are
    drawn with a magenta border, regardless
    of which cell is highlighted.

    Cell C4 is dependent on cells A0 and C2,
    therefore cells A0 and C2 are not drawn
    with a magenta border.

    The following dead-end cells do not display the magenta border:

    • Any cell with a symbolic tag.
    • A cell containing a text label.
    • A cell containing a ColorLabel, Dialog, Link, Wizard, MessageBox, SetEvent or Timer function.
    • Any cell containing a "Plot" function (e.g., PlotString, PlotRegion, etc.).
    • Any cell containing a "Write" function (e.g., WriteDeviceNetBuffer, WriteFTP, WriteSerial, etc.).

Display the Dependencies of a Specific Cell

  1. Select the cell that contains the data that you want to find dependent and precedent cells.
  2. On the View menu, click Job Auditing and select Increase Dependency Levels. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Levels Increase button.
  3. To identify the next level of cells that provide data to the active cell, select Increase Dependency Levels again.
  4. To remove dependency arrows one level at a time, on the View menu, click Job Auditing and select Decrease Dependency Levels. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Levels Decrease button.

Display All of the Dependencies in a Job

  1. Highlight the entire spreadsheet by clicking the upper-left corner of the spreadsheet.
  2. On the View menu, click Job Auditing and select Increase Dependency Levels. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Levels Increase button. This will activate all of the dependency arrows that exist within the job.

Display the Dependencies in Error for a Specific Cell

  1. Select the cell that contains the data that is in error that you want to find dependent and precedent cells.
  2. On the View menu, click Job Auditing and select Increase Dependency Levels. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Levels Increase button.
  3. On the View menu, click Job Auditing and select Show Dependency Errors Only. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Errors Only button. This will remove the green and blue arrows that indicate normal dependent and precedent cell relationships, leaving only the yellow and red arrows that indicate a dependent or precedent cell in error.

Display Only the Cell Dependency Errors That Exist in a Job

  1. Highlight the entire spreadsheet by clicking the upper-left corner of the spreadsheet.
  2. On the View menu, click Job Auditing and select Increase Dependency Levels. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Levels Increase button. This will activate all of the dependency arrows that exist within the job.
  3. On the View menu, click Job Auditing and select Show Dependency Errors Only. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Errors Only button. This will remove the green and blue arrows that indicate normal dependent and precedent cell relationships, leaving only the yellow and red arrows that indicate a dependent or precedent cell in error.

Jump to the First Error (#ERR) Precedent of the Active Cell

  1. Select a cell that depends upon another cell in an error condition.
  2. On the View menu, click Job Auditing and select Go To First Error. Alternatively, from the Job Audit toolbar, press the [image] Go To First Error button.
  3. This will cause the spreadsheet to jump to the active cell's first precedent cell that is in error, and will make that cell the active cell. Nothing will happen if the active cell does not have any precedent cell in error, or if the active cell is in the main spreadsheet and its first error precedent is in a Dialog or vice versa.

Remove All of the Dependency Arrows

  1. To remove the dependency arrows from the spreadsheet, on the View menu, click Job Auditing and select Reset Dependency Levels. Alternatively, from the Job Audit toolbar, press the [image] Show Dependency Levels Reset button.


EasyBuilder Graphical User Interface

The EasyBuilder graphical user interface (GUI) is centered around the image. The panes and controls surrounding the image are designed to guide you through the process of building a machine vision application (called a job).

The EasyBuilder GUI consists of six components: the menu bar, toolbars, the Application Steps, the EasyBuilder View, the Palette and the settings pane.

Click on one of the red-bounded regions for details:

Customize Window Panes

The Application Steps (EasyBuilder view only), In-Sight Network, In-Sight File List and Palette panes are dockable window panes, and can be customized by dragging or by right-clicking the title bar of the pane. For more information, see Application Steps, In-Sight Network, In-Sight Files, or Palette: EasyBuilder View.

Drag Window Panes

Click the title of the window pane and drag to the desired location.

Dock Window Panes

To attach a window pane to a particular part of the user interface, drag the window pane to the edge where you want to dock it, and drop it onto one of the small squares that appear in the user interface. When hovering over the small square, the preview of the docked location will be displayed in blue.

Dock on left side of the user interface.
Dock on right side of the user interface.
Dock on top side of the user interface.
Dock on bottom side of the user interface.
Tab dock the window pane.

Right-Click Menus

The following menus are displayed when right-clicking the title of the window pane:

  • Dockable (default): Attaches the window pane to the user interface.
  • Auto Hide: "Pins" the window pane to the side of the user interface. To show the window pane, hover over the thin bar on the side of the user interface. This menu is disabled when Floating is selected.
  • Hide: Close the window pane. To unhide, select the window pane from the View menu. This menu is not available for the EasyBuilder Application Steps window pane. For more information, see View Menu: EasyBuilder View.
Note: If double-clicking the floating window pane, it will return to the most recent docked location. If double-clicking the docked window pane, it will be detached from the user interface.


Insert Menu

The Insert menu allows you to place objects into the active spreadsheet cell.

Note: The Insert menu is available only when a Spreadsheet View is the active window.
  • Function: Opens the Insert Function dialog in order to place a function into the active cell. If the active cell contains a function with a property sheet, then this will be opened instead. For more information, see Insert Function Dialog.
  • Absolute Reference: Inserts an absolute cell reference into the active cell via Cell Selection Mode. For more information, see Cell References - Relative/Absolute and Cell Selection Mode.
  • Relative Reference: Inserts a relative cell reference into the active cell via Cell Selection Mode. For more information, see Cell References - Relative/Absolute and Cell Selection Mode.
  • Comment: Allows you to insert a color-coded comment for a cell via the Comment dialog. For more information, see Comment Dialog.
  • Symbolic Tag: Inserts a symbolic tag into a cell that can be used to define inspection results for open data access and exchange (OPC) or to configure an EasyView for the VisionView application. For more information, see the OPC Help file or the VisionView® Software Manual.
  • Cells: Inserts cells into the spreadsheet relative to the currently selected cell(s) via the Insert Cells dialog. At least one cell must be selected before this option is available. The inserted cell(s) can be specified to shift the existing cell(s) right or down, or to insert a whole new row or column of cells. For more information, see Insert Cells Dialog.
  • Rows: Inserts rows into the spreadsheet relative to the currently selected rows (at least one cell must be selected and the last row must be empty before this option is available). The number of rows to be inserted is equal to the number of rows that you have selected; any data within the selected rows will be moved downward accordingly. Inserting rows into the spreadsheet does not change the overall dimensions of the spreadsheet.
  • Columns: Inserts columns into the spreadsheet relative to the currently selected columns (at least one cell must be selected and the last column must be empty before this option is available). The number of columns to be inserted is equal to the number of columns that you have selected; any data within the selected columns will be moved rightward accordingly. Inserting columns into the spreadsheet does not change the overall dimensions of the spreadsheet.

Function

Absolute Reference

Relative Reference

Comment

Symbolic Tag

Cells

Rows

Columns


Insert Function Dialog

All functions contained within an In-Sight job can be placed into the spreadsheet through the Insert Function dialog.

  1. Select a spreadsheet cell to receive the formula.

  2. On the Insert menu, click Function, or alternately click the Function [image] button on the Job Edit toolbar.

    The left side of the Insert Function dialog contains an expandable/collapsible list of tool categories, subcategories and functions. When a tool category is selected on the left, a list of that category's functions will appear on the right side. Every In-Sight function is described in detail in the Function Reference.

  3. To select a function on the right side, highlight the chosen function. The bottom of the Insert Function dialog shows concise context-sensitive help text for the highlighted function.

    Note: To view detailed context sensitive help about any function, select the function from the list and press F1; the corresponding Function Reference topic is displayed.

  4. Press the OK button or double-click the highlighted function. The property sheet for this function opens, if applicable. Otherwise, the function is placed into the current insertion point in the spreadsheet.

    Note: The maximum combined number of functions, arguments, and operators allowed in any given formula is 254. When an argument to a function is a range of cells, each cell within the range is counted as one argument. For example, the formula Sum(1,2,A3:A6) consists of 1 function (Sum) and 6 arguments (1,2,A3,A4,A5,A6); this consumes 7 of the allowed 254 for this particular formula.


Cell References - Relative/Absolute

A cell reference is a link to a different cell. When data in the source cell changes, the value in the destination cell (the one that contains the reference) updates automatically. The link is unidirectional, however, as the source cell does not know that it is being referenced by another cell.

There are two kinds of cell references:

  • Relative: A cell reference whose row and column addresses can vary when copied to a new location. The amount of change is equal to the distance (both row- and column-wise) between the copied cell and the pasted cell. For example, assume that cell A2 contains the relative reference A1. If cell A2 is copied to cell S43, then cell S43 contains S42. In this case, the cell reference is essentially saying "always point to one cell above me."
  • Absolute: A cell reference that does not change when copied to a new location. In formulas, a dollar sign ($) indicates an absolute reference; this symbol can be used in conjunction with any row or column (or both) to construct an absolute cell reference.

Relative and absolute references can be used in conjunction to create a "mixed" reference.

The following table lists the four variants of absolute and relative cell references, including what happens after they are copied & pasted to a different cell:

Description | Reference Type | Example | Result after Pasting to New Cell
Relative Column & Relative Row | Relative | B4 | Both the row (4) and the column (B) vary according to the distance from the original cell.
Fixed Column & Fixed Row | Absolute | $A$1 | Always the same ($A$1).
Fixed Column & Relative Row | Mixed | $D9 | The column (D) is always the same, but the row (9) varies according to the distance (number of rows) from the original cell.
Relative Column & Fixed Row | Mixed | G$3 | The column (G) varies according to the distance (number of columns) from the original cell, but the row always remains the same (3).

Shortcuts for Creating a Cell Reference

  • Relative: Press CTRL+SHIFT+R, or click the relative reference [image] button. Cell selection mode allows you to choose the desired cell to reference. For more information, see Cell Selection Mode.
  • Absolute: Press CTRL+SHIFT+A, or click the absolute reference [image] button. Cell selection mode allows you to graphically select the desired cell to reference from the spreadsheet.

Cell Reference Examples

Reference Type | Column | Row | Example
Relative Reference | Relative Column | Relative Row | Assume that cell C9 contains E14. If C9 is copied to B1, then B1 contains D6.
Absolute Reference | Fixed Column | Fixed Row | Assume that cell E2 contains $F$7. If E2 is copied to R7, then R7 contains $F$7.
Mixed Reference Fixed Column Relative Row

Suppose you want a cell reference that always refers to column A when copied to another cell, but the row address varies in relation to the change in distance from the original cell to the destination cell. Assume that 3 data points (5, 18, and 55) exist in cells A2, A3, and A4, as shown:

In this case, you would use a dollar sign in front of the column ($A) but not in front of the row (2) yielding a cell reference of $A2, which we could place in cell B2. Cell B2 is then copied and pasted to cells B3, B4, C2, C3 and C4. Observe how the pasted cells always look to column A, but the row is determined relative to the cell in which you pasted the reference.
Mixed Reference Relative Column Fixed Row

Suppose you want a cell reference that always refers to row 2 when copied to another cell, but the column address varies in relation to the destination column. Assume that 3 data points (13, 20, and 26) exist in cells A2, B2 and C2, as shown:

In this case, you would reference the column relatively (A) and the row absolutely ($2) yielding a cell reference of A$2, which we could place in cell A3. Cell A3 is then copied and pasted to cells A4, B3, B4, C3 and C4. Observe how the pasted cells always look to row 2 but the column is determined relative to the cell in which you pasted the reference.


Comment Dialog

A comment is a note that you attach to a cell, separate from other cell content. Cells with comments have color-coded triangular indicators in the upper-right corners. When the mouse is placed over a cell with a comment, its comment will appear. For an example click Closed here.

To Display the Comment Dialog

  1. Click the cell that you want to insert the comment on.
  2. On the Insert menu, click Comment. Alternately, right-click the cell that you want to insert the comment on and select Insert Comment from the shortcut menu.

  3. Enter the text for your comment in the available box.

    Note: The Comment dialog always appears as the Edit Comment dialog, regardless of whether you select it to insert or edit a comment.
  4. After you have finished typing your comment text, you can customize the color of the triangular indicator by using the Flag color drop-down menu.
  5. Once you have finalized the text and the indicator color, click OK to insert the comment.

To Edit a Comment

  1. Click a cell that has a comment.
  2. On the Insert menu, click Comment. Alternately, right-click the cell with the comment and select Edit Comment from the shortcut menu.
  3. Once you have finalized your edits, click OK to exit the Edit Comment dialog.

To Remove a Comment From a Cell

  1. Click the cell with the comment that you would like to remove.
  2. On the Edit menu, expand the Clear options and select Comments. Alternately, on the Insert menu, click Comment and delete the highlighted text, and then click OK to exit the Edit Comment dialog.

Comment Dialog Controls

  • Comment box: The comment box is the area in which you enter the text for your comment. A comment can contain up to 256 characters.
  • Flag color: Customize the color of your triangular indicator by selecting a color from this drop-down list.


Symbolic Tag Editor

The Symbolic Tag Editor is used to add, select, delete and edit symbolic tags for cells containing data that can be transmitted over the OPC channel to the In-Sight OPC Server, to generate audit messages to an audit message server, or used to create an EasyView, which allows you to customize how data is displayed on a Cognex VisionView device and determine if the data is editable by the operator.

A cell with a symbolic tag has a color-coded triangular indicator in the lower-right corner. When the mouse is placed over a cell with a tag, the name of the tag appears:

Note:
  • For more information about the types of values that can be transmitted to the OPC channel, as well as information regarding the In-Sight OPC Server, please refer to the In-Sight OPC Server help file.
  • For more information about VisionView, refer to the VisionView® Help File.
  • If a job is being built and configured in a language other than English and the Use English Symbolic Tags for EasyBuilder option is enabled (checked) in the Options dialog, any symbolic tags references that were created prior to enabling the option must be updated to the English name version.
  • In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3. In this case, do not use a cell name or the form of a cell name for a symbolic tag name.

Display the Symbolic Tag Editor

  1. Select a cell in the spreadsheet that contains information that you want to transmit, or a cell that already contains a symbolic tag.

  2. On the Insert menu, click Symbolic Tag. Alternately, right-click the cell and select Insert Symbolic Tag from the shortcut menu. If the cell already contains a symbolic tag, the shortcut menu option will be Edit Symbolic Tag.

    Note: When a job is created in EasyBuilder, EasyBuilder Tags are automatically inserted into the spreadsheet to reference EasyBuilder overall job results. All EasyBuilder Tags can be selected for transmission over the OPC channel, but some cannot be used to create an EasyView.

Symbolic Tag Editor Dialog Controls

  • Add: Automatically inserts the AcquireImage cell (A0). Subsequently, each time the Add button is clicked, it automatically inserts the first available cell in the spreadsheet that contains transmittable data, moving sequentially through the spreadsheet, by column and then row.

  • Select Cell: Initiates cell selection mode, to select the cell that will be assigned the symbolic tag.

  • Delete: Permanently removes the selected symbolic tag.

    WARNING: Do not delete EasyBuilder created symbolic tags; doing so may break dependencies and the EasyBuilder job may not function properly.
    Note:

    Alternatively, symbolic tags can be removed using the Edit menu:

    1. Click the cell that contains the symbolic tag.
    2. On the Edit menu, click Symbolic Tag from the Clear submenu. This will remove the tag from the cell.

  • Tag Name: Specifies a name for the symbolic tag. When changing the name of a symbolic tag, be sure to follow the naming conventions outlined in the Symbolic Tag Requirements section.

  • Use OPC: When checked, the symbolic tag is transmitted via the OPC channel.

    Note: Only EditFloat, EditInt and EditString cells are writable via OPC. If the target cell does not contain one of these functions, it will be read-only to the In-Sight OPC Server and to third-party OPC clients.
  • Audit Message: When checked, any changes made to the cell's contents (e.g., changes made to the cell's formula or interactive control value) automatically generates and sends an audit message via TCP/IP, which can be imported into an audit message server in a compliance software system. Use the Audit Message Settings dialog to configure audit message settings for the active vision system and to specify the IP address and TCP/IP port of the audit message server.
  • In EasyView: When checked, the symbolic tag is added to the EasyView. After enabling the In EasyView checkbox, use the EasyView Settings dialog to customize how the data is displayed on VisionView.

Symbolic Tag Requirements

  • Two or more tags cannot reference the same cell.
  • Tag Names:
    • Cannot start with a number.
    • Can only use the following characters: A-Z, a-z, 0-9 and the underscore "_" character. No spaces or non-English language characters may be used.
    • Can contain a minimum of 1 character and a maximum of 127 characters.
    • Cannot be cell names or have the form of cell names (e.g., B2 or B22222).
    • Must be unique. There cannot be a duplicate Tag Name within the same job, regardless of case. For instance, you cannot have one tag as "test" and the other as "Test".

If transmitting tags to the In-Sight OPC Server, the following requirements must also be met:

  • OPC Tags cannot use any of the pre-defined tag names used in the In-Sight OPC Server:
    • AcquistionCount
    • DiscreteOnline
    • GuiOnline
    • JobName
    • LiveMode
    • NativeOnline
    • Online
    • SaveJobAs
    • TriggerEvent
  • OPC Tags within In-Sight Explorer and In-Sight OPC Server are case-sensitive; if you create an OPC Tag in In-Sight Explorer, the corresponding OPC Tag in In-Sight OPC Server must use the exact same upper and lower case characters. When the two names do not match exactly, an error will result.
  • OPC Strings, which are the data values that are transferred, may contain any 8-bit or 2-byte character.


Insert Cells Dialog

The Insert Cells dialog is used to add a cell, a range of cells, a new row or new column to the spreadsheet.

  1. Click a cell or a range of cells in which you would like to insert a new cell, a range of cells, a new row or a new column.

  2. From the Insert menu, click Cells.

  3. Select the appropriate insert action:
    • Shift cells right: Inserts the new cells to the left of the selected cell(s). Select the same number of cells that you want to insert.
    • Shift cells down: Inserts the new cells above the selected cell(s). Select the same number of cells that you want to insert.
    • Entire row: Inserts an entire row of cells. Click a cell in the row immediately below where you want the new row. For example, to insert a new row above row 5, click a cell in row 5.
    • Entire column: Inserts an entire column of cells. Click a cell in the column immediately to the right of where you want to insert the new column. For example, to insert a new column to the left of column B, click a cell in column B.
  4. Click OK to insert the cell(s), row or column.


Format Menu

The Format menu allows you to modify visible properties of the rows and columns that define the semitransparent spreadsheet overlay.

Note: The Format menu is available only when a Spreadsheet View is the active window.
  • Cells: Allows you to modify the decimal number format; text alignment; font type, style, size and color; line width of cell graphics; and cell color of a single cell or multiple cells through the Format Cells dialog. Cell locking settings and cell password protection may also be enabled. For more information, see Format Cells Dialog.
  • Rows: Adjusts properties of the spreadsheet rows.
    • Row Height: Increases or decreases the height of the selected spreadsheet rows.
    • Auto Fit: Resizes selected row(s) to accommodate the widest content contained within the selected cells.
    • Hide Rows: Makes the selected row(s) invisible on the spreadsheet.

    • Unhide Rows: Reveals any hidden rows between the selected rows. At least two rows must be selected in order to unhide rows, except when one or more rows at the top or bottom of the spreadsheet have been hidden. To unhide rows at the top or bottom of the spreadsheet, select the first or last non-hidden row.

      Note: Choosing Unhide Rows when a column is highlighted will unhide every row in the spreadsheet.
  • Columns: Adjusts properties of the spreadsheet columns.
  • Column Width: Increases or decreases the width of the selected spreadsheet columns.
  • Auto Fit: Resizes selected column(s) to accommodate the widest content contained within the selected cells.
  • Hide Columns: Makes any selected column(s) invisible on the spreadsheet.

  • Unhide Columns: Reveals any hidden columns between the selected columns. At least two columns must be selected in order to unhide columns, except when one or more columns at the left or right of the spreadsheet have been hidden. To unhide columns at the left or right of the spreadsheet, select the first or last non-hidden column.

    Note: Choosing Unhide Columns when a row is highlighted will unhide every column in the spreadsheet.

Cells

Rows

Columns


Format Cells Dialog

The Format Cells dialog is used to adjust the format of a single cell or a range of cells in the spreadsheet. Six tabs make up the Format Cells dialog: Number Tab, Picture Tab, Font Tab, Alignment Tab, Protection Tab, and Graphics Tab.

Format Cells Dialog Controls

To display the Format Cells dialog:

  1. Highlight the cell or range of cells that you want to format.

  2. On the Format menu, click Cells.

Number Tab

Click the Number tab to set the decimal place values of the numeric values in cells from 0 to 6 places. The default setting is 3.

Tip: The decimal number format can also be set from the Formatting toolbar by using the Increase Decimal [image] and Decrease Decimal [image] buttons.

Picture Tab

Click the Picture tab to insert a graphic into a cell to show icons, or other graphics, within the spreadsheet. The picture's file can either be saved with the job, using the Open button, or linked, using the Link button. The following file extensions are supported:

  • BMP

  • GIF*

  • ICO*

  • JPG, JPEG

  • WMF*, EMF*

  • TIF*, TIFF*

  • PNG*

  • EXIF

    * Those marked with an asterisk support transparent regions; all others are fully opaque.

When a picture is inserted using the Open button, the size of the job file will increase by approximately the size of the picture file, since it is copied byte-for-byte into the job.

If the picture file size exceeds 20,000 bytes, the following warning message is displayed:

When a picture is inserted using the Link button, instead of stored with the job, the picture can be linked either from a local PC or from a shared network.

Once a picture has been linked, the file path is listed in the text box; this path is editable. This is useful to fix a link that cannot be found, such as when loading a job that was created on another computer.

If a file cannot be located, a red X will be displayed in the spreadsheet and the dialog.

If the path is edited, it must lead to a valid picture file or an error message is displayed. If this occurs, the path will revert to its previous value and the dialog will remain open.

The Scale number box allows the user to enter a scale factor from 1 to 1,000,000,000 percent. Underneath the number box, the effective size of the picture, based on the selected scale, is displayed.

To remove a picture from a cell, use the Clear button.

Note:
  • If the picture does not fit in the cell, it will be cropped. To view the entire picture, adjust the Row Height and Column Width to enlarge the cell.
  • Linking to a dynamically-changing picture file is not supported; if a file is modified outside of In-Sight Explorer, the original picture is still retained.
  • When a picture is opened, the Scale is automatically set to a value that will make the picture fill 90% of the current cell's height or width, whichever is more constraining.

Font Tab

Click the Font tab to select the font, the font style (Regular, Italic, Bold or Bold Italic), the font size (8 to 72 point), the color of the text (Foreground color) and the color of the cell (Background color).

By checking the Default font checkbox, you will set your changes as the default settings for all of the cells in the spreadsheet.

Note:
  • The list of available fonts depends upon the fonts loaded on the host PC. If a job is loaded onto a PC that does not have that font, the default font of that PC will be used instead.
  • Changes to foreground and background colors are ignored for any cell containing the ColorLabel function.
  • In some cases, the background color may be one grid line off, especially when there is a empty cell between two cells containing text. If this occurs, create a blank string (a cell containing only an apostrophe) in the empty cell to correct the background color formatting.
  • If a cell containing a PlotString function is highlighted, the Font, Font Style and Font Size formatting is applied to the PlotString cell and the plotted text string.

Tip: By using the Font box, the Font Size box, the Bold button, Italic button, Background Color, Foreground Color, or the Increase Font Size or Decrease Font Size buttons on the Formatting toolbar, you can change the formatting of the text without opening the Format Cells dialog.

Alignment Tab

Click the Alignment tab to align data in the cell(s) to the Left, Center or Right, horizontally or to the Top, Center or Bottom, vertically. To restore the default alignment, click General.

Tip: The cell alignment can also be set from the Formatting toolbar by using the Align Left [image] , Center [image] or Align Right [image] buttons.

Protection Tab

Click the Protection tab to set cell protection.

Click the Locked checkbox to lock a single cell or a range of cells. Protecting a cell or a range of cells prevents the expression inside the cell(s) from being modified. Therefore you can still change the formatting of the cell(s). For the lock to take effect, the job must be protected. You can protect the job by clicking on the File menu and selecting Protect Job.

Enter a password in the Password field and again in the Verify Password field to hide the cell formulas.

Note:
  • When a cell is locked, but the job is not protected, a yellow lock symbol [image] will appear in the upper-left corner of the spreadsheet. When a cell is locked and the job is protected, a red lock symbol [image] will appear in the same location.
  • Entering a licensing password hides the cells formulas and prevents cell execution unless a license is added to the vision system using the Licensing dialog.
    • Once a license is added, the cells execute and the results are displayed. Editing access to the cells is gained by entering the password in the Licensing dialog.
    • Access is revoked when you either re-enter the password in the Protection tab or disconnect from the vision system.
    • Licenses are generated using the In-Sight License Generator.
    • The licensing procedure is explained in detail in Licensing.

Graphics Tab

Click the Graphics tab to format the line width of cell graphics and the scale of graphic overlay text. The formatting only applies to cell(s) containing a function that has an associated interactive graphic or result graphic.

  • Line Width: Formats the line width (measured in pixels) for cell graphics. All graphics associated with the formatted cell(s) have the same line width. (1 - 5; default = 1)
  • Text Scale Mode: Formats the scale for graphic overlay text. All text associated with the formatted cell(s) have the same scale. (default = General)
    • General: The scale setting defined in the Job Display toolbar is used for the formatted cell(s).
    • Scale with Image: As the image is zoomed in or out, the graphic overlay text is scaled proportionally with the image.
    • Shrink Only: As the image is zoomed out, the scale of the graphic overlay text is decreased. As the image is zoomed in, if the graphic overlay text is smaller than the default font size (9 point), the scale of the graphic overlay text is increased until it reaches the default font size.
    • Fixed: The graphic overlay text is a fixed size, regardless of the image zoom level.
    Note:

    • If General is the selected Text Scale Mode, the scale setting is not saved to the job file.

    • If Scale with Image, Shrink Only or Fixed is the selected Text Scale Mode, the setting takes precedence over the scale setting defined in the Job Display toolbar and is saved to the job file.


Row Height Dialog

To Change the Height of One or More Spreadsheet Rows:

  1. Highlight one or more rows.

  2. On the Format menu, click Rows.

  3. Click Row Height. Alternately, click the Format Row Height [image] button the on the Formatting toolbar.

  4. Enter the desired row height and click OK.

    Note: The row height may be any integer from 1 through 2000; the default row height is 20.
    Tip: The height of single row can also be adjusted by clicking on the divider line to the right of its row letter and dragging the divider line to the desired height.


Column Width Dialog

To change the width of one or more spreadsheet columns:

  1. Highlight one or more columns.
  2. On the Format menu, click Columns.

  3. Click Column Width. Alternately, click the Format Column Width [image] button the on the Formatting toolbar.

  4. Enter the desired column width and click OK.
Note: The column width may be any integer from 1 through 2000; the default column width is 64.
Tip: The width of single column can also be adjusted by clicking on the divider line to the right of its column letter and dragging the divider line to the desired width.


Image Menu: Spreadsheet View

The Image menu allows you to perform operations that relate to the image shown beneath the semitransparent spreadsheet overlay.

Note: The following options of the Image menu are available only when a Spreadsheet View is the active window.
  • Trigger: Acquires one new image from the active In-Sight sensor.

  • Repeating Trigger: Images are continuously acquired to help you verify that your application is working as expected against live images.

    Note:
    • Repeating Trigger is not available on vision systems running In-Sight 4.x.x firmware.
    • To exit this mode, click the Repeating Trigger button in the Job Display toolbar, or select Repeating Trigger from the Image menu again.

  • Live Video: Displays a live image to use when making adjustments to the sensor's lens and the field of view. Press any button to exit live video and return to the spreadsheet. Also launches the Focus Metric, which is used to help determine an image focus score, indicating the degree to which the image, or a Region of the image, includes the smallest resolvable features in a "scene" (i.e., the object and its background, as captured in the image).

    Note:
    • To provide relevant data, the Focus Metric score should be compared against another Focus Metric score from the same, exact scene (the scenes being identical).
    • The Focus Metric can be turned off by pressing the Focus Metric icon in the Job Display Toolbar when the image is in Live Video mode, or selecting the Focus Metric option in the View menu.

  • Record: Records acquired images to the user-specified Record Folder. Recording works in Online and Offline modes. For more information, see Record/Playback Options Dialog: Spreadsheet View.

    Note:
    • Images cannot be recorded in Live Video mode.
    • If Record is selected during playback, the images being played back are recorded to the Record Folder, Good Folder or Bad Folder, dependent on the Watch Cell Sort selection. The images are recorded with the same name as the images stored in the Playback Folder.
  • Playback: Selects an image for playback.
    • First Image: Go to the first image stored in the Playback Folder.
    • Previous Image: Go to the previous image stored in the Playback Folder.

    • Play: Play all images stored in the Playback Folder.

      Note: To allow the playback of images when a sensor is in Online mode, the Trigger parameter of the AcquireImage function must be set to External, Manual or Network. For more information, see AcquireImage.
    • Next Image: Go to the next image stored in the Playback Folder.
    • Last Image: Go to the last image stored in the Playback Folder.
  • Record/Playback Options: Accesses the Record/Playback Options dialog, which allows you to designate a folder to store recorded images, designate a folder of recorded images to play back, specify the maximum number of images stored, view the current number of images stored, sort images to different folders based on the quality of the image, set the image resolution of recorded images, select the filename format of recorded images and set the Playback mode and delay for playback of recorded images. For more information, see Record/Playback Options Dialog: Spreadsheet View.
  • Zoom: Changes the magnification level of the background image.
    • Zoom In: Increase zoom magnification by one level on the image.
    • Zoom Out: Decrease zoom magnification by one level on the image.
    • Zoom 1:1: Maps one image pixel per one PC display pixel.
    • Zoom to Max: Increases zoom to the maximum magnification.
    • Zoom to Fit: Fits the entire image inside the window.

    • Zoom to Fill: Fills the window with the image. No visible border will appear.

      Note:
      • Zoom 1:1, Zoom to Max, Zoom to Fit and Zoom to Fill are mutually exclusive.
      • The zoom ratio for Zoom to Fit and Zoom to Fill adjusts automatically when the application window is resized.
  • Orientation: Selects the orientation at which the acquired image will be displayed. The highlighted image orientation icon indicates the current selection. This setting is for display purposes only and does not affect how the image is acquired from the sensor, how the vision tools process the image or how images are stored to and loaded from files on the PC. Consequently, the displayed orientation can be changed at any time without affecting the results produced by the job. This setting is stored in the job file, so each job may be configured to display images in a particular orientation.
    • Normal
    • Rotate Clockwise 90°
    • Rotate 180°

    • Rotate Clockwise 270°

    Note: When an image is saved to a file, it is saved its original acquired orientation, which is specified by the Orientation parameter in the AcquireImage property sheet.
  • Show Image Saturation: Enables/disables the highlighting of pixels in the image with a gray level less than or equal to the Low Saturation Level (in blue) and greater than or equal to the High Saturation Level (in red). For more information, see Options Dialog.
  • Overlay Transparency: Accesses the Overlay Transparency dialog, which allows you to adjust the opacity of the spreadsheet overlay in relation to the background image and graphics. For more information, see Overlay Transparency Dialog.

Trigger

Repeating Trigger

Live Video

Record

Playback

Record/Playback Options

Zoom

Orientation

Show Image Saturation

Overlay Transparency


Record/Playback Options Dialog

The Record/Playback Options dialog allows you to adjust record and playback settings for individual vision systems and emulators. After configuring the dialog settings, you can record and play back acquired images that are stored in the specified Record Folder and Playback Folder, located on the PC.


Overlay Transparency Dialog

The Overlay Transparency dialog allows you to adjust the opacity of the spreadsheet overlay in relation to the background image and graphics. When this value is set to 0, the spreadsheet overlay completely blocks the background image or graphics. Increasing the Overlay Transparency value allows more of the image and graphics to show through the spreadsheet. The Overlay Transparency value may be any percentage from 0% to 100%.

To Display the Overlay Transparency dialog, click Overlay Transparency from the Image menu.

Tip: After typing an overlay transparency value, press TAB to preview the Overlay Transparency setting in the spreadsheet.


Sensor Menu: Spreadsheet View

The Sensor menu allows you to configure settings and perform operations on the active vision system.

Note: The following options of the Sensor menu are available only when a Spreadsheet View is the active window.
  • Online: Toggles the Online/Offline state of the active vision system.
  • Network Settings: Opens the Network Settings dialog to configure the vision system to communicate on a TCP/IP network. For more information, see Network Settings Dialog.
  • Date/Time Settings: Opens the Date/Time Settings dialog, allowing you to adjust the current date or time, establish a time zone and configure SNTP servers for automatic time synchronization. For more information, see Date/Time Settings Dialog.
  • Host Table: Opens the Host Table dialog to specify a local mapping of network host names to IP addresses. This provides access to vision systems on a different subnet, as well as third-party FTP servers. For more information, see Host Table Dialog.
  • FTP Settings: Opens the FTP Settings dialog to configure the File Transfer Protocol (FTP) settings for communication with other devices. For more information, see FTP Settings Dialog.
  • Job Server Settings: Opens the Job Server Settings dialog to configure the vision system to access to an FTP server from which to load and save job files. For more information, see Job Server Settings Dialog.
  • Serial Port Settings: Configure the communication parameters for serial ports. For more information, see Serial Port Settings Dialog.

  • CC-Link Settings: Opens the CC-Link Settings dialog to configure CC-Link communications settings on a CIO-MICRO-CC I/O module. For more information, see CC-Link Settings Dialog.

    Note: CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Discrete I/O Settings: Configure the discrete input and output data lines. For more information, see Configure Discrete I/O Lines.
  • Light Settings: Opens the Light Settings dialog to configure lighting devices connected to the In-Sight 7000 series vision system. For more information, see Light Settings.
  • Audit Message Settings: Opens the Audit Message Settings dialog to enable or disable automatic audit messages for the active vision system, specify the IP address and TCP/IP port of the audit message server, and specify the types of events for which audit messages will be generated. For more information, see Audit Message Settings Dialog.
  • Line Scan Settings: Opens the Line Scan Settings dialog to configure settings on an In-Sight 5604 line scan vision system. For more information, see Line Scan Settings.
  • Startup: Configures the boot-time startup parameters, including Online/Offline status and which job to load on startup. For more information, see Startup Dialog.
  • User Access Settings: View or modify the access level permissions for users. For more information, see Startup Dialog.
  • HMI Settings: Opens the HMI Settings dialog to configure the number of the human machine interface (HMI) applications allowed to be connected, the HMI server and the HMI display options. For more information, see HMI Settings Dialog.
  • Image Settings: Opens the Image Settings dialog to configure the resolution and frame rate of Live and Online images and the default resolution of the vision system. For more information, see Image Settings Dialog.
  • Image Buffers: Opens the Image Buffers dialog to configure the number of image buffers allocated to the vision system at startup. For more information, see Image Buffers Dialog.
  • Sensor Filmstrip Settings: Opens the Sensor Filmstrip Settings dialog to configure the type of results stored to the vision system, the number of results stored to the vision system, the factors that determine the pass or fail status of the results and the behavior of the filmstrip when a failing result is encountered. Sensor Filmstrip Settings Dialog.
  • RAM Disk Settings: Opens the RAM Disk Settings dialog to enable and configure a vision system or emulator's RAM Disk folder, which can then be used to store and share data such as jobs, images or cell data (when used in conjunction with either the Export Cell/Import Cell dialogs, the Snippet dialog or the ExportData/ImportData functions). For more information, see RAM Disk Settings Dialog.
  • Active Cells Limit: Opens the Active Cells Limit dialog to configure the number of available spreadsheet cells. For more information, see Active Cells Limit Dialog.
  • Profile Job: Opens the Profiler for benchmarking cell execution times. For more information, see Profile Job Dialog.
  • Job Pass/Fail: Opens the Job Pass/Fail Setup dialog to select a cell to monitor that determines the job's overall pass/fail status, which can be sent as an output from the vision system to other applications, such as the Cognex VisionView. For more information, see Job Pass/Fail Cell Setup Dialog.
  • TestRun: Opens the TestRun Setup dialog to configure TestRun tests, and also allows a TestRun test to be initiated, repairing a broken value or test, importing and exporting tests and launching a new test. For more information, see TestRun™.
    • New: Clears the previously created TestRun test.
    • Configure: Launches the TestRun Setup dialog to configure and edit TestRun tests.
    • Run: Initiates a TestRun test execution.
    • Batch Run: Launches the Batch Run dialog, which is used to configure TestRun to execute on a batch of .job files. For more information, see Batch Run.
    • Repair: Initiates the repair of a TestRun value or test.
    • Import: Launches the Open dialog to import a previously created TestRun test. For more information, see Save & Open Dialogs.
    • Export: Launches the Save As dialog to save and export a TestRun test. For more information, see Save & Open Dialogs.
  • Allow Cancel in Dialog Function: When enabled, all Dialog function(s) within the job will contain a Cancel button. When disabled, all Dialog function(s) within the job will not contain a Cancel button. For more information, see Dialog.
  • Licensing: Opens the Licensing dialog, allowing you to manage cell protection licenses and enter a temporary password that provides access to protected cells. For more information, see Licensing.
  • Restart: Opens the Restart Sensor confirmation dialog, which verifies that you intend to power cycle the vision system.

Online

Network Settings

Date/Time Settings

Host Table

FTP Settings

Job Server Settings

Serial Port Settings

CC-Link Settings Dialog

Discrete I/O Settings

Light Settings

Audit Message Settings

Line Scan Settings Dialog

Startup

User Access Settings

HMI Settings Dialog

Image Settings

Image Buffers

Sensor Filmstrip Settings

RAM Disk Settings

Active Cells Limit

Profile Job

Job Pass/Fail

TestRun

Allow Cancel in Dialog Function

Licensing

Restart


Online/Offline

The current Online/Offline status is indicated on the status bar in the lower right corner of the user interface. For the status bar to display an [image] status, three independent Online states must be achieved: GUI Online, Communications Online, and Discrete I/O Online.

Any of the following actions will toggle the GUI Online/Offline status of the active vision system:

  • From the Sensor menu, click Online.
  • Click the Online [image] toolbar button.
  • EasyBuilder only: In the Run Job settings pane, click the Online button.
  • Press CTRL+F8.

The following table summarizes the different Online/Offline modes of the vision system:

Online/Offline Status

 Condition

The Communications and Discrete I/O Online states have been achieved, but the vision system was placed Offline from the GUI.

The three independent Online states have been achieved; the vision system is in its Online mode of operation.

The vision system was placed in Online mode from the GUI, but a communication protocol (such as ProfiNET, EtherNet/IP or Native Mode) is holding the vision system Offline. For example, a Native Mode Set Online command, SO0, has been issued telling the vision system to go Offline. The Set Online command, SO1, must be sent to the vision system to allow it to go Online.

Note: The application will send Set Online commands to vision systems to perform administrative functions such as Backup and Restore. For more information, see Backup Dialog and Restore From Dialog.

The vision system was placed in Online mode from the GUI, but a Discrete Input line, configured as an Online/Offline Type, is set low (0). The vision system will wait for the Discrete Input signal to change states before proceeding to Online mode.
Tip: You can configure the active vision system to boot into Online mode in the Startup dialog. For more information, see Startup Dialog.

Online Mode

When the vision system is Online, the following operations are allowed:

  • Send/receive data to/from the job over the network using network I/O functions. For more information, see Network Functions.
  • Send/receive data to/from the job over a serial port using Text, Native, DeviceNet, and Motoman modes. For more information, see Serial Port Settings Dialog.
  • Respond to Camera, External and Network image acquisition triggers.

  • Reading and writing discrete I/O.

  • Printing the spreadsheet.
  • Printing the Results Table of an EasyBuilder job.
  • Displaying images using the Record/Playback option (the image acquisition trigger must be set to Manual).

When the vision system is Online, the following actions are prohibited:

  • Saving and opening jobs or images (unless the image acquisition trigger is set to Manual, which permits opening of images while Online).

    Note: If the Allow Online Job Save checkbox on the User dialog is enabled, users with Full or Protected access are allowed to save jobs while Online. For more information, see User Access Settings Dialog.
  • Editing, moving, copying or pasting cells in the spreadsheet.
  • Editing, copying or pasting tools in an EasyBuilder job.
  • Accessing any vision system-specific menu items, except for placing the vision system Offline.
  • Interactive Graphics Mode when in the Spreadsheet view (except for EditRegion functions, which can be modified when the vision system is Online). For more information, see Interactive Graphics Mode.

Offline Mode

When the vision system is Offline, it cannot respond to an acquisition trigger or send/receive data to/from the job; however, the vision system can still respond to selected serial, network and discrete input commands that specifically toggle the Online state.


Network Settings Dialog

The Network Settings dialog configures the active In-Sight vision system to communicate on a TCP/IP network.

Note:
  • If you choose not to restart an In-Sight vision system after modifying its network settings, In-Sight Explorer will not reflect the modifications until the vision system has been rebooted, despite the fact that the Network Settings dialog reports the new configuration.
  • In-Sight emulators inherit their network settings from Windows; these settings cannot be changed within In-Sight Explorer. To modify an emulator's network settings, open the network applet in the Windows Control Panel and make the desired change.
  • In-Sight automatically allocates EtherNet/IP multicast addresses from the IPv4 Organization Local Scope: 239.192.0.0/14.

Network Settings Dialog Controls

To display the Network Settings dialog, click Network Settingsfrom the Sensor menu.

When connected to an In-Sight vision system/sensor running firmware version 5.7.3 or later, the following options are available.

When connected to an In-Sight vision system/sensor running firmware version 5.7.0 or later, the following options are available:

When connected to an In-Sight vision system/sensor running firmware version 5.3.0 or later, the following options are available:

When connected to an In-Sight vision system running firmware version 5.2.x or earlier, the following options are available:

  • Host Name: Specifies the name of the networked In-Sight device. Each device has its host name set automatically the first time it boots. You can change the host name by entering a new name into the field. Host names can contain a maximum of 63 characters. Valid characters for the host name are A–Z (upper and lowercase), 0 - 9, hyphen ('-'), colon (:), period ('.') and underscore ('_').

    • The default naming convention is as follows: "is" for "In-Sight", the model number, an underscore and the last 6 characters of the vision system's unique Media Access Control (MAC) address.

      The MAC address is a hardware address that identifies a specific node of a network. Every In-Sight vision system has a unique MAC address assigned to it, which cannot be changed. For example, 00-d0-24-01-02-03. To locate the MAC address of an In-Sight vision system, look at the serial number label affixed to the vision system. Alternately, you can open the About In-Sight Explorer dialog. For more information, see About In-Sight Explorer Dialog.

      For example, the host name of an In-Sight 7802 vision system with the MAC address of 00-d0-24-01-02-03 is "is7802_010203". The host name can be changed by entering a new name into the field.

    • If the local system is a networked PC running an In-Sight emulator, the host name is automatically inherited from the computer's name as defined in the Windows operating system.

Use DHCP Server

  • Use DHCP Server: Specifies that the In-Sight vision system will be configured dynamically by the DHCP server on startup. For more information, see Dynamic Host Configuration Protocol (DHCP) Server.
    • IP Address: Assigns a unique identifier for each In-Sight vision system on the network, which must be consistent with the IP address-numbering scheme of the local network.

    • Subnet Mask: Defines which part of the IP address refers to the network and which part refers to the host. The network part of the IP address is the same for all hosts on the same subnet, and the remainder is unique to each host.

      There are three classes of subnet masks. The class of a particular subnet on a network is defined by the number of bits used to represent the network and host address portions in the IP address, as in the table below:

      Class Subnet Mask Network Address Host Address

      A

      255.0.0.0

      8 bit

      24 bit

      B

      255.255.0.0

      16 bit

      16 bit

      C

      255.255.255.0

      24 bit

      8 bit

      For example, consider a networked In-Sight host system with the IP address 192.168.0.1. If the first three numbers (192.168.0) identify the 24-bit network address, and the last number (1) is the 8-bit address for the In-Sight host on the network, then the subnet mask for this host is 255.255.255.0.

    • Default Gateway: Specifies the IP address of the gateway host, if available on the network. The gateway host is responsible for relaying data between hosts on different networks. If an In-Sight device needs to communicate with a device on a different subnet, enter the address of the gateway device in the Default Gateway field. Otherwise, leave the field blank.
    • DNS Server: Specifies the IP address of the host on the network providing DNS resolution, if available. For more information, see Domain Name Service (DNS) Server.
    • Domain Name: Specifies the network domain for the host network. Domain names can contain a maximum of 63 characters. For more information, see About Domains.

    • DHCP Timeout: Specifies the time (5 to 180 seconds; default = 60) an In-Sight vision system will wait for a DHCP server to respond with an available IP address, when the vision system is configured for DHCP. If the vision system times out, network communication will be suspended. The vision system will not attempt to connect to the network again until power is cycled on the vision system.

      Tip: If the In-Sight vision system is not going to be connected to a network, specifying the minimum time of 5 seconds will reduce boot-up time of the vision system; the vision system must be configured for DHCP.

Link

  • Link Speed: Specifies the Ethernet speed and duplex mode between the vision system and the network device.

    CAUTION: If the network device is not configured to support the specified link speed, the vision system will not be reachable; configure the network device's Ethernet settings to match that of the vision system.
    • Auto-Negotiate (default): The vision system and network device communicate to choose the fastest Ethernet speed and duplex mode supported by both devices.
    • 10 Mbps Half Duplex: Ethernet speed is fixed to 10 megabits per second and data can only be sent or received at a given time.
    • 10 Mbps Full Duplex: Ethernet speed is fixed to 10 megabits per second and data can be sent and received at a given time.
    • 100 Mbps Half Duplex: Ethernet speed is fixed to 100 megabits per second and data can only be sent or received at a given time.
    • 100 Mbps Full Duplex: Ethernet speed is fixed to 100 megabits per second and data can be sent and received at a given time.

    • 1000 Mbps Full Duplex: Ethernet speed is fixed to 1000 megabits per second and data can be sent and received at a given time.

      Note: The 1000 Mbps Full Duplex option is only available for vision systems that support 1000 Mbps Ethernet speeds. For In-Sight 5600 series vision systems, it is only available on models with 128MB non-volatile flash memory or higher.
  • Current Speed: Displays the vision system's current Ethernet link speed and duplex mode (full or half).

Telnet

Specifies the vision system's telnet settings.

  • Telnet Port: Assigns the telnet port on which the active In-Sight vision system (a TCP/IP server waiting for communication) listens for incoming requests from a remote device (a TCP/IP client that initiates communication). A valid port assignment is any unused number between 1 and 65535, excluding ports reserved for In-Sight communications. For more information, see In-Sight Ports.

Industrial Ethernet Protocols

Enables or disables specific Ethernet protocols on In-Sight vision systems. When using an Industrial Ethernet protocol, set Robots to None.

Note:
  • If you are using EasyBuilder, you need to add and configure the Industrial Ethernet Device settings in the Communication application step. Otherwise, the Format Output Buffer settings are not configured and you will not get any result data. For more information, refer to the Device Setup topic in the EasyBuilder Help (Communication > Device Setup).
  • If you are using Spreadsheet, you need to enable the Industrial Ethernet protocol using this dialog. When selected protocol is PROFINET, SLMP Scanner, POWERLINK or Modbus TCP Server, you also need to configure the settings using the Settings button.
  • The EtherNet/IP, PROFINET, SLMP Scanner, POWERLINK and Modbus TCP Server protocols are mutually exclusive; therefore, protocols cannot be enabled at the same time.

  • EtherNet/IP: Enables the EtherNet/IP service on the vision system. Once selected, enables the Settings button to the right of the option, which launches the EtherNet/IP Settings dialog to configure the Enable User Data Bypass setting. Check the Enable User Data Bypass checkbox to bypass the cached data and read the raw user data directly. By default, this setting is disabled.

    Note: The Settings button next to the EtherNet/IP option is only available on In-Sight vision systems running In-Sight firmware 5.4.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  • PROFINET: Enables the PROFINET service on the vision system. Once selected, enables the Settings button to the right of the option, which launches the PROFINET Settings dialog to configure settings. For more information, see PROFINET Settings dialog.

    Note: POWERLINK is only supported by In-Sight 70xx - 74xx series vision systems running In-Sight firmware version 4.7.2 or later, and In-Sight Explorer software version 4.7.2 or later. It is not supported with firmware version 5.1.0 or later.
  • SLMP Scanner: Enables the SLMP Scanner service on the vision system. Once selected, enables the Settings button to the right of the option, which launches the SLMP Scanner Settings dialog to configure settings. For more information, see SLMP Scanner Settings Dialog.
  • CC-Link IE Field Basic: Enables the CC-Link IE Field Basic protocol on the vision system. Once selected, enables the Settings button to the right of the option, which launches the CC-Link IE Field Basic Settings dialog to configure the User Data Bypass setting. For more information, see CC-Link IE Field Basic Settings Dialog.
  • POWERLINK: Enables the POWERLINK protocol on the vision system. Once selected, enables the Settings button to right of the option, which launches the POWERLINK Settings dialog to configure settings.

  • Modbus TCP Server: Enables the Modbus TCP Server service on the vision system. Once selected, enables the Settings button to the right of the option, which launches the Modbus TCP Server Settings dialog to configure settings. For more information, see Modbus TCP Server Settings Dialog.

    Note: This option is only available on In-Sight vision systems running In-Sight firmware version 5.3.0 or later.
  • None: Disables the Industrial Ethernet protocol on the vision system.

  • Enable iQ Sensor Solution: Enables or disables the iQ Sensor Solution on In-Sight vision systems. For more information, see Communicate with a Mitsubishi Automation Controller via iQ Sensor Solution.

    Note:
    • iQ Sensor Solution is only available on In-Sight vision systems using In-Sight firmware 4.x.x.
    • Do not change the Network settings simultaneously in iQSS (GXWorks) and the Network Settings dialog.

Modbus TCP Server Enable

  • Modbus TCP Server Enable: Enables or disables the In-Sight vision system to act as a Modbus/TCP server; multiple simultaneous connections are supported, as well as a configurable session idle timeout. When configured as a Modbus/TCP server, the vision system maintains a running count of the number of clients it will allow to connect. For each new established connection, the server subtracts from the maximum allowed connections until the count reaches zero, and any subsequent connection requests will be explicitly rejected. The server will only accept subsequent connection requests when the existing clients either explicitly close their connections or have their connections implicitly closed due to an idle timeout.

    Note:
    • The Modbus TCP Server Enable checkbox, Max Connections and Idle Timeout controls in the Protocol Services group box are only available on In-Sight vision systems running 4.x.x firmware. If using In-Sight vision systems running firmware version 5.3.0 or later, see Modbus TCP Server in the Industrial Ethernet Protocols group box.
    • When enabled, it is recommended that the maximum number of connection limits be set to 2x (two times) the number of Modbus/TCP connections that the application actually requires. This is done so that in the event of a power failure or a client reboot, all connections can be re-established without having to wait for the old connections to timeout.
    • Max Connections: Specifies the maximum number of simultaneous connections the vision system will support. (1 to 6 connections; default = 4)
    • Idle Timeout: Specifies the amount of time since the last issued Modbus/TCP request was received by the server from a client before that session is declared as idle. (0 to 3600 seconds; default = 120 seconds) The Modbus/TCP server checks all connected sessions every 500ms to determine if any session idle time limits have been reached. For all idle sessions, the Modbus/TCP server issues a socket close command and reclaims any resources allocated to the idle session.
    • Enable User Data Bypass: Check this checkbox to bypass the cached data and read the raw user data directly. By default, this setting is disabled.

Robots

Enables or disables specific Robot controller communication on In-Sight vision systems. When using a Robot controller, set Industrial Ethernet Protocol to None.

Note: The In-Sight 2000 series vision sensor does not support robot controllers.
  • None: Disables the Robot controller communication on the vision system.
  • Mitsubishi: Enables the Mitsubishi Robot controller communication on the vision system. Once selected, enables the Settings button to the right of the option, which launches the SLMP Scanner Settings dialog to configure settings. For more information, see SLMP Scanner Settings Dialog.

Automatically Configure an In-Sight Vision System via DHCP

If your network uses a DHCP server to assign IP addresses, select the Use DHCP Server checkbox. The active In-Sight vision system is configured dynamically by the DHCP server on startup. For more information, see Dynamic Host Configuration Protocol (DHCP) Server and Dynamic IP Address.

Optionally, a new host name and DHCP timeout can be assigned, but all other fields in the Network Settings dialog will be disabled. When a large number of vision systems are present, this setup is often preferred to entering configuration settings manually for every vision system. After initial setup, disabling DHCP on the vision system(s) and assigning a static IP address is strongly recommended.

If the Use DHCP Server checkbox is unchecked, then the network settings for the active In-Sight vision system must be configured manually.

Manually Configure an In-Sight Vision System for a Non-DHCP Network

  1. Deselect the Use DHCP Server checkbox, if it is currently selected.

    Note: If the In-Sight vision system previously had its network settings configured manually, those settings are automatically restored after you deselect the Use DHCP Server checkbox.
  2. Enter an IP Address.
  3. Enter a Subnet Mask.
  4. Optionally, configure the Host Name, Default Gateway, DNS Server and Domain Name.
  5. Click OK.
  6. You will be prompted to cycle power on the vision system so that any configuration changes can take effect.


Date/Time Settings Dialog

The Date/Time Settings dialog is used to establish the date and time on the active In-Sight vision system and configure the vision system to use CIP-Sync and the Precision Time Protocol (PTP), defined by the IEEE 1588 (version 2) standard. This synchronizes events between an In-Sight vision system and an external device, such as a PLC, over non-deterministic EtherNet/IP. You can also establish a local time zone and enable automatic clock adjustments for Daylight Saving Time. Automatic synchronization of the vision system's internal clock is allowed using a connection to a Simple Network Time Protocol (SNTP) server, a protocol for synchronizing the date and time of an In-Sight vision system to that of a remote server, which maintains reliably updated date and time information. For more information, see Configure Time Synchronization.

Note:
  • After any changes are made within the Date/Time Settings dialog, the power must be cycled on the active In-Sight vision system.
  • Selecting Use Time Synchronization automatically disables SNTP Services, and enabling SNTP Services automatically disables Time Synchronization. Only one service may be enabled on a vision system.
  • The Date/Time Settings dialog is disabled for emulators.
  • The Date/Time Settings dialog is not available on firmware revisions prior to 2.40.
  • If an In-Sight vision system is configured to utilize SNTP and a discrete output line is configured to Job Complete, while the vision system is Online, the Job Complete signal will be sent when the SNTP synchronization occurs. For more information, see Configure Discrete I/O Lines.

Date/Time Settings Dialog Controls

To display the Date/Time Settings dialog, click Date/Time Settings from the Sensor menu.

  • Date: Displays the active In-Sight sensor's current date. Allows manual adjustment of the date on the active In-Sight sensor.

  • Time: Displays the active In-Sight sensor's current time. Allows manual adjustment of the time on the active In-Sight sensor.

    Note: If an SNTP server is not located when the In-Sight system's power is cycled, then the initial date and time will be set to Thursday, January 01, 1970 and 12:00:00 AM respectively.
  • Time Zone: List of all time zones.
  • Automatically Adjust for Daylight Saving Changes: Accounts for Daylight Saving time changes.

  • Use Time Synchronization: Enables support for CIP-Sync and the Precision Time Protocol (PTP), defined by the IEEE 1588 (version 2) standard, to synchronize events between an In-Sight vision system and an external device, such as a PLC, over non-deterministic Ethernet. The IEEE 1588 specification for PTP allows devices to synchronize their local clocks to a master clock on a non-deterministic network. After enabling Time Synchronization, the vision system must be power cycled to initiate the use of PTP and for the vision system's date and time setting's to be synchronized to the master. Also, after enabling and power cycling the vision system, the AcquireImage function's Trigger parameter can be set to Timestamp to allow the vision system to be triggered via a timestamp sent over EtherNet/IP. CIP-Sync/PTP is supported on the following vision systems:

    • In-Sight 5000 series vision systems with 128MB non-volatile flash memory and running firmware version 4.5.0 or later

      Note: The In-Sight 5605 vision system (Hardware Type 821-0032-1R), In-Sight 5705 vision system and In-Sight 5705C vision systems are not supported.
    • In-Sight 7000 Gen2 series vision systems
    • In-Sight 9000 series vision systems
    Note: For more information about setting up and configuring In-Sight vision systems for use with PTP, see Configure Time Synchronization.
  • Synchronization Details: Click this button to launch the Time Synchronization Details dialog, which provides read-only, detailed information about the PTP stack.

  • Use SNTP Services: If this checkbox is selected, the active In-Sight sensor will automatically attempt to synchronize its date and time to an SNTP server. If this checkbox is cleared, or no SNTP server is available, then the date and time can be set manually.

    Note: Time synchronization may fail if the default gateway is not properly configured when an In-Sight sensor is assigned a static IP address. For more information, see Network Settings Dialog.
  • Synchronize: Click this button to synchronize the date and time to an SNTP server. Synchronizing the date and time will override manual settings.

  • Update Frequency: Specifies a recurrent period of time (in minutes) for synchronizing the date and time to an SNTP server. The default Update Frequency is 120 minutes. Enter a smaller value to synchronize more frequently; the smallest Update Frequency allowed is every 15 minutes. Enter a larger value to synchronize less frequently; the largest Update Frequency allowed is 1440 minutes, or once per day.

    Note: Most In-Sight sensors experience a clock drift (gain) of approximately 15 seconds in a 12 hour period.

  • Locate Using DHCP: When this checkbox is selected, the active In-Sight sensor will attempt to connect to the SNTP server provided by a DHCP server. If an SNTP server is not given by a DHCP server, or a DHCP server cannot be located, then the Preferred and Alternate servers will be tried in succession.

    If an SNTP server is not specified by the DHCP server, and the Preferred and Alternate servers are not specified, the In-Sight sensor will attempt to locate an SNTP server on the network. If this checkbox is cleared, then only the Preferred and Alternate SNTP servers will be used.

  • Preferred: Specifies the IP Address or Host Name of the primary SNTP server, for use when the Locate Using DHCP checkbox is cleared or the DHCP server cannot locate an SNTP server. If the Preferred SNTP server is not available, the Alternate server will be used.
  • Alternate: Specifies the IP Address or Host Name of the secondary SNTP server, for use when the Locate Using DHCP checkbox is cleared and the Preferred SNTP server is not available.
  • Located: Displays the IP address of the located SNTP server, if any. Otherwise, displays 0.0.0.0.


Configure Time Synchronization

This topic covers how to configure an In-Sight vision system to use CIP-Sync and the Precision Time Protocol (PTP), defined by the IEEE 1588 (version 2) standard, to synchronize events between an In-Sight vision system and an external device, such as a PLC, over non-deterministic Ethernet.

Note:
  • Before enabling CIP-Sync and PTP on the In-Sight vision system, the environment where the vision system will be installed in must already have PTP implemented.
  • Enabling Time Synchronization will add 2 to 2.5% additional processing time to the overall job execution time.
  • In-Sight timestamp accuracy is 8 nanoseconds.
  • When using "Trigger at Time X" functionality, the trigger will occur ± 5 microseconds from the set time, provided the network is configured with the same CIP-Sync and PTP standards. If this is not the case, the trigger could occur up to 100 microseconds from the set time (in a worst case scenario).

Enable Time Synchronization on an In-Sight Vision System

Local Clock Information

Return the Acquisition Timestamp

Send Timestamps to the PLC

Triggering an In-Sight Vision System Using Timestamps Over EtherNet/IP

Trigger Multiple Acquisitions Using Timestamps


Host Table Dialog

The In-Sight Host Table allows In-Sight vision systems on different networks (subnets) to communicate with one another. Host Table entries do not actually change the network settings of hosts at the specified IP addresses; these entries simply appear as additional vision systems to the active In-Sight vision system.

CAUTION: Vision systems that are configured using DHCP cannot be guaranteed to have a specific IP address. Since the Host Table requires a fixed IP address in order to communicate with a vision system, Cognex strongly recommends that you set up any vision systems on different subnets with static IP addresses.
Note:
  • The Host Table may be shared with other In-Sight vision systems via FTP upload of the hosts.net file to the target system from an In-Sight emulator. Each line of the uploaded file must follow the format, "xxx.xxx.xxx.xxx host_name", where "xxx.xxx.xxx.xxx" is any valid IP address. Blank lines, incomplete lines, and lines preceded by the '#' character are ignored. Characters following the host name are also ignored. The file may also be downloaded via FTP, but the format of the original uploaded file is not preserved.
  • The Update Firmware dialog does not support updating the firmware on In-Sight vision systems that are on different networks and added to In-Sight Explorer using In-Sight Host Table. The firmware on vision systems on different networks that are added to In-Sight Explorer using Explore Remote Subnet List can be updated; however, Cognex recommends to place vision systems on local network when updating firmware to avoid any network failure.

Host Table Dialog Controls

To display the In-Sight Host Table dialog, click Host Table from the Sensor menu.

  • Add: Creates a new entry in the host table. After clicking Add, you are prompted with the Add Host dialog, where you enter the host name and IP address of the new host:

    Note:
    • Valid characters for the Host Name are A-Z (upper and lowercase), 0-9, hyphen ('-'), colon (:), comma (',') and underscore ('_').
    • Host Names can contain a maximum of 63 characters.

  • Edit: Modifies an existing host table entry. Select an entry from the list and click Edit. You are prompted with the Edit Host dialog, where you can change the host name or IP address of the selected host.

  • Delete: Removes host(s) from the host table. Select the host(s) that you wish to remove and click Delete.

    Tip: Delete multiple hosts by holding down the CTRL key while selecting the host names.
  • Favor Host Table over DNS: When selected, this checkbox specifies that the search order for In-Sight host names is (1) host table, (2) network browser, and (3) DNS. When cleared, the host name search order is (1) network browser, (2) DNS, and (3) host table.

Host Parameters

  • Host Name: The name of the networked In-Sight vision system to map (or assign) to the specified IP address. Host names specified within the Host Table are only accessible by the active In-Sight vision system.
  • IP Address: The IP address of the networked In-Sight vision system to map to the specified host name.


FTP Settings Dialog

The FTP Settings dialog configures an In-Sight sensor to share jobs, images and settings with other network devices that use the File Transfer Protocol.

Users typically do not need to modify the default settings on dedicated, local In-Sight networks where all FTP connections will occur between In-Sight sensors. However, if FTP connections are needed between In-Sight sensors and other network servers, or between In-Sight sensors on different networks, then the default FTP settings may need to be changed.

FTP Settings Dialog Controls

To display the FTP Settings dialog, click FTP Settingsfrom the Sensor menu.

  • Idle Timeout: The length of time (in seconds) that a connection from another host to this In-Sight sensor may be left open without any activity, before the connection times out (disconnects). (Default = 120)

  • Read Timeout: The length of time (in seconds) that the active In-Sight sensor waits for data after connecting to a remote FTP server; this value is used to recover from an unresponsive peer. (Default = 120)

  • Connection Retry: The number of times the In-Sight sensor tries to reconnect to a remote FTP server (if the initial connection attempt was unsuccessful). (Default = 1)

  • Local Port: The local port is the port on which the active In-Sight sensor listens for incoming FTP connections. (Default = 21)

    Local Port Example: An In-Sight sensor named is5100_010203 has its Local Port set to 442. is5100_010203 is acting as an FTP server and is listening on port 442 for incoming connections from remote sensors. Any In-Sight sensor or emulator that connects to is5100_010203 will need its Remote Port set to 442. In order for In-Sight Explorer to view Files on is5100_010203, the Explorer FTP Port must be set to 442.

    WARNING: If the Local Port is not set to the same value as the Explorer FTP Port, then In-Sight Explorer may not be able to perform file operations on the In-Sight sensor such as Backup, Restore, Firmware Update, or view the files in the In-Sight Files pane.

  • Remote Port: The remote port is the port to which the active In-Sight sensor attempts to connect on other In-Sight systems or FTP servers. (Default = 21)

    Remote Port Example: Assume that an In-Sight sensor named FLOOR1 needs to load a job file from a remote In-Sight sensor named FLOOR2. FLOOR2 has its Local Port set to 2360; in other words, FLOOR2 is running a FTP server on port 2360. In this case, FLOOR1 would need its Remote Port set to 2360 in order to connect to FLOOR2 and to load the job file.

  • Passive Transfers: When selected, this checkbox enables passive FTP client transfers, which may be required when In-Sight sensors need to access an FTP server through a firewall that does not allow connections to be initiated from the outside. (Default = not selected)


Job Server Settings Dialog

The Job Server Settings dialog is used to configure an FTP server that hosts In-Sight job files for the In-Sight vision system. This allows another device, such as a PLC or robot controller, to change jobs without specifying a location via the LF and TF Native Mode commands. For more information, see Load File and Store File.

Note:
  • The Job Server Settings dialog has been tested with FileZilla FTP server software.
  • If a connection is made to a vision system that has been configured to use the Remote Job Server from an older version of In-Sight Explorer (e.g. In-Sight Explorer 4.9.1 or earlier), In-Sight Explorer will default to the vision system's file system. This will also occur if a connection is made via a VisionView Operator Interface Panel.
  • Job native mode commands (Set Job, Get Job, Delete Job, Store Job and Write Job) cannot be used for a job saved in the Job Server.

Configure the Job Server

  1. From the Sensor menu, click Job Server Settings.

  2. In the Job Server Settings dialog, check the Enable Job Server checkbox to enable the Server, Server Port, Username, Password and Directory fields.

  3. Enter the Server, Server Port, Username and Password of the FTP server. Optionally, enter a Directory name (or directory path) on the FTP server for saving or loading jobs.

    Note:
    • The user must have write/read permissions to the FTP server.
    • When an In-Sight emulator is specified as the Server:
      • Jobs are saved to or loaded from the Emulator directory (C:\ProgramData\Cognex\Emulators\x.x.x). For more information, see Emulation Panel.
      • The Directory field is not supported.
    • The Username is case-sensitive, and its length cannot exceed 63 characters.
    • The Password is case-sensitive, and its length cannot exceed 127 characters.
    • The entire FTP path (ftp://Username:Password@Server:PortNumber/Directory) cannot exceed 208 characters.

  4. Click OK. The In-Sight vision system is now connected to the Job Server for loading and saving jobs.

    Note:
    • For more information on manually saving or loading jobs using the Job Server, see Save & Open Dialogs.
    • For more information on automatically loading a job from the Job Server at startup, see Startup Dialog.

Save or Load a Job via Native Mode Command

Once the Job Server is enabled, the In-Sight vision system automatically uses the Job Server for saving or loading jobs when the TF or LF Native Mode commands is issued. For example, after enabling the Job Server, when the command LFProduct.job is issued, the LFProduct.job file stored in the Job Server is loaded to the vision system.

Note: For more information on the TF and LF Native Mode commands, see Store File and Load File.

Disable the Job Server

  1. From the Sensor menu, click Job Server Settings.

  2. In the Job Server Settings dialog, uncheck the Enable Job Server checkbox to disable the Server, Server Port, Username, Password and Directory fields.
  3. Click OK. The In-Sight vision system is now disconnected from the Job Server.


Serial Port Settings Dialog

The Serial Port Settings dialog configures the active In-Sight vision system for serial communications. Input strings are read into the spreadsheet over the serial port using the ReadSerial function. Output strings are sent from the spreadsheet over the serial port using the WriteSerial function.

Note:
  • The vision system must be Online to send/receive serial data.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
  • The CIO-WENET Ethernet I/O module does not support serial communication.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Configure the Serial Port Settings

  1. On the Sensor menu, click Serial Port Settings.

  2. If connected to an I/O module, click the I/O Module button to open the I/O Module Configuration dialog and configure the I/O module. Press the OK button to close the I/O Module Configuration dialog and return to the Serial Port Settings dialog.

    Note:
    • After the first successful connection between the vision system and an I/O module, an "(attached)" message is displayed next to the I/O module that is physically attached to the sensor.
    • If CIO-MICRO, CIO-MICRO-CC or CIO-WENET is the selected I/O module, when the OK button is clicked, the vision system attempts to establish EtherNet/IP communication with the module, using the specified IP address. If the IP address does not exist on the network, if EtherNet/IP is not enabled on the module, or if another device already has an EtherNet/IP connection to the module, an error message will appear.

  3. Configure the serial settings. The available settings are listed in the following table:

    Feature Direct I/O / CIO-1350 CIO-1400 CIO-14501 CIO-14601 CIO-MICRO CIO-MICRO-CC CIO-WENET1

    Baud Rate2

    4800

    9600

    19200

    38400

    57600

    115200

    2400

    4800

    9600

    19200

    38400

    57600

    115200

    1200

    2400

    4800

    9600

    19200

    38400

    57600

    115200

    1200

    2400

    4800

    9600

    19200

    38400

    57600

    115200

    4800

    9600

    19200

    38400

    57600

    115200

    4800

    9600

    19200

    38400

    57600

    115200

    Disabled

    Data Bits

    7, 8

    8

    7, 8

    7, 8

    7, 8

    7, 8

    Disabled

    Stop Bits

    1, 2

    1

    1, 2

    1, 2

    1, 2

    1, 2

    Disabled

    Parity

    None

    Even

    Odd

    None

    Even

    Odd

    None

    Even

    Odd

    None

    Even

    Odd

    None

    Even

    Odd

    None

    Even

    Odd

    Disabled

    Handshake

    None

    Xon/Xoff

    Hardware

    None

    Xon/Xoff

    Hardware

    None

    Xon/Xoff

    Hardware

    None

    Xon/Xoff

    Hardware

    None

    Xon/Xoff

    Hardware

    None

    Xon/Xoff

    Hardware

    Disabled

    Mode

    Text
    Native

    DeviceNet

    Motoman

    Kuka

    Unused

    Text
    Native

    DeviceNet

    Motoman

    Kuka

    Unused

    Text
    Native

    DeviceNet

    Motoman

    Kuka

    Unused

    Text
    Native

    DeviceNet

    Motoman

    Kuka

    Unused

    Text
    Native

    DeviceNet

    Motoman

    Kuka

    Unused

    Text
    Native

    DeviceNet

    Motoman

    Kuka

    Unused

    Disabled

    1The CIO-1450, CIO-1460 and CIO-WENET I/O modules are obsolete and no longer available for purchase, however these modules are still supported within In-Sight Explorer for backward compatibility only.

    2DeviceNet supports a maximum Baud Rate of 57600.
  4. Click the OK button.

Serial Port Settings Dialog Controls

  • Baud Rate: 1200, 2400, 4800, 9600, 19200, 38400, 57600 or 115200.

    Note: DeviceNet supports a maximum Baud Rate of 57600.
  • Data Bits: 7 or 8.
  • Stop Bits: 1 or 2.
  • Parity: None, Even, or Odd.

  • Handshake: None, Xon/Xoff, or Hardware.

    Note:
    • The Handshake drop-down menu is always enabled, regardless of the configuration. Most In-Sight vision systems only support hardware handshaking if the vision system is connected to an I/O Module. Please refer to your vision system's installation manual to determine the physical connection requirements needed to enable hardware handshaking.
    • If a large amount of data is to be transmitted, it is recommended that the Handshake parameter be set to Xon/Xoff to ensure that handshaking is used and data is not lost.

  • Mode: Sets the serial protocol to use.

    Mode

    Description

    Text

    Standard ASCII protocol for sending/receiving text strings.

    Native

    Custom ASCII protocol for controlling In-Sight from any remote serial device.

    DeviceNet

    Protocol for communicating with Allen-Bradley PLC.

    Note: The DeviceNet setting requires a third-party RS-232-to-DeviceNet Gateway adapter. This setting is available for legacy installations and should not be used in new applications, unless the RS-232-to-DeviceNet Gateway converter has been thoroughly tested to verify it is suitable for the application.

    Motoman

    Protocol for communicating with Motoman MRC, MRC-II, and XRC robot controllers operating in DCI mode.

    Kuka

    Protocol for communicating with Kuka KR C2 and KR C2 Edition 2005 robot controllers.

    Unused

    Closes the serial port so that no commands or data can be sent or received.
  • Details: When Mode is set to DeviceNet, Native Mode, or Text Mode, the Details portion of the dialog will display, allowing you to configure input/output terminator characters and data packet sizes specific to the selected Mode.

Text Mode Details

The Text Mode Details defines the terminator characters to use for text-mode serial communications. These details are available only when Mode is set to Text.

  • Fixed Input Length: Reads a fixed number of characters before triggering an event.
  • Input Terminator: The ASCII value interpreted by In-Sight as the end of an incoming string. The default is 13 (carriage return). Input Terminator is disabled if Fixed Input Length is selected.
  • Output Terminator: The ASCII value that In-Sight adds to each output string to mark the end of the transmitted string. The default is -1; -1 specifies "CRLF" (carriage return/line feed), and 0 specifies "no terminator".

Native Mode Details

The Native Mode Details sets the terminator characters for Native Mode serial communications. These details are available only when Mode is set to Native.

  • Fixed Input Length: Reads a fixed number of characters before triggering an event.
  • Input Terminator: The ASCII value interpreted by In-Sight as the end of an incoming string. The default is 13 (carriage return). Input Terminator is disabled if Fixed Input Length is selected.
  • Output Terminator: The ASCII value that In-Sight adds to each output string to mark the end of the transmitted string. The default is -1; -1 specifies "CRLF" (carriage return/line feed), and 0 specifies "no terminator".

DeviceNet Details

The DeviceNet Details sets the packet size for DeviceNet connections to an In-Sight vision system using the optional DeviceNet Interface Module. These details are available only when Mode is set to DeviceNet.

  • Input Packet Size: Sets the expected packet size to be received through the DeviceNet Interface Module, in bytes. The setting must agree with the MaxWidth value in the RS232-to-DeviceNet configuration.

  • Output Packet Size: Sets the packet size to send out through DeviceNet Interface Module, in bytes. The setting must agree with the Transmit Width value in the RS232-to-DeviceNet configuration.

  • Trigger On First Byte: Triggers an acquisition when the first byte is received. The Trigger parameter must be set to External in the AcquireImage property sheet.

    Note: When Trigger on First byte is enabled, and the In-Sight vision system is triggered, a previous image may be displayed and cell data may display data from the previous spreadsheet update.


CC-Link Settings Dialog

The CC-Link Settings dialog configures the active In-Sight vision system for CC-Link communications using a CIO-MICRO-CC I/O module. Input data is read into the spreadsheet using the ReadCCLinkBitBuffer and ReadCCLinkWordBuffer functions. For more information, see ReadCCLinkBitBuffer and ReadCCLinkWordBuffer. Output data is written from the spreadsheet to the CC-Link network using the WriteCCLinkBitBuffer and WriteCCLinkWordBuffer functions. For more information, see WriteCCLinkBitBuffer and WriteCCLinkWordBuffer.

Note:
  • CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Refer to the In-Sight® CIO-MICRO & CIO-MICRO-CC I/O Modules Installation Manual for CC-Link wiring configurations.

Display the CC-Link Settings Dialog

  1. On the Sensor menu, click CC-Link Settings.

  2. Click the I/O Module button to open the I/O Module Configuration dialog and configure the I/O module. Press the OK button to close the I/O Module Configuration dialog and return to the CC-Link Settings dialog. For more information, see I/O Module Configuration.

    Note:
    • After the first successful connection between the vision system and an I/O module, an "(attached)" message is displayed next to the I/O module that is physically attached to the sensor.
    • If CIO-MICRO, CIO-MICRO-CC or CIO-WENET is the selected I/O module, when the OK button is clicked, the vision system attempts to establish EtherNet/IP communication with the module, using the specified IP address. If the IP address does not exist on the network, if EtherNet/IP is not enabled on the module, or if another device already has an EtherNet/IP connection to the module, an error message will appear.
  3. Configure the CC-Link settings.

CC-Link Settings Dialog Controls

  • Version: V1, V2.
  • Baud Rate: 10M, 5M, 2.5M, 625K, 156K.
  • Station Number: 1 - 64.
  • Number of Stations: 1 - 4. If set to 1, Inputs and Outputs are 16 bits. If set to 2, Inputs and Outputs are 48 bits. If set to 3, Inputs and Outputs are 80 bits. If set to 4, Inputs and Outputs are 112 bits.
  • Extension Cycles: 1X (Disabled), 2X, 4X, 8X.


Discrete I/O Settings

The Discrete I/O Settings dialog is used to configure the digital input and output lines on an In-Sight vision system.

Note:
  • Discrete input signals can also be read into the In-Sight spreadsheet using the ReadDiscrete function. For more information, see ReadDiscrete.
  • Discrete output signals can also be written out from the spreadsheet using the WriteDiscrete function or the Waveform functions, WriteWaveformPulseTrain and WriteWaveformClocked. For more information, see WriteDiscrete, Waveform Functions, WriteWaveformPulseTrain and WriteWaveformClocked.

Configure Discrete I/O Lines

I/O Module Configuration

Discrete Output Details

Number of Input and Output Lines

Default Input and Output Lines


Configure Discrete I/O Lines

  1. From the Sensor Menu, click Discrete I/O Settings.

  2. Optionally, click I/O Module to open the I/O Module Configuration dialog and configure the I/O module. Once configured, press the OK button to close the I/O Module Configuration dialog and return to the Discrete I/O Settings dialog. For more information, see I/O Module Configuration.

    Note:
    • After the first successful connection between the vision system and an I/O module, an "(attached)" message is displayed next to the I/O module that is physically attached to the sensor.
    • If CIO-MICRO, CIO-MICRO-CC or CIO-WENET is the selected I/O module, when the OK button is clicked, the vision system attempts to establish EtherNet/IP communication with the module, using the specified IP address. If the IP address does not exist on the network, if EtherNet/IP is not enabled on the module, or if another device already has an EtherNet/IP connection to the module, an error message will appear.
  3. Select an input or output line to configure. The default settings vary depending on the In-Sight vision system being configured and the type of I/O module connected to the vision system:
    • In-Sight Micro 1000 Series I/O Lines
    • In-Sight 5000 Series I/O Lines
    • In-Sight 70xx - 74xx Series I/O Lines
    • In-Sight 7000 Gen2 Series I/O Lines
    • In-Sight 8000 Series I/O Lines
    • In-Sight 9902L I/O Lines
    • In-Sight 9912 I/O Lines
  4. In-Sight 7000 Gen2 Series and 9912 only: If the line supports a bi-directional I/O, select Input or Output from the Direction drop-down.
  5. You can customize the default line Name by entering a new name specific to your application. The name may include up to 15 bytes, for reference purposes only; it does not change the functionality of the line and cannot be referenced.

  6. Choose an input Signal Type for the selected input line. Each input line can be configured for one of the following functions:

    Input Signal Type Description

    User Data

    General purpose input line; used to drive events in the spreadsheet or to set a value in the spreadsheet using the ReadDiscrete function.

    Event Trigger

    Triggers an event. To update the spreadsheet, the spreadsheet must contain an Event structure with its Trigger parameter set to this discrete input line number.

    Job ID Number

    Provides one bit of a Job ID Number, which is loaded when the State of a different input line with a Type of Job Load Switch is ON.

    Note:
    • To use the Job ID Number function, the job to be loaded must be saved with a numerical prefix of 0 to 127.
    • The least significant bit of the Job ID Number corresponds to the lowest numbered discrete input line on your I/O module.

    Online/Offline

    Forces the In-Sight vision system Offline or Online (0 = Offline, and 1 = Online). This input type may not be used on more than one input line simultaneously.

    Note: When the Signal Type is set to Online, the vision system may still be Offline if it has been set Offline manually in the In-Sight Explorer user interface or a Native Mode Set Online command, SO0, has been issued telling the In-Sight vision system to go Offline.

    Acquisition Trigger

    (Not supported on the CIO-1400)

    Triggers the vision system to acquire an image. To use this setting, the Trigger parameter in the AcquireImage property sheet must be set to External and a signal line must be physically connected to the input of the In-Sight vision system to use the Acquisition Trigger input. This input type may not be used on more than one input line simultaneously.

    Note:
    • If the AcquireImage function's Trigger parameter is set to External and an acquisition is missed, the ERR: Missed Acquisition discrete output will not be sent from the vision system. The ERR: Missed Acquisition signal is only supported when the AcquireImage function's Trigger parameter is set to Camera.
    • Faster trigger rates can be achieved by using the vision system's built-in acquisition trigger input (by setting the AcquireImage function's Trigger parameter to Camera) versus triggering the vision system with a general-purpose input line configured as an Acquisition Trigger (by setting the AcquireImage function's Trigger parameter to External).

    Job Load Switch

    ON reads all Job ID Number lines and loads the specified job. This input type may not be used on more than one input line simultaneously.

    Note: The In-Sight vision system must be Offline.

    Serial Receive
    (Direct I/O Only)

    Configures this line as a serial reception line.

    Note:
    • Serial Receive is only available when connecting to an In-Sight 70xx - 74xx series vision system with In-Sight Explorer 4.7.1 or later, and using In-Sight 4.7.1 or later firmware.
    • This input type is only valid for Line 1 when Direct I/O is selected.
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.

  7. Select an Edge Type for the selected input line, which controls the sensitivity of the input line to edge transitions.

    • Rising Edge: Changes the state of the input line on the leading edge of a pulse.
    • Falling Edge: Changes the state of the input line on the falling edge of a pulse.
    • Both Edges: Changes the state of the input line on the leading edge and falling edge of a pulse. This option is only available when Event Trigger is the selected Type.

  8. Select a Signal Type for the selected output line. Each output line can be configured for one of the following functions:

    Output Signal Type Description

    Programmed

    (default)

    Enables a WriteDiscrete function in the spreadsheet to control the State of this output line. Either pulsed or steady-state.

    High

    Forces the output to HIGH (1).

    Low

    Forces the output to LOW (0).

    Acquisition Start

    Signals the vision system has initiated an acquisition. Always pulsed.

    Note: For the In-Sight 8405 vision system, the Acquisition Start signal is pulsed when the first pixel row is exposed. For more information, see In-Sight 8405 Rolling Shutter Operation.

    Acquisition End

    Signals the completion of vision system acquisition. Always pulsed.

    Note: For the In-Sight 8405 vision system, the Acquisition End signal is pulsed when the total image readout is complete. For more information, see In-Sight 8405 Rolling Shutter Operation.

    Job Completed

    Signals each time the spreadsheet has completed an update. Always pulsed.

    System Busy

    HIGH when the vision system is running a job or responding to user input, LOW when the vision system is idle.

    Job Load OK

    Signals the job loaded successfully. Always pulsed.

    Job Load Fail

    Signals the failure of a job load. Always pulsed.

    ERR: Missed Acquisition

    Signals that an acquisition trigger was received before an Acquisition End signal was sent, or that no image buffer was available for image acquisition when an acquisition trigger was received. Always pulsed. For more information, see Image Buffers Dialog.

    Note: The Trigger parameter in the AcquireImage property sheet must be set to Camera to use the ERR: Missed Acquisition output.

    ERR: Tracking Overrun

    Signals that the spreadsheet issued a delayed discrete output signal sometime after the time it was expected. Always pulsed.

    Note: This signal is not supported on CIO-1400 and CIO-MICRO.

    ERR: Tracking Queue Full

    Signals that the spreadsheet issued a delayed discrete output for a line where a different output had been previously scheduled to occur at the same time. Always pulsed.

    Online/Offline

    HIGH (1) when the vision system is Online, LOW (0) when the vision system is Offline.

    Strobe

    The rising or falling edge of the signal can be used to trigger a strobe.

    • NPN Configuration: If the Strobe/Light Control Trigger in the Output Details dialog is set to Rising Edge, the signal is HIGH when the image sensor is being exposed, otherwise the signal is LOW. If the Strobe/Light Control Trigger is set to Falling Edge, the signal is LOW when the image sensor is being exposed, otherwise the signal is HIGH. Always pulsed for the duration of the exposure. The Exposure time must be 0.50 ms greater than the strobe pulse duration specified on the external strobe device.
    • PNP Configuration: If the Strobe/Light Control Trigger in the Output Details dialog is set to Rising Edge, the signal is LOW when the image sensor is being exposed, otherwise the signal is HIGH. If the Strobe/Light Control Trigger is set to Falling Edge, the signal is HIGH when the image sensor is being exposed, otherwise the signal is LOW. Always pulsed for the duration of the exposure. The Exposure time must be 0.50 ms greater than the strobe pulse duration specified on the external strobe device.
    Note:
    • The In-Sight Micro 1000 series, In-Sight 5000 series (except the 5604), In-Sight 7000 Gen2 series, In-Sight 8000 series and In-Sight 9000 series vision systems support the Strobe signal type for the HSOUT 1 line.
    • The In-Sight 70xx - 74xx series vision system supports the Strobe signal type for the HSOUT 0 line.
    • For the In-Sight 5600 series, 5705, 5705C, 5715 and 9902L vision systems, the strobe behavior is inverted (i.e., for NPN wiring configurations, the Rising Edge and Falling Edge behave like a PNP configuration).
    • For the In-Sight 8405 vision system, the Strobe Start Position is fixed to All Rows Exposed and the output signal is pulsed only during the time that all pixel rows are exposed. If using a strobe with the In-Sight 8405 vision system, a minimum Exposure value of 72ms is recommended for a full frame image capture, to ensure that all pixel rows are exposed when the strobe is pulsed. For more information, see In-Sight 8405 Rolling Shutter Operation.
    • If using a strobe with the In-Sight 9902L line scan vision system:
      • The strobe should use a PNP wiring configuration and the Strobe/Light Control Trigger should be set to Rising Edge.
      • When the vision system receives an acquisition trigger, the output line sends a pulse and the strobe flashes for the duration of the Exposure time. Once exposure is complete, there must be a minimum of 100µs before the next acquisition trigger is received or the strobe might not function correctly.
    • The vision system and strobe device must be connected to the same ground for the strobe to operate correctly.

    Light Control

    (CIO-1460 Only)

    The rising or falling edge of the signal can be used to trigger a light. If the Strobe/Light Control Trigger in the Output Details dialog is set to Rising Edge, the signal is HIGH when the image sensor is being exposed, otherwise the signal is LOW. If the Strobe/Light Control Trigger is set to Falling Edge, the signal is LOW when the image sensor is being exposed, otherwise the signal is HIGH. Always pulsed for the duration of the exposure. The exposure time must be 0.50 ms greater than the pulse duration specified on the external lighting device. For more information, see AcquireImage.

    Note:
    • The vision system and lighting device must be connected to the same ground for the lighting device to operate correctly.
    • This output type is only valid for HSOUT 1, when configuring the CIO-1460 I/O module for the In-Sight 5000 series vision system.

    I/O Module Standby

    (CIO -1450 and CIO-1460 Only)

    ON means that the I/O module has detected a communication error between the vision system and the I/O module, and is trying to re-establish communication. The line turns OFF when the I/O module detects that the error condition has been corrected.

    Note: This output type is only valid for lines 0 - 7 when configuring the CIO-1450 or CIO-1460.

    Lifeline

    (CIO -MICRO & CIO-MICRO-CC Only)

    HIGH when the vision system is actively connected to the CIO-MICRO or CIO-MICRO-CC. LOW when the connection with the vision system fails.
    Waveform

    Enables a Waveform function, WriteWaveformPulseTrain or WriteWaveformClocked, in the spreadsheet to control the State of this output line. For more information, see Waveform Functions, WriteWaveformPulseTrain and WriteWaveformClocked.

    Serial Transmit

    (Direct I/O Only)

    Configures the line as a serial transmission line.

    Note:
    • Serial Transmit is only available when connecting to an In-Sight 70xx - 74xx series vision system with In-Sight Explorer 4.7.1 or later, and using In-Sight 4.7.1 or later firmware.
    • This output type is only valid for output line 1 when Direct I/O is selected.
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.

    Job Pass/Fail Cell

    (In-Sight 7000 Gen2 Series and In-Sight 9000 Series Only)

             When selected, the vision system's Pass/Fail LED and indicator ring illuminate green (pass) or red (fail) based on the current state of the specified Job Pass/Fail cell. The LEDs will not turn on if a Job Pass/Fail cell is not specified or if the Job Pass/Fail cell returns a Warning or None Job Status. For more information, see Job Pass/Fail Cell Setup Dialog.
  9. Click the Details button to open the Output Details dialog for the selected output line, if detailed settings are available for the specified output Type. For more information, see Configure Discrete Output Details.

  10. Optionally, check De-Energize Outputs While Offline to de-energize the outputs when the vision system is placed Offline.

    Note:
    • If the De-Energize Outputs While Offline checkbox is checked, and you place the vision system Online, output line(s) configured using the Discrete I/O Settings dialog are restored. Output line(s) configured using the WriteDiscrete function are not restored. The function's specified Event must occur for the output line(s) to be restored. For more information, see WriteDiscrete.
    • If the De-Energize Outputs While Offline checkbox is checked and the CIO-MICRO or CIO-MICRO-CC I/O module has an output line configured as a LifeLine signal type, the line will remain HIGH when the connected vision system is placed Offline.
  11. Click OK to accept the changes (changes are saved to flash memory), or click Cancel to undo the changes.


I/O Module Configuration

The I/O Module Configuration dialog is used to configure the I/O module for use within In-Sight Explorer.

Access the I/O Module Configuration Dialog

  • From the EasyBuilder application Steps pane:
    • Click on the Inputs/Outputs Application Step; or
    • Click on the Communication Application Step, add a serial device and click the Serial Port Settings tab.
  • From the Spreadsheet view, select Serial Port Settings or Discrete I/O Settings from the Sensor menu. Click the I/O Module button.

Connect to the CIO-1400, CIO-1450 or CIO-1460

  1. Connect to a supported vision system from In-Sight Explorer.
  2. Open the I/O Module Configuration dialog.

  3. Select CIO-1400, CIO-1450 or CIO-1460 from the Select I/O Module drop-down list.

  4. Click OK to close the dialog.

Connect to the CIO-MICRO or CIO-MICRO-CC

  1. Connect to a supported vision system from In-Sight Explorer.
  2. Open the I/O Module Configuration dialog.

  3. Select CIO-MICRO or CIO-MICRO-CC from the Select I/O Module drop-down list.

  4. Select the appropriate I/O module from the Connect To drop-down list.

    Note: If the I/O module's host name is not displayed in the list, select <Connect by IP Address> and manually enter the I/O module's IP address.

  5. In the Update Time field, specify the time interval required for input and output synchronization (3ms - 500ms; default = 20ms) between the vision system and the CIO-MICRO or CIO-MICRO-CC I/O module.

    Note:
    • If excess output signal latency is a problem, decrease the Update Time. However, decrease the Update Time as little as necessary for your application; as the Update Time is decreased, job execution time may be increased.
    • When configuring the CIO-MICRO or CIO-MICRO-CC I/O modules, the specified Update Time must be no more than half of the time of the shortest expected input or output signal to ensure the signals are properly received and sent. For example, if the shortest expected I/O signal is 100ms, the Update Time should be no more than 50ms.

  6. Optionally, click the Change Settings... button to configure the I/O module's network settings.

  7. Optionally, assign the I/O module a new host name.

  8. By default, the In-Sight CIO-MICRO and CIO-MICRO-CC I/O modules are configured dynamically by the DHCP server on startup. If no DHCP server is available, the I/O module times out and binds to a link-local IP address. For more information, see Link-local IP Address. To manually configure the I/O module for a Non-DHCP network, uncheck the Use DHCP Server checkbox and setting the appropriate network settings:

    • IP Address: Assigns a unique identifier for each In-Sight vision system on the network, which must be consistent with the IP address-numbering scheme of the local network.

    • Subnet Mask: Defines which part of the IP address refers to the network and which part refers to the host. The network part of the IP address is the same for all hosts on the same subnet, and the remainder is unique to each host.

      There are three classes of subnet masks. The class of a particular subnet on a network is defined by the number of bits used to represent the network and host address portions in the IP address, as in the table below:

      Class Subnet Mask Network Address Host Address

      A

      255.0.0.0

      8 bit

      24 bit

      B

      255.255.0.0

      16 bit

      16 bit

      C

      255.255.255.0

      24 bit

      8 bit

      For example, consider a networked In-Sight host system with the IP address 192.168.0.1. If the first three numbers (192.168.0) identify the 24-bit network address, and the last number (1) is the 8-bit address for the In-Sight host on the network, then the subnet mask for this host is 255.255.255.0.

    • Default Gateway: Specifies the IP address of the gateway host, if available on the network. The gateway host is responsible for relaying data between hosts on different networks. If an In-Sight device needs to communicate with a device on a different subnet, enter the address of the gateway device in the Default Gateway field. Otherwise, leave the field blank.
    • DNS Server: Specifies the IP address of the host on the network providing DNS resolution, if available. For more information, see Domain Name Service (DNS) Server.
    • Domain Name: Specifies the network domain for the host network. Domain names can contain a maximum of 63 characters. For more information, see About Domains.
  9. Click OK to close the dialog.

Connect to the CIO-WENET

Note: Before the CIO-WENET Ethernet I/O Module can be configured in In-Sight Explorer, you will first need to assign an IP Address to the module. For more information, see Connect the CIO-WENET.
  1. Connect to supported vision system from In-Sight Explorer.
  2. Open the I/O Module Configuration dialog.

  3. Select CIO-WENET from the Select I/O Module drop-down list.

  4. In the IP Address field, specify the IP address that you previously assigned to the CIO-WENET.

  5. In the Update Time field, specify the time interval required for input and output synchronization (1ms - 500ms; default = 20ms) between the In-Sight Micro 1000 series vision system and the CIO-WENET I/O module.

    Note:
    • If excess output signal latency is a problem, decrease the Update Time. However, decrease the Update Time as little as necessary for your application; as the Update Time is decreased, job execution time may be increased.
    • For the CIO-WENET, the synchronization time is 3ms longer than the Update Time.
  6. Click OK to close the dialog.


Configure Discrete Output Details

The Output Details dialog is used to configure individual output line parameters from within the Discrete I/O Settings dialog.

  1. From the Sensor menu, click Discrete I/O Settings.

  2. From the Discrete I/O Settings dialog, choose an output line to configure and click Details.

    Note: No output details are configurable for High, Low, System Busy, Online/Offline, Lifeline, IO Module Standby and Job Pass/Fail Cell Signal Types.

    The appearance of the Output Details dialog will vary, depending on the output line Signal Type:

    Signal Type

    Output Details Dialog

    Programmed (Default)

    Acquisition Start

    Acquisition End

    Job Load OK

    Job Load Fail

    ERR: Missed Acquisition

    ERR: Tracking Overrun

    ERR: Tracking Queue Full

    Job Completed

    Strobe

Output Details Dialog Controls

  • Pulse: When checked, the output will be pulsed for the duration of the Pulse Length. Uncheck this checkbox for steady-state output.

    Note: The output must be pulsed when the Acquisition Delay (N) value is greater than 0.

  • Pulse Length (ms): Duration of an output pulse.

    Vision System/Vision Sensor | Minimum Pulse Length | Maximum Pulse Length | Default Pulse Length
    General-Purpose Output | High-Speed Output
    In-Sight Micro 1000 series (except 1402, 1412 and 1500) | 10ms | 10ms | 1000ms | 10ms
    In-Sight Micro 1402, 1412 and 1500 | 10ms | 1ms | 1000ms | 10ms
    In-Sight 5000 series | 10ms | 10ms | 1000ms | 10ms
    In-Sight 70xx - 74xx series | 10ms | 1ms | 1000ms | 10ms
    In-Sight 7000 Gen2 series | 1ms | 1ms | 1000ms | 10ms
    In-Sight 8000 series | 1ms | 1ms | 1000ms | 10ms
    In-Sight 9902L | 1ms | 1ms | 1000ms | 10ms
    In-Sight 9912 | 1ms | 1ms | 1000ms | 10ms
    Note:
    • When using the CIO-Micro or CIO-Micro-CC I/O module with supported vision systems, the minimum pulse length for general-purpose outputs is limited by the Update Time setting in the I/O Module Configuration dialog. For example, if the Update Time is 20ms, the minimum pulse length cannot be set below 30ms. For more information, see I/O Module Configuration.
    • For the In-Sight 7000 Gen2 series and 8000 series vision systems, the minimum pulse length of 1ms is only supported using In-Sight firmware version 5.5.0 and higher. If using an earlier version of firmware, the minimum pulse length is 10ms.

  • Acquisition Delay (N): The number of acquisition or tracking pulses (0 to 1000) to delay the output after a signal pulse is received by an output Line. If Acquisition Delay = 0, then the In-Sight vision system updates the output line immediately on evaluating the WriteDiscrete function. If Acquisition Delay is greater than 0, the output Line is always pulsed.

    Note: Acquisition Delay and Time After Trigger cannot be used concurrently.

  • Time After Trigger (ms): When this checkbox is selected, the output will be fired after the specified amount of time (0 to 10000 ms).

    Note: Acquisition Delay and Time After Trigger cannot be used concurrently.
  • Strobe/Light Control Trigger: The rising or falling edge of the signal can be used to trigger a strobe.
    • NPN Configuration: If set to Rising Edge, the signal is HIGH when the image sensor is being exposed, otherwise the signal is LOW. If set to Falling Edge, the signal is LOW when the image sensor is being exposed, otherwise the signal is HIGH. Always pulsed for the duration of the exposure. The Exposure time must be 0.50 ms greater than the strobe pulse duration specified on the external strobe device.

    • PNP Configuration: If set to Rising Edge, the signal is LOW when the image sensor is being exposed, otherwise the signal is HIGH. If set to Falling Edge, the signal is HIGH when the image sensor is being exposed, otherwise the signal is LOW. Always pulsed for the duration of the exposure. Always pulsed for the duration of the exposure. The Exposure time must be 0.50 ms greater than the strobe pulse duration specified on the external strobe device.

    Note:
    • For the In-Sight 5600 series, 5705, 5705C, 5715 and 9902L vision systems, the strobe behavior is inverted (i.e., for NPN wiring configurations, the Rising Edge and Falling Edge behave like a PNP configuration).
    • If using a strobe with the In-Sight 9902L line scan vision system:
      • The strobe should use a PNP wiring configuration and the Strobe/Light Control Trigger should be set to Rising Edge.
      • When the vision system receives an acquisition trigger, the output line sends a pulse and the strobe flashes for the duration of the Exposure time. Once exposure is complete, there must be a minimum of 100µs before the next acquisition trigger is received or the strobe might not function correctly.
  • Strobe Start Position: Specifies when the strobe should pulse. This option is not supported for the In-Sight 9902L vision system.
    • Acquisition Start: Specifies that the strobe will pulse as the vision system begins its acquisition. Supported on all models except the In-Sight 8405 vision system.
    • Camera Trigger: Specifies that the strobe will pulse upon receiving a camera trigger event. Supported on all models except the In-Sight 8405 vision system.

    • All Rows Exposed: Specifies that the strobe will pulse only when all pixel rows are exposed. Supported on the In-Sight 8405 vision system only.

      Note: If using a strobe with the In-Sight 8405 vision system, a minimum Exposure value of 72ms is recommended for a full frame image capture, to ensure that all pixel rows are exposed when the strobe is pulsed. For more information, see In-Sight 8405 Rolling Shutter Operation.

  • Tri-Color LED: Configures the behavior of tri-color LED lines. (Off/Green, Off/Red, Red/Green; default = Off/Green) This option is only available if the line supports tri-color LEDs.

    Note: This option is supported with In-Sight 7000 Gen2 series and In-Sight 9000 series vision systems for the Pass/Fail LED, but is not supported if Pass/Fail Job Cell is the selected Output Signal Type.


Number of Input and Output Lines

The number of direct (built-in) inputs and outputs varies per In-Sight vision system, as follows. For more information, see Default Input and Output Lines.

In-Sight Vision Systems | Direct (built-in) Inputs | Direct (built-in) Outputs
In-Sight Micro 1000 series | None | 2 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 5000 series | None | 2 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 70xx - 74xx series | 3 general-purpose inputs | 4 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 7000 Gen2 series | Up to 3 general-purpose inputs | Up to 4 high-speed outputs 2 user-configurable LEDs (1 green or red, 1 red)
In-Sight 8000 series | None | 2 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 9902L | 1 general-purpose input | 2 high-speed outputs 2 user-configurable LEDs (1 green or red, 1 red)
In-Sight 9912 | Up to 3 general-purpose inputs | Up to 4 high-speed outputs 2 user-configurable LEDs (1 green or red, 1 red)
Note:
  • In-Sight vision systems have one dedicated acquisition trigger input on the vision system. For more information, refer to the vision system installation manual or reference guide, included with In-Sight Explorer software.
  • When connected to the Breakout cable, the In-Sight 7000 Gen2 series and 9912 vision systems support bi-directional high-speed outputs and general-purpose inputs for HS OUT 2 / IN 2 and HS OUT 3 / IN 3. These lines are configured as outputs by default.

An I/O module can be used to provide additional discrete inputs and outputs. The number of discrete inputs and outputs varies per applicable I/O module, as follows. For more information, see Default Input and Output Lines.

I/O Modules | Supported In-Sight Vision Systems | Discrete Input Lines | Discrete Output Lines
CIO-1400 | In-Sight 5000 series (except 5604), In-Sight 7000 Gen2 series, In-Sight 9000 series | 7 general-purpose inputs | 6 general-purpose outputs
CIO-MICRO | In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 70xx - 79xx series, In-Sight 8000 series, In-Sight 9000 series | 8 general-purpose inputs | 8 general-purpose outputs
CIO-MICRO-CC | In-Sight Micro 1000 series, In-Sight 5000 series (except 5705, 5705C and 5715), In-Sight 70xx - 74xx series | 8 general-purpose inputs | 8 general-purpose outputs
CIO-1450 | In-Sight 5000 series (except 5604, 5705, 5705C and 5715) | 8 general-purpose inputs | 8 general-purpose outputs
CIO-1460 | In-Sight 5000 series (except 5604, 5605, 5705, 5705C and 5715) | 8 general-purpose inputs | 8 general-purpose outputs
CIO-WENET | In-Sight Micro 1000 series | 8 general-purpose inputs | 8 general-purpose outputs
Note:
  • The CIO-1400 I/O module supports the In-Sight 7000 Gen2 series vision system using In-Sight Explorer 5.4.0 and higher. If you log onto the vision system using an earlier version of In-Sight Explorer, connect to the CIO-1400 I/O module and configure the I/O lines, the changes will not be retained.
  • The CIO-MICRO I/O module supports In-Sight 5705, 5705C, 5715 and In-Sight 8000 series vision systems with firmware version 5.3.0 and higher.
  • The CIO-MICRO & CIO-MICRO-CC I/O modules support In-Sight 5100 series and 5400 series vision systems with 128MB non-volatile flash memory or higher. Models can be identified by the Type number (821-xxxx-xx). The Type number is located on the label affixed to the vision system. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The CIO-1450, CIO-1460 and CIO-WENET I/O modules are obsolete and no longer available for purchase, however these modules are still supported within In-Sight Explorer for backward compatibility only.
  • In-Sight vision systems may also be used to communicate with standard Ethernet I/O solutions available from other vendors, including Opto 22, Wago, and Sixnet, to provide a virtually unlimited number of I/O channels. However, the In-Sight TCPDevice function, configured for Modbus packet type communications, must be used to configure Ethernet-based I/O on these vision systems. For more information, see TCPDevice.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.


Default Input and Output Lines

The input and output lines available in the Discrete I/O Settings dialog vary, depending on the In-Sight vision system being configured and the type of I/O module connected to the vision system. For more information, see I/O Module Support.

In-Sight Micro 1000 Series I/O Lines

In-Sight 5000 Series I/O Lines

In-Sight 70xx - 74xx Series I/O Lines

In-Sight 7000 Gen2 Series I/O Lines

In-Sight 8000 Series I/O Lines

In-Sight 9902L I/O Lines

In-Sight 9912 I/O Lines


In-Sight Micro 1000 Series I/O Lines

Note:
  • HS OUT 0 and HS OUT 1 are built-in high-speed outputs, direct from the vision system.
  • The vision system supports the Strobe signal type for the HSOUT 1 line.

Direct I/O

Output | Name
0 | HSOUT 0
1 | HSOUT 1
4 | Green LED
5 | Red LED

CIO-MICRO or CIO-MICRO-CC

Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1
10 | Green LED
11 | Red LED

CIO-WENET

Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1
10 | Green LED
11 | Red LED

Connect the CIO-WENET


Connect the CIO-WENET

The CIO-WENET I/O module connects to the In-Sight Micro 1000 series vision system over Ethernet and provides eight digital inputs and eight digital outputs. The IP address set at the factory is 192.168.0.1, and in most cases, you'll want to change this before you can use the device.

Note:
  • The CIO-WENET I/O module is obsolete and no longer available for purchase, however these modules are still supported within In-Sight Explorer for backward compatibility only.
  • The CIO-WENET Ethernet I/O module does not support serial communication.

Power Connection

CAUTION: Using incorrect supply voltage can result in system damage.

Power is supplied to the CIO-WENET using the 24V (-15% /+20%) supply connections. Power can then be jumpered to other modules or devices. In a typical configuration, you would use the ACC-24I to power the CIO-WENET. In this arrangement, you would jumper power from the power supply to the CIO-WENET power supply connections.

Assigning an IP Address

The CIO-WENET is shipped with a default IP Address (192.168.0.1) and Subnet Mask (255.255.0.0). If these settings aren't appropriate for your configuration, use the following steps to install the bootp server and assign an IP address to the device.

  1. Determine the IP address that you'll use for the CIO-WENET. Record this value and save it in a safe place.
  2. Use a cross-over Ethernet cable to connect the device directly to a computer with an IP address in the 192.168.xxx.xxx subnet (192.168.0.4, for example). Do not use 192.168.0.1.
  3. Open a browser on the connected computer and go to 192.168.0.1. You should see the Wago Web-based Management page.
  4. Click on TCP/IP in the navigation list on the left side of the page.
  5. Enter admin and wago for the User Name and Password and click the OK button.
  6. Change the default IP Address to the device's assigned IP address.
  7. Change the Subnet Mask if needed.
  8. Click the SUBMIT button.
  9. Turn off the CIO-WENET and disconnect it from the computer.
  10. Use a standard Ethernet cable to connect the CIO-WENET to your network.

  11. Power up the device and use a browser from a computer on the network to go to the device and view its web management page.

    Note: You can also change the device's IP address using a bootp server, which is available with the In-Sight Explorer 4.1.0 or later. Normally, the bootp protocol is disabled on the CIO-WENET. If it is enabled, the device won't function on power-up unless a bootp server is available to assign its IP address. If you want to use the bootp server, you first need to use the device's Wago Web-based Management page from a browser to enable the bootp protocol.
  12. You can use the I/O Module Configuration dialog to configure the I/O module for use within In-Sight Explorer. Once the I/O module is configured, you can configure the discrete input and output lines as needed. For more information, see I/O Module Configuration.

I/O Connections

  • The 750-403 digital input modules receive control signals from digital field devices (vision systems, switches, etc.). Each module is a 2- to 3-conductor device and has four input channels (DI 1-4), for a total of eight.

  • The 750-540 digital output modules send control signals to digital field devices. Each module has four output channels (D0 1-4), for a total of eight.


In-Sight 5000 Series I/O Lines

Note:
  • HS OUT 0 and HS OUT 1 are built-in high-speed outputs, direct from the vision system.
  • The vision system supports the Strobe signal type for the HSOUT 1 line.
  • The In-Sight 5604 line scan vision system does not support the Strobe signal type.

Direct / CIO-1350

Output | Name
0 | HSOUT 0
1 | HSOUT 1
4 | Green LED
5 | Red LED

CIO-1400

Input | Name
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | HSOUT 0
1 | HSOUT 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | Green LED
9 | Red LED

CIO-1450

Note: When Pulsed discrete outputs are sent from a CIO-1450 I/O Module, the pulse width may be 10 milliseconds longer than specified.
Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1
10 | Green LED
11 | Red LED

CIO-1460

Note: When power is cycled on a CIO-1460 I/O module, discrete outputs may fire for approximately 250 microseconds during initialization.
Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1
10 | Green LED
11 | Red LED
12 | Disabled
13 | Disabled

CIO-MICRO/CIO-MICRO-CC

Note:
  • The CIO-MICRO I/O module supports In-Sight 5705, 5705C, 5715 with firmware version 5.3.0 and higher.
  • The CIO-MICRO & CIO-MICRO-CC I/O modules support In-Sight 5100 series and 5400 series vision systems with 128MB non-volatile flash memory or higher. Models can be identified by the Type number (821-xxxx-xx). The Type number is located on the label affixed to the vision system. For a complete list of models and supported firmware versions, see Firmware Versions.
Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1
10 | Green LED
11 | Red LED


In-Sight 70xx - 74xx Series I/O Lines

Note:
  • The In-Sight 70xx - 74xx series vision system supports connecting the Breakout cable and the CIO-MICRO or CIO-MICRO-CC I/O module simultaneously.
  • IN 1 is a built-in input, direct from the vision system. Direct (built-in) inputs are only supported when the vision system is connected to the Breakout cable.
  • HS OUT 0, HS OUT 1, HS OUT 2 and HS OUT 3 are built-in high-speed outputs, direct from the vision system. High-speed outputs on In-Sight 70xx - 74xx series vision systems are only supported when the vision system is connected to the Breakout cable.
  • The vision system supports the Strobe signal type for the HSOUT 0 line.
  • If connecting an external strobe device to the In-Sight 70xx - 74xx series vision system's External Light cable, use the Light Settings dialog to configure the external light settings. For more information, see In-Sight 70xx - 74xx Series Light Settings.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.

Direct I/O

Input | Name
1 | IN 1/Serial Receive
2 | IN 2
3 | IN 3
Output | Name
0 | HS OUT 0
1 | HS OUT 1/Serial Transmit
2 | HS OUT 2
3 | HS OUT 3
4 | Green LED
5 | Red LED

CIO-MICRO/CIO-MICRO-CC

Note:
  • When the vision system is connected to the Breakout cable and an Ethernet connection to a CIO-MICRO I/O module has been established:
    • The I/O module's I/O port (DB15) and TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
    • The I/O module's I/O port (DB15) is not supported. Do not connect anything to this port.
    • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
9 | IN 1
10 | IN 2
11 | IN 3
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HS OUT 0
9 | HS OUT 1
10 | HS OUT 2
11 | HS OUT 3
12 | Green LED
13 | Red LED

Enable Serial Communication: In-Sight 70xx - 74xx


Enable Serial Communication: In-Sight 70xx - 74xx

There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system:

  • Option 1: Breakout Cable
  • Option 2: CIO-MICRO or CIO-MICRO-CC I/O module
Note:
  • For detailed installation instructions and wiring details, refer to the In-Sight® 7000 Series Vision System Installation Manual.
  • If hardware handshaking is required, the CIO-MICRO or CIO-MICRO-CC I/O module must be used.
  • The vision system must be Online to send/receive serial data.

Option 1: Breakout Cable

The In-Sight 70xx - 74xx series vision system can be connected directly to a serial device using the RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable. When the vision system is connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows for bi-directional inputs and outputs between discrete and serial:

  • Input Line 1 can be configured as either Serial Receive or a general-purpose input; and
  • Output Line 1 can be configured as either Serial Transmit or a high-speed output.
Note:
  • If Input Line 1 is configured as a general-purpose input or Output Line 1 is configured as a high-speed output, the Serial Port Settings dialog controls are still enabled. There is no visual indication that the serial port is not active.
  • If Serial Receive is selected for Input Line 1, Serial Transmit is automatically selected for Output Line 1, and vice-versa. In addition, if any other input type is selected for Input Line 1, the line is configured as a general-purpose input and Output Line 1 is automatically reset to a high-speed output using the default output type for this line, and vice-versa.

The steps below assume that:

  • The vision system has been properly installed.
  • The Breakout cable is connected to the vision system.
  • The Breakout cable is connected to a serial device.

  • There is no connection to an I/O module.

    Note: For detailed installation instructions and wiring details, refer to the In-Sight® 7000 Series Vision System Installation Manual.

EasyBuilder View

  1. Launch In-Sight Explorer and log on to the vision system.
  2. Go to the Inputs/Outputs Application Step.
  3. Verify that Direct I/O is listed as the attached Module. If not, click the I/O Module button to launch the I/O Module Configuration dialog and connect to Direct I/O.
  4. For Input Line 1, select Serial Receive from the Edge Type drop-down list.
  5. Go to the Inputs/Outputs Application Step.
  6. For Output Line 1, verify that Serial Transmit is selected as the specified Signal Type.
  7. Go to the Communications Application Step.
  8. If adding a new device, click the Add Device button and configure the device settings. If editing an existing device, highlight it in the Communications group box and click the Edit Device button.
  9. Select the Serial Port Settings tab and configure the serial settings.

Spreadsheet View

  1. Launch In-Sight Explorer and log on to the vision system.
  2. From the Sensor menu, launch the Discrete I/O Settings dialog.
  3. Verify that Direct I/O is listed as the attached Module. If not, click the I/O Module button to launch the I/O Module Configuration dialog and connect to Direct I/O.
  4. For Input Line 1, select Serial Receive from the Type drop-down list. Click OK to close the dialog.
  5. For Output Line 1, verify that Serial Transmit is the specified Type. Click OK to close the dialog.
  6. Launch the Serial Port Settings dialog and configure the serial settings. Click OK to close the dialog.

Option 2: CIO-MICRO or CIO-MICRO-CC I/O Module

The In-Sight 70xx - 74xx series vision system supports connecting the Breakout cable and the CIO-MICRO or CIO-MICRO-CC I/O module simultaneously. If the vision system is configured for use with the CIO-MICRO or CIO-MICRO-CC I/O module, the RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.

The steps below assume that:

  • The vision system has been properly installed.
  • The Breakout cable is connected to the vision system (to supply power, acquisition trigger and I/O only).

  • The I/O module's RS-232 OUT port (DB9) is connected to a serial device.

    CAUTION: When connecting the In-Sight 70xx - 74xx series vision system to the CIO-MICRO or CIO-MICRO-CC I/O module, the I/O module's I/O port (DB15) and TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
    Note:
    • High-speed outputs on In-Sight 70xx - 74xx series vision systems are only supported when the vision system is connected to the Breakout cable.
    • For detailed installation instructions and wiring details, refer to the In-Sight® 7000 Series Vision System Installation Manual.

EasyBuilder View

  1. Launch In-Sight Explorer and log on to the vision system.
  2. Go to the Communications Application Step.
  3. Verify that CIO-MICRO or CIO-MICRO-CC is listed as the attached Module. If not, click the I/O Module button to launch the I/O Module Configuration dialog and connect to the appropriate I/O module.
  4. If adding a new device, click the Add Device button and configure the device settings. If editing an existing device, highlight it in the Communications group box and click the Edit Device button.
  5. Select the Serial Port Settings tab and configure the serial settings.

Spreadsheet View

  1. Launch In-Sight Explorer and log on to the vision system.

  2. From the Sensor menu, launch the Serial Port Settings dialog.
  3. Verify that CIO-MICRO or CIO-MICRO-CC is listed as the attached Module. If not, click the I/O Module button to launch the I/O Module Configuration dialog and connect to the appropriate I/O module.
  4. Configure the serial settings. Click OK to close the dialog.


In-Sight 7000 Gen2 Series I/O Lines

Note:
  • The vision system supports connecting the Breakout cable and the CIO-MICRO I/O module simultaneously. For supported hardware I/O configurations, refer to In-Sight 7000 Gen2 Hardware I/O Configurations.
  • IN 1 is a built-in input, direct from the vision system.Direct (built-in) inputs are only supported when the vision system is connected to the Breakout cable.
  • HS OUT 0, HS OUT 1, HS OUT 2 and HS OUT 3 are built-in high-speed outputs, direct from the vision system.
  • The vision system supports the Strobe signal type for the HSOUT 1 line.
  • If connecting an external strobe device to the In-Sight 7000 Gen2 series vision system's External Light cable or if connecting an illumination accessory to the vision system faceplate, use the Light Settings dialog to configure the light settings. For more information, see In-Sight 7000 Gen2 Series Light Settings.

Direct I/O

Note: The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
Input | Direction | Name
1 | Fixed Input | IN 1
2 | Input | IN 2
3 | Input | IN 3
Output | Direction | Name
0 | Fixed Output | HSOUT 0
1 | Fixed Output | HSOUT 1
2 | Output | HSOUT 2
3 | Output | HSOUT 3
4 | Fixed Output | Pass/Fail LED
5 | Fixed Output | Error LED

CIO-MICRO

Note:
  • When the vision system is connected to the Breakout cable and an Ethernet connection to a CIO-MICRO I/O module has been established:
    • The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
    • The CIO-MICRO I/O module's TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
    • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
  • When the vision system is connected to the CIO-MICRO I/O module via the I/O Module cable:
    • The vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are displayed in the Discrete I/O Settings dialog but are not supported. These lines are only supported when the vision system is connected to the Breakout cable.
    • TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON are connected via the CIO-MICRO I/O module terminals.
    • Illumination accessories attached to the vision system faceplate or LIGHT connector are not supported. If these illumination accessories are attached, the Breakout cable must be used to supply power to the vision system and a connection to the I/O module established via Ethernet only.
Input | Direction | Name
0 | Fixed Input | Line 0
1 | Fixed Input | Line 1
2 | Fixed Input | Line 2
3 | Fixed Input | Line 3
4 | Fixed Input | Line 4
5 | Fixed Input | Line 5
6 | Fixed Input | Line 6
7 | Fixed Input | Line 7
9 | Fixed Input | IN 1
10 | Input | IN 2
11 | Input | IN 3
Output | Direction | Name
0 | Fixed Output | Line 0
1 | Fixed Output | Line 1
2 | Fixed Output | Line 2
3 | Fixed Output | Line 3
4 | Fixed Output | Line 4
5 | Fixed Output | Line 5
6 | Fixed Output | Line 6
7 | Fixed Output | Line 7
8 | Fixed Output | HSOUT 0
9 | Fixed Output | HSOUT 1
10 | Output | HSOUT 2
11 | Output | HSOUT 3
12 | Fixed Output | Pass/Fail LED
13 | Fixed Output | Error LED

CIO-1400

Note:
  • When connected to the CIO-1400 I/O module, the vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are not supported.
  • The CIO-1400 I/O module supports the In-Sight 7000 Gen2 series vision system using In-Sight Explorer 5.4.0 and higher. If you log onto the vision system using an earlier version of In-Sight Explorer, connect to the CIO-1400 I/O module and configure the I/O lines, the changes will not be retained.
Input | Name
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | HSOUT 0
1 | HSOUT 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | Pass/Fail LED
9 | Error LED

In-Sight 7000 Gen2 Hardware I/O Configurations


In-Sight 7000 Gen2 Hardware I/O Configurations

There are several options for connecting the In-Sight 7000 Gen2 series vision system's trigger, inputs, outputs, serial and power.

Breakout Cable Only

The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog. In this configuration:

  • The Breakout cable supplies power to the vision system.
  • There is no connection to an I/O module.
  • Direct I/O is selected in the I/O Module Configuration dialog.
  • The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
Breakout Cable Pins | Supported
TRIGGER | √
HS OUT 0 | √
HS OUT 1 | √
IN 1 | √
IN 2 / HS OUT 2 | √
IN 3 / HS OUT 3 | √
COMMON IN | √
COMMON OUT | √
RS-232 TRANSMIT | √
RS-232 RECEIVE | √
+24VDC | √
GND | √

Breakout Cable and CIO-MICRO I/O Module

The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The Breakout cable supplies power to the vision system.
  • CIO-MICRO is selected in the I/O Module Configuration dialog.
  • The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
  • The CIO-MICRO I/O module's TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
  • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
Breakout Cable Pins | Supported
TRIGGER | √
HS OUT 0 | √
HS OUT 1 | √
IN 1 | √
IN 2 / HS OUT 2 | √
IN 3 / HS OUT 3 | √
COMMON IN | √
COMMON OUT | √
RS-232 TRANSMIT | Not Supported
RS-232 RECEIVE | Not Supported
+24VDC | √
GND | √
CIO-MICRO I/O Module Terminals | Supported
+24VDC | Not Supported
-24VDC | Not Supported
TRIGGER+ | Not Supported
TRIGGER- | Not Supported
HS OUT 1 | Not Supported
HS OUT 0 | Not Supported
HS COMMON | Not Supported
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
OUT COMMON | √
RS-232 OUT | √

I/O Module Cable and CIO-MICRO I/O Module

The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The I/O module cable supplies power to the vision system.
  • CIO-MICRO is selected in the I/O Module Configuration dialog.
  • The vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are displayed in the Discrete I/O Settings dialog but are not supported. These lines are only supported when the vision system is connected to the Breakout cable.
  • TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON are connected via the CIO-MICRO I/O module terminals.
  • Illumination accessories attached to the vision system faceplate or LIGHT connector are not supported. If these illumination accessories are attached, the Breakout cable must be used to supply power to the vision system and a connection to the I/O module established via Ethernet only.
CIO-MICRO I/O Module Terminals | Supported
+24VDC | √
-24VDC | √
TRIGGER+ | √
TRIGGER- | √
HS OUT 0 | √
HS OUT 1 | √
HS COMMON | √
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
OUT COMMON | √
RS-232 OUT | √

I/O Module Cable and CIO-1400 I/O Module

The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The I/O module cable supplies power to the vision system.
  • CIO-1400 is selected in the I/O Module Configuration dialog.
  • The vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are not supported.
CIO-1400 I/O Module | Supported
+24VDC | √
-24VDC | √
TRIGGER- | √
TRIGGER+ | √
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
HS OUT 1 | √
HS OUT 0 | √
OUT COMMON | √
RS-232 OUT | √


In-Sight 8000 Series I/O Lines

Note:
  • HS OUT 0 and HS OUT 1 are built-in high-speed outputs, direct from the vision system.
  • The vision system supports the Strobe signal type for the HSOUT 1 line.
  • If using a strobe with the In-Sight 8405 vision system, a minimum Exposure value of 72ms is recommended for a full frame image capture, to ensure that all pixel rows are exposed when the strobe is pulsed. For more information, see In-Sight 8405 Rolling Shutter Operation.

Direct I/O

Output | Name
0 | HSOUT 0
1 | HSOUT 1 (Strobe is a supported Signal Type)
4 | Green LED
5 | Red LED

CIO-MICRO

Note: The CIO-MICRO I/O module supports In-Sight 8000 series vision systems with firmware version 5.3.0 and higher.
Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1 (Strobe is a supported Signal Type)
10 | Green LED
11 | Red LED

In-Sight 8405 Rolling Shutter Operation


In-Sight 8405 Rolling Shutter Operation

The In-Sight 8405 vision system has an electronic rolling shutter to control the exposure of the image sensor. When the vision system receives an acquisition trigger, the pixel rows are exposed sequentially, starting with the first pixel row at the top of the image and proceeding to the last pixel row at the bottom of the image. Each pixel row is exposed for the same length of time, however each row begins exposing at a different time and the exposure of each adjacent row is overlapped. Once all rows have been exposed, the total image readout is complete and the pixel rows are reset. When the next acquisition occurs, the pixels rows are read out again for the duration of the specified Exposure.

For the In-Sight 8405 vision system, the Row Reset and Row Readout time is 36.38µs. Use the following formulas to determine the Total Reset, Total Image Readout and Total Runtime based on the Number of Rows and Exposure values specified. For more information, see AcquireImage.

Timing | Formula
Total Reset | Row Reset x (Number of Rows -1)
Total Image Readout | (Row Readout x Number of Rows) + 360µs
Total Runtime | Exposure + Total Image Readout
Note:
  • To ensure optimal image quality, the part must be stationary during image acquisition.
  • Due to the electronic rolling shutter operation, a "rolling line" effect may be visible when in Live Video mode.

Configure Outputs

The vision system's high-speed outputs can be optionally configured as Acquisition Start or Acquisition End signal types. When configured as Acquisition Start, the signal is pulsed when the first pixel row is exposed; when configured as Acquisition End, the signal is pulsed when the Total Image Readout is complete. The pulse length of these signals are specified in the Output Details dialog. For more information, see AcquireImage.

If using a strobe, the vision system's HS OUT 1 line can be configured as a Strobe signal type. When configured as Strobe, the Strobe Start Position in the Output Details is fixed to All Rows Exposed and the output signal is pulsed for the duration of the Strobe Width, when all pixel rows are exposed.

For the In-Sight 8405 vision system, the Row Reset time is 36.38µs. Use the following formulas to determine the Time to Strobe Start and the Strobe Width.

Timing | Formula
Time to Strobe Start | (Row Reset x Number of Rows) + 946µs
Strobe Width | Exposure - Time to Strobe Start
Note: If using a strobe with the In-Sight 8405, the Exposure time must be greater than the Time to Strobe Start, to ensure that all pixel rows are exposed when the strobe is pulsed.


In-Sight 9902L I/O Lines

Note:
  • The vision system supports connecting the Breakout cable and the CIO-MICRO I/O module simultaneously. For supported hardware I/O configurations, see In-Sight 9902L Hardware I/O Configurations.
  • IN 1 is a built-in input, direct from the vision system.Direct (built-in) inputs are only supported when the vision system is connected to the Breakout cable.
  • HS OUT 0 and HS OUT 1 are built-in high-speed outputs, direct from the vision system.
  • The vision system supports the Strobe signal type for the HSOUT 1 line.
  • If using a strobe with the In-Sight 9902L line scan vision system:
    • The strobe should use a PNP wiring configuration and the Strobe/Light Control Trigger should be set to Rising Edge.
    • When the vision system receives an acquisition trigger, the output line sends a pulse and the strobe flashes for the duration of the Exposure time. Once exposure is complete, there must be a minimum of 100µs before the next acquisition trigger is received or the strobe might not function correctly.

Direct I/O

Input | Name
1 | IN 1
Output | Name
0 | HSOUT 0
1 | HSOUT 1
4 | Pass/Fail LED
5 | Error LED

CIO-MICRO

Note:
  • When the vision system is connected to the Breakout cable and an Ethernet connection to a CIO-MICRO I/O module has been established:
    • The CIO-MICRO I/O module's TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
    • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
  • When the vision system is connected to the CIO-MICRO I/O module via the I/O module cable:
    • The vision system's ENCODER A INPUT and ENCODER B INPUT are not supported.

    • The vision system's IN 1 line is displayed in the Discrete I/O Settings dialog but is not supported. IN 1 is only supported when the vision system is connected to the Breakout cable.

    • TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON are connected via the CIO-MICRO I/O module terminals.
Input | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
9 | IN 1
Output | Name
0 | Line 0
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | HSOUT 0
9 | HSOUT 1
10 | Pass/Fail LED
11 | Error LED

CIO-1400

Note: When connected to the CIO-1400 I/O module, the vision system's ENCODER A INPUT, ENCODER B INPUT and IN 1 lines are not supported.
Input | Name
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | HSOUT 0
1 | HSOUT 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | Pass/Fail LED
9 | Error LED

In-Sight 9902L Hardware I/O Configurations


In-Sight 9902L Hardware I/O Configurations

There are several options for connecting the In-Sight 9902L vision system's trigger, inputs, outputs, serial and power.

Breakout Cable Only

The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog. In this configuration:

  • The Breakout cable supplies power to the vision system.
  • There is no connection to an I/O module.
  • Direct I/O is selected in the I/O Module Configuration dialog.
Breakout Cable Pins | Supported
TRIGGER | √
HS OUT 0 | √
HS OUT 1 | √
IN 1 | √
ENCODER A INPUT | √
ENCODER B INPUT | √
COMMON IN | √
COMMON OUT | √
RS-232 TRANSMIT | √
RS-232 RECEIVE | √
+24VDC | √
GND | √

Breakout Cable and CIO-MICRO I/O Module

The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The Breakout cable supplies power to the vision system.
  • CIO-MICRO is selected in the I/O Module Configuration dialog.
  • The CIO-MICRO I/O module's TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
  • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
Breakout Cable Pins | Supported
TRIGGER | √
HS OUT 0 | √
HS OUT 1 | √
IN 1 | √
ENCODER A INPUT | √
ENCODER B INPUT | √
COMMON IN | √
COMMON OUT | √
RS-232 TRANSMIT | Not Supported
RS-232 RECEIVE | Not Supported
+24VDC | √
GND | √
CIO-MICRO I/O Module Terminals | Supported
+24VDC | Not Supported
-24VDC | Not Supported
TRIGGER+ | Not Supported
TRIGGER- | Not Supported
HS OUT 1 | Not Supported
HS OUT 0 | Not Supported
HS COMMON | Not Supported
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
OUT COMMON | √
RS-232 OUT | √

I/O Module Cable and CIO-MICRO I/O Module

The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The I/O module cable supplies power to the vision system.
  • CIO-MICRO is selected in the I/O Module Configuration dialog.
  • The vision system's ENCODER A INPUT, ENCODER B INPUT and IN 1 lines are not supported. These lines are only supported when the vision system is connected to the Breakout cable.
  • TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON are connected via the CIO-MICRO I/O module terminals.
CIO-MICRO I/O Module Terminals | Supported
+24VDC | √
-24VDC | √
TRIGGER+ | √
TRIGGER- | √
HS OUT 0 | √
HS OUT 1 | √
HS COMMON | √
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
OUT COMMON | √
RS-232 OUT | √

I/O Module Cable and CIO-1400 I/O Module

The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The I/O module cable supplies power to the vision system.
  • CIO-1400 is selected in the I/O Module Configuration dialog.
  • The vision system's ENCODER A INPUT, ENCODER B INPUT and IN 1 lines are not supported. These lines are only supported when the vision system is connected to the Breakout cable.
CIO-1400 I/O Module | Supported
+24VDC | √
-24VDC | √
TRIGGER- | √
TRIGGER+ | √
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
HS OUT 1 | √
HS OUT 0 | √
OUT COMMON | √
RS-232 OUT | √


In-Sight 9912 I/O Lines

Note:
  • The vision system supports connecting the Breakout cable and the CIO-MICRO I/O module simultaneously. For supported hardware I/O configurations, see In-Sight 9912 Hardware I/O Configurations.
  • IN 1 is a built-in input, direct from the vision system. Direct (built-in) inputs are only supported when the vision system is connected to the Breakout cable.
  • HS OUT 0, HS OUT 1, HS OUT 2 and HS OUT 3 are built-in high-speed outputs, direct from the vision system.
  • The vision system supports the Strobe signal type for the HSOUT 1 line.
  • If connecting an external strobe device to the In-Sight 9912 vision system's External Light cable, use the Light Settings dialog to configure the light settings. For more information, see In-Sight 9912 Light Settings.

Direct I/O

Note: The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
Input | Direction | Name
1 | Fixed Input | IN 1
2 | Input | IN 2
3 | Input | IN 3
Output | Direction | Name
0 | Fixed Output | HSOUT 0
1 | Fixed Output | HSOUT 1
2 | Output | HSOUT 2
3 | Output | HSOUT 3
4 | Fixed Output | Pass/Fail LED
5 | Fixed Output | Error LED

CIO-MICRO

Note:
  • When the vision system is connected to the Breakout cable and an Ethernet connection to a CIO-MICRO I/O module has been established:
    • The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
    • The CIO-MICRO I/O module's TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
    • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
  • When the vision system is connected to the CIO-MICRO I/O module via the I/O module cable:
    • The vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are displayed in the Discrete I/O Settings dialog but are not supported. These lines are only supported when the vision system is connected to the Breakout cable.
    • TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON are connected via the CIO-MICRO I/O module terminals.
    • Illumination accessories attached to the vision system LIGHT connector are not supported. If these illumination accessories are attached, the Breakout cable must be used to supply power to the vision system and a connection to the I/O module established via Ethernet only.
Input | Direction | Name
0 | Fixed Input | Line 0
1 | Fixed Input | Line 1
2 | Fixed Input | Line 2
3 | Fixed Input | Line 3
4 | Fixed Input | Line 4
5 | Fixed Input | Line 5
6 | Fixed Input | Line 6
7 | Fixed Input | Line 7
9 | Fixed Input | IN 1
10 | Input | IN 2
11 | Input | IN 3
Output | Direction | Name
0 | Fixed Output | Line 0
1 | Fixed Output | Line 1
2 | Fixed Output | Line 2
3 | Fixed Output | Line 3
4 | Fixed Output | Line 4
5 | Fixed Output | Line 5
6 | Fixed Output | Line 6
7 | Fixed Output | Line 7
8 | Fixed Output | HSOUT 0
9 | Fixed Output | HSOUT 1
10 | Output | HSOUT 2
11 | Output | HSOUT 3
12 | Fixed Output | Pass/Fail LED
13 | Fixed Output | Error LED

CIO-1400

Note: When connected to the CIO-1400 I/O module, the vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are not supported.
Input | Name
1 | Line 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
Output | Name
0 | HSOUT 0
1 | HSOUT 1
2 | Line 2
3 | Line 3
4 | Line 4
5 | Line 5
6 | Line 6
7 | Line 7
8 | Pass/Fail LED
9 | Error LED

In-Sight 9912 Hardware I/O Configurations


In-Sight 9912 Hardware I/O Configurations

There are several options for connecting the In-Sight 9912 vision system's trigger, inputs, outputs, serial and power.

Breakout Cable Only

The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog. In this configuration:

  • The Breakout cable supplies power to the vision system.
  • There is no connection to an I/O module.
  • Direct I/O is selected in the I/O Module Configuration dialog.
  • The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
Breakout Cable Pins | Supported
TRIGGER | √
HS OUT 0 | √
HS OUT 1 | √
IN 1 | √
IN 2 / HS OUT 2 | √
IN 3 / HS OUT 3 | √
COMMON IN | √
COMMON OUT | √
RS-232 TRANSMIT | √
RS-232 RECEIVE | √
+24VDC | √
GND | √

Breakout Cable and CIO-MICRO I/O Module

The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The Breakout cable supplies power to the vision system.
  • CIO-MICRO is selected in the I/O Module Configuration dialog.
  • The vision system supports bi-directional high-speed outputs and general-purpose inputs for IN 2 / HS OUT 2 and IN 3 / HS OUT 3. These lines are configured as outputs by default.
  • The CIO-MICRO I/O module's TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON terminals are not supported. Do not connect wire leads from remote devices to these terminals.
  • The RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.
Breakout Cable Pins | Supported
TRIGGER | √
HS OUT 0 | √
HS OUT 1 | √
IN 1 | √
IN 2 / HS OUT 2 | √
IN 3 / HS OUT 3 | √
COMMON IN | √
COMMON OUT | √
RS-232 TRANSMIT | Not Supported
RS-232 RECEIVE | Not Supported
+24VDC | √
GND | √
CIO-MICRO I/O Module Terminals | Supported
+24VDC | Not Supported
-24VDC | Not Supported
TRIGGER+ | Not Supported
TRIGGER- | Not Supported
HS OUT 1 | Not Supported
HS OUT 0 | Not Supported
HS COMMON | Not Supported
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
OUT COMMON | √
RS-232 OUT | √

I/O Module Cable and CIO-MICRO I/O Module

The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The I/O module cable supplies power to the vision system.
  • CIO-MICRO is selected in the I/O Module Configuration dialog.
  • The vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are displayed in the Discrete I/O Settings dialog but are not supported. These lines are only supported when the vision system is connected to the Breakout cable.
  • TRIGGER+, TRIGGER-, HS OUT 0, HS OUT 1 and HS COMMON are connected via the CIO-MICRO I/O module terminals.
  • Illumination accessories attached to the vision system LIGHT connector are not supported. If these illumination accessories are attached, the Breakout cable must be used to supply power to the vision system and a connection to the I/O module established via Ethernet only.
CIO-MICRO I/O Module Terminals | Supported
+24VDC | √
-24VDC | √
TRIGGER+ | √
TRIGGER- | √
HS OUT 0 | √
HS OUT 1 | √
HS COMMON | √
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
OUT COMMON | √
RS-232 OUT | √

I/O Module Cable and CIO-1400 I/O Module

The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog. In this configuration:

  • The I/O module cable supplies power to the vision system.
  • CIO-1400 is selected in the I/O Module Configuration dialog.
  • The vision system's IN 1, IN 2, IN 3, HS OUT 2 and HS OUT 3 lines are not supported.
CIO-1400 I/O Module | Supported
+24VDC | √
-24VDC | √
TRIGGER- | √
TRIGGER+ | √
INPUT 7 | √
INPUT 6 | √
INPUT 5 | √
INPUT 4 | √
INPUT 3 | √
INPUT 2 | √
INPUT 1 | √
INPUT 0 | √
IN COMMON | √
OUT 7 | √
OUT 6 | √
OUT 5 | √
OUT 4 | √
OUT 3 | √
OUT 2 | √
OUT 1 | √
OUT 0 | √
HS OUT 1 | √
HS OUT 0 | √
OUT COMMON | √
RS-232 OUT | √


Light Settings

The Light Settings dialog is used to configure lighting devices connected to the In-Sight 7000 series vision system. The appearance of the dialog varies depending on the type of vision system and the type of lighting device connected to the vision system.

In-Sight 70xx - 74xx Series Light Settings

In-Sight 7000 Gen2 Series Light Settings

In-Sight 9912 Light Settings


In-Sight 70xx - 74xx Series Light Settings

The In-Sight 70xx - 74xx series vision system supports connecting an external strobe device or continuous lighting device to the vision system's LIGHT connector via the Light cable. If a connection is detected, the Light Settings dialog can be used to specify the type of external strobe or continuous lighting device connected to the In-Sight 70xx - 74xx series vision system.

Note: For In-Sight 70xx - 74xx series vision systems using an internal LED ring light, use the Light Control settings to configure the internal LED ring light. For more information, see AcquireImage.

  • Polarity: Specifies the type of strobe or continuous lighting device connected to the vision system.
    • Disabled: The vision system is not connected to a lighting device.
    • PNP (Sourcing): The vision system is connected to a PNP (current sourcing) lighting device.
    • NPN (Sinking): The vision system is connected to an NPN (current sinking) lighting device.


In-Sight 7000 Gen2 Series Light Settings

The In-Sight 7000 Gen2 series vision system supports connecting an integrated illumination accessory to the vision system's faceplate and connecting an external light to the vision system's LIGHT connector, but does not support using both lighting devices simultaneously. For a complete list of supported accessories, refer to the In-Sight® 7000 Gen2 Series Vision System Reference Guide.

  • If an integrated illumination accessory is installed to the vision system's faceplate, the Light Settings dialog can be used to specify the light settings for the LED ring light.
  • If an external light is connected to the vision system's LIGHT connector, the Light Settings dialog can be used to specify the light settings for the external strobe or continuous lighting device.
Note: If the IntegratedLightControl or ExternalLightControl function is inserted into the spreadsheet and you attempt to modify settings in the Light Settings dialog, the settings specified in the dialog will be overwritten by the spreadsheet function. For more information, see IntegratedLightControl and ExternalLightControl.

Integrated: In-Sight Illumination

Integrated: DataMan Standard Illumination

Integrated: DataMan High-Powered Illumination

External: In-Sight Illumination


Integrated: In-Sight Illumination

The In-Sight illumination accessory includes 8 LEDs that are separated into 4 LED banks. In-Sight Illumination is supported with the In-Sight 7000 Gen2 series vision systems only.

  • Intensity: Specifies the effective intensity of the illumination accessory LED banks as a percentage. All LED banks share a common intensity value and the intensity is limited to 50% - 100% to ensure it is evenly distributed across all LED banks. (50% to 100%; default = 100%)

  • Exposure: Specifies a fixed exposure value to use for every image acquisition.

    Note: For the following vision systems/sensors, the resolution can be configured in the Image Settings dialog: In-Sight Micro 1500, In-Sight 2000-130, 2000-130C, 2000-230, 2000-230C, 2000-23M, 2001-230, 2001-230C, In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900, 7900C, 7802, 7802C, 7902, 7902C.

    In-Sight Model

             Resolution Exposure Time (ms)
    In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900 & 7900C | 800 x 600 | 0.014 to 550 (default = 1.000)
    640 x 480 | 0.014 to 520 (default = 1.000)
    In-Sight 7501, 7801, 7801C, 7901 & 7901C | 1280 x 1024 | 0.017 to 750 (default = 1.000)
    In-Sight 7802, 7802C, 7902 & 7902C | 1600 x 1200 | 0.020 to 940 (default = 1.000)
    In-Sight 7802, 7802C, 7902 & 7902C | 800 x 600 (Low Light Mode) | 0.020 to 940 (default = 1.000)
    In-Sight 7905 & 7905C | 2448 x 2048 | 0.021 to 1000 (default = 1.000)

    The In-Sight illumination accessory has a maximum strobe pulse width that is dependent on the Intensity, LED ring light color, vision system resolution and number of rows acquired. Up to a certain Exposure time, the illumination accessory will illuminate for the specified Exposure time. If the Exposure time exceeds the maximum strobe pulse width, the LED ring light will only illuminate for the maximum strobe pulse width. For example:

    LED Ring Light Color | Intensity | Maximum Strobe Pulse Width (ms)

    In-Sight 7500, 7600, 7800, 7900

    800 x 600

    In-Sight 7500, 7600, 7800, 7900

    640 x 480

    In-Sight 7501, 7801, 7901

    1280 x 1024

    In-Sight 7802, 7902

    1600 x 1200

    In-Sight 7802, 7902

    800 x 600 (Low Light Mode)

    In-Sight 7905

    2448 x 2048
    White 100% 0.314 0.232 0.704 1.022 1.022

    1.599
    50% 0.779 0.574 1.744 2.531 2.531

    3.961
    Red 100% 0.375 0.277 0.841 1.220 1.220

    1.847
    50% 1.083 0.799 2.426 3.519 3.519

    5.508
    IR | 100% | 0.351 | 0.259 | 0.786 | 1.140 | 1.140 | 1.785
    50% | 0.857 | 0.632 | 1.921 | 2.787 | 2.787 | 4.361
    Blue | 100% | 0.314 | 0.232 | 0.704 | 1.022 | 1.022 | 1.599
    50% | 0.765 | 0.564 | 1.713 | 2.485 | 2.485 | 3.889
    LED Ring Light Color | Intensity | Maximum Strobe Pulse Width (ms)

    In-Sight 7600C, 7800C, 7900C

    800 x 600

    In-Sight 7600C, 7800C, 7900C

    640 x 480

    In-Sight 7801C, 7901C

    1280 x 1024

    In-Sight 7802C, 7902C

    1600 x 1200

    In-Sight 7802C, 7902C

    800 x 600 (Low Light Mode)

    In-Sight 7905C

    2448 x 2048
    White 100% 0.314 0.232 0.704 1.022 1.022

    1.599
    50% 0.779 0.574 1.744 2.531 2.531

    3.961
    Note: At Exposure times greater than the maximum strobe pulse width, a lower Intensity may result in brighter images, due to increased LED efficiency at a lower current.
  • Always On: The selected LED banks are always on to provide consistent light levels between acquisitions.

  • Live Video: Places the vision system in Live Video mode to display a live image to use when making adjustments to the illumination settings. Click the Live Video button again to exit Live Video mode.

    Tip: If the autofocus accessory is installed to the vision system, the focus position of the lens can be adjusted while in Live Video mode. For more information, see EditFocusPosition.


Integrated: DataMan Standard Illumination

The DataMan standard illumination accessories includes 36 LEDs that are separated into 8 LED banks. DataMan Standard Illumination is supported with the In-Sight 7000 Gen2 series vision systems only.

Note: DataMan Standard Illumination and DataMan High-Powered Illumination accessories are not supported with the In-Sight 7905 or 7905C.

  • Intensity: Specifies the effective intensity of the illumination accessory LED banks as a percentage. All LED banks share a common intensity value. (0% to 100%; default = 100%)
  • Exposure: Specifies a fixed exposure value to use for every image acquisition. (0ms to 1000ms; default = 8ms)
  • Live Video: Places the vision system in Live Video mode to display a live image to use when making adjustments to the illumination settings. Click the Live Video button again to exit Live Video mode.


Integrated: DataMan High-Powered Illumination

The DataMan high-powered illumination accessories include 8 LEDs, all of which are individually addressable as their own LED bank. DataMan High-Powered Illumination is supported with the In-Sight 7000 Gen2 series vision systems only.

Note: DataMan Standard Illumination and DataMan High-Powered Illumination accessories are not supported with the In-Sight 7905 or 7905C.

  • Intensity: The LED banks do not have any intensity control and are either on or off; intensity is fixed at 100%.
  • Exposure: Specifies a fixed exposure value to use for every image acquisition. (0ms to 1000ms; default = 8ms)
  • Live Video: Places the vision system in Live Video mode to display a live image to use when making adjustments to the illumination settings. Click the Live Video button again to exit Live Video mode.


External: In-Sight Illumination

If an external light is connected to the In-Sight 76xx/78xx/79xx vision system's LIGHT connector, the Light Settings dialog can be used to specify the light settings for the external strobe or continuous lighting device.

  • Polarity: Specifies the type of strobe or continuous lighting device connected to the vision system.
    • PNP (Sourcing): The vision system is connected to a PNP (current sourcing) lighting device.
    • NPN (Sinking): The vision system is connected to an NPN (current sinking) lighting device.
  • Intensity: Specifies the effective light intensity of the connected strobe device as a percentage. (0 to 100; default = 100)
  • Strobe Start Position: Specifies when the strobe should pulse.
    • Acquisition Start: Specifies that the strobe will pulse as the vision system begins its acquisition.
    • Camera Trigger: Specifies that the strobe will pulse upon receiving a camera trigger event.


In-Sight 9912 Light Settings

If an external light is connected to the In-Sight 9912 vision system's LIGHT connector, the Light Settings dialog can be used to specify the light settings for the external strobe or continuous lighting device.

  • Polarity: Specifies the type of strobe or continuous lighting device connected to the vision system.
    • PNP (Sourcing): The vision system is connected to a PNP (current sourcing) lighting device.
    • NPN (Sinking): The vision system is connected to an NPN (current sinking) lighting device.
  • Intensity: Specifies the effective light intensity of the connected strobe device as a percentage. (0 to 100; default = 100)
  • Strobe Start Position: Specifies when the strobe should pulse.
    • Acquisition Start: Specifies that the strobe will pulse as the vision system begins its acquisition.
    • Camera Trigger: Specifies that the strobe will pulse upon receiving a camera trigger event.


Audit Message Settings Dialog

The Audit Message Settings dialog allows you to enable or disable automatic audit messages for the active vision system, specify the IP address and TCP/IP port of the audit message server, and specify the types of events for which audit messages will be generated.

Note: Cognex provides the Cognex Audit Message Server, a utility application that demonstrates how to “listen” for audit messages from In-Sight vision systems, which can then be archived in a user-maintained audit trail logging or database application. Please contact your Cognex representative for more information.

Audit Message Settings Dialog Controls

To display the Audit Message Settings dialog, click Audit Message Settings from the Sensor menu.

  • Enable Audit Messages: Enable or disable automatic audit messages for the active vision system.
  • Server Address: Specifies the IP address of the audit message server.

  • Server Port: Specifies the TCP/IP port of the audit message server. (Default = 5753)

    Note: A valid port assignment is any unused number between 1 and 65535, except for ports reserved for In-Sight communications. For more information, see In-Sight Ports.
  • Message Types: Specifies the types of events for which audit messages will be generated.

    • System Events: If an In-Sight system event occurs (logging on or off of a vision system, loading or saving a job file, transitioning from Online to Offline mode, system startup and firmware updates), an audit message is generated. Certain events (start up, load job, save job, failed logon attempt and firmware update) convey additional information, with <value> tag surrounding the additional data.

      Note:

      When a logon attempt fails, the following information is displayed within <value> tag:

      • Invalid Password: The password entered is incorrect.
      • Invalid Username: The User Name entered does not exist in the User List. For more information, see User Access Settings Dialog
      • System Locked: The vision system is locked by another user. This information is usually displayed when a firmware update is in process.
      • Access Not Permitted For User: The user is not authorized access to the vision system.
      • Spreadsheet View Access Not Permitted: The user does not have access to the Spreadsheet View on the vision system. This information is usually displayed when the user only has access to the EasyBuilder View.
      • Unspecified Failure: The logon attempt is unsuccessful for unknown reasons.
    • Changes to Tagged Cells: If a symbolically tagged cell is edited (e.g., changes are made to the cell's formula or interactive control value) using In-Sight Explorer, a custom application, VisionView or a PLC, an audit message is generated. For more information, see Symbolic Tag Editor.
    • Changes to System Settings: If a system setting (any setting stored in the proc.set file) is modified, an audit message is generated. For more information, see PROC.SET.

In-Sight Audit Message Server Demo


In-Sight Audit Message Server Demo

The In-Sight Audit Message Server Demo demonstrates how audit messages can be received from one or more vision systems on the network. Audit messages are time stamped data records (XML format) that contain changes to system parameters, user log on and other system events.

Note:
  • The In-Sight Audit Message Server Demo application is for demonstration and test purposes and not intended for deployment.
  • A Visual Studio 2008 project containing sample code for an audit message server is installed in the following directory:
    • Windows 7/Windows 10: C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Sample Projects x.x.x\C# v2008\Audit Message Server

    This sample logs audit messages to a file, but you can modify it as needed to collect audit messages and convert the XML data for your compliance database or audit trail logging system.

How To Use the In-Sight Audit Message Server Demo

  1. Launch the In-Sight Audit Message Server Demo from the Windows Start menu (the default location is C:\Program Files\Cognex\In-Sight\In-Sight Audit Message Server Demo x.x.x).

  2. The Server Address is the IP address of the PC. If more than one network IP address is available on the PC, you can select a different IP address for the Audit Message Server. Click the Select button to see the IP addresses that are available on the PC, and select the IP address for the Audit Message Server from the list.
  3. Check the Use local time for message box to time stamp audit messages with the date and time of the PC. This ensures that all audit messages received from In-Sight vision systems on the network will have a correct time stamp even if those vision systems are not configured to use an SNTP server, or the SNTP server becomes unavailable.

  4. Click the Add button to open the Add Audit Message Port dialog. Enter an unused TCP/IP port between 1024 and 65535 (the default is 5753). This is the port at which your database or audit trail logging software will connect in order to collect audit messages from In-Sight vision systems. Multiple vision systems can send messages to the same Audit Message Port, or multiple Audit Message Ports can be added, one for each vision system that has been configured for audit messaging.

    Note: The following TCP/IP ports are within the allowed range, but they are reserved by In-Sight and can not be entered: 1069 (In-Sight Protocol), 1070 (Machine Status data), 1212 (Upgrade port), 2222 and 44818 (EtherNet/IP), and 50000 (DataChannel).
  5. Check the Log to File box. At the prompt, enter a filename for the log file (with .txt or .log file extension). If you added multiple TCP/IP ports in the previous step, create a log file for each port.
  6. Configure the In-Sight Audit Message Settings dialog. For more information, see Audit Message Settings Dialog.
  7. Click the Start button. If you have correctly configured the Audit Message Server and the vision system’s Audit Message Settings, the first audit message will be displayed in the Audit Message Demo application.

Schema for Audit Messages

Copyright © 1999 - 2019 | Cognex Corporation | All Rights Reserved.

In-Sight® Explorer Help | 2019 August 02 | Revision: 5.7.3.6


Line Scan Settings

The Line Scan Settings dialog configures the hardware encoder settings of In-Sight 5604 and 9902L line scan vision systems, as well as displays diagnostic information for the vision system.

Note: When using a quadrature hardware encoder, if the vision system begins to acquire an image and the quadrature encoder signals it is moving in the opposite direction and moves past the beginning of the frame trigger, the resulting image is incorrectly assembled and unusable. If this occurs, place the vision system Offline when the quadrature encoder signals that it is reversing direction. Place the vision system back Online once the quadrature encoder signals it is resuming its previous direction.

Line Scan Settings Controls

To display the Line Scan Settings dialog, click Line Scan Settings from the Sensor menu.

  • Max Image Height: Specifies the maximum number of pixel rows used to construct the image, and the maximum number of image buffers, for line scan vision systems.

    Vision System Max Image Height
    In-Sight 5604

    2048 (default)

    4096

    8192
    In-Sight 9902L

    2048

    4096 (default)

    8192

    12288

    16384
    Note:
    • Adjusting the Max Image Height setting of a line scan vision system requires a reboot of the vision system, and will erase the current job on the vision system. Save or backup your job before continuing.
    • The default number of image buffers allocated to the vision system at start up is dependent on the vision system's resolution and RAM size. Adjusting the Max Image Height setting may increase or decrease the maximum number of image buffers available to the vision system. If needed, use the Image Buffers dialog to modify the number of image buffers allocated to the vision system at start up. For more information, see Image Buffers Dialog.
    • When using a 5604 line scan vision system configured to a Max Image Height of 8192, if the Width of the Region of Interest of a Vision Tool must be set to a Width of greater than 3072, the region must be set by either manually entering the region values through the Formula Bar, or a separate Controls or Structures function must be created and referenced in place of the tool's internal Region parameter.

    • When using a line scan vision system, the Region of Interest (ROI) Width has a maximum limit when entered in a Vision Tool property sheet. If you need to set the ROI Width to a higher value, you must either manually enter the region value in the Formula Bar or create a separate Controls or Structure function and reference it in place of the tool’s Region parameter.

      Vision System | Maximum Resolution | Max Image Height | Maximum Width in Property Sheet
      In-Sight 5604 | 1024 x 8192 | 8192 | 3072
      In-Sight 9902L 2048 x 16384

      8192 and greater

               6144
      1024 x 16384 | 4096 and greater | 3072

  • Hardware Encoder

    Note: To modify the Encoder Type or Direction, the Line Trigger Type parameter in the AcquireImage property sheet must be set to Hardware Encoder, the line scan vision system must be Offline and the user must have Full Access. For more information, see User Access Settings Dialog.

    • Encoder Type: Specifies the type of hardware encoder used to trigger line acquisitions: Single (default) or Quadrature.

      Note:
      • When the Encoder Type is set to Single, the single line encoder must be wired to the first encoder input; connecting the line to the second input has no effect.
      • Quadrature Encoders provide direction information and require two high-speed inputs.

    • Direction: Specifies which direction should be considered the forward direction of the quadrature encoder: Positive (default) or Negative. The line scan vision system uses the Direction to determine the correct operating direction. Steps that are reverse direction are considered invalid and result in the current frame being aborted.

      Note: This control is disabled when the Encoder Type is set to Single.

  • Diagnostics

    • Encoder Count: Displays the number of hardware encoder steps (or microseconds for a software encoder).
    • Line Count: Displays a running total of acquired lines since the counters were last reset.
    • Line Overlap Count: Displays the number of lines lost due to excessive encoder rates.
    • Buffer Overrun Count: Displays the number of times the line scan vision system ran out of image buffers.
    • Frames Per Second: Displays the number of frames acquired per second.

    • Steps Per Second: Displays the number of steps that arrive from the external hardware encoder per second.

      Note: If a software encoder is used, the value displayed is the number of microseconds per second.

    • Reset Button: Resets all diagnostic statistics to zero.

      Note: All diagnostic statistics are reset when the Reset button is clicked or if the line scan vision system is placed Online or Offline.
  • 1K Resolution (Low Light Mode): Increases light sensitivity and decreases the standard area image to 1024 pixels wide. This option is only supported on the In-Sight 9902L line scan vision system.


Startup Dialog

The Startup dialog specifies job-related boot-time options for an In-Sight vision system, including the default job and Online/Offline status. User-related startup parameters are specified in the Options dialog.

Note:
  • In-Sight vision systems must be manually restarted before changes will take effect. Similarly, the In-Sight emulator must be disabled and re-enabled from the Options dialog before modified Startup settings will take effect.
  • No warning is given if the specified startup job does not exist (for example, after the job has been deleted or renamed).
  • A job saved in a Job Server can also be used as a default job, and automatically loaded to the vision system at startup. Use the Job Server Settings dialog to enable and configure the Job Server.

To Display the Startup Dialog

  • On the Sensor menu, click Startup.

    When a Job Server is enabled, the following dialog is displayed:

Startup Dialog Controls

  • Load Job on Startup: If this checkbox is checked, the selected job will be automatically loaded on startup. The list contains the jobs stored on the connected vision system/sensor, SD card installed to the connected vision system, or emulator.

  • Load Remote Job on Startup: If this checkbox is checked, the selected job will be automatically loaded on startup. The list contains the jobs stored on the Job Server.

    Note:
    • This checkbox is displayed only when the Job Server is enabled in the Job Server Settings dialog.
    • When the Job Server is enabled, a job saved in the Job Server can only be selected. If a job saved in the vision system should be loaded at startup, disable the Job Server.

  • Start the Sensor in Online Mode: If this checkbox is checked, the active In-Sight vision system/sensor will boot into Online mode.

    Note: As a safety precaution to prevent unintended activation of external devices such as robots, the In-Sight vision system will not automatically acquire an initialization image on job load when the Online checkbox is checked. This will result in slower than normal job processing time when the first acquisition trigger is received. Subsequent images will be processed at the normal speed.


User Access Settings Dialog

The User Access Settings dialog is used to set the security mode of In-Sight vision systems. The User Access Settings dialog maintains the access level and FTP read/write privileges for authorized users of In-Sight vision systems and emulators. The User Access Settings determine which users may log onto a particular In-Sight vision system through the Log On/Off dialog, as well as the types of changes they can make to the active job. Each In-Sight vision system has its own User List, separate from every other vision system on the network. If a user needs access to a particular vision system, they must know a user name and password that already exists in that vision system's User List.

User Access Settings Dialog Controls

To display the User Access Settings dialog, click User Access Settings from the Sensor menu.

  • Name: Specifies the user name that is used to log on to the vision system.
  • Access: Specifies the access level of the user. This sets the user permissions on a granular scale, with three levels possible: Full, Protected and Locked.

  • View: Specifies the view after successful log on when the Job View is the Spreadsheet View. If Normal is specified, the Spreadsheet View is displayed after log on. If Custom is specified, the Custom View is displayed after log on. For more information, see Define a Custom View of the Spreadsheet.

    Note:
    • For the Full access-level users, the initial view is specified. Once logged on, the user can toggle between the Spreadsheet View and Custom View by pressing F6 or by clicking the Custom View button in the Job Display Toolbar.
    • The Protected or Locked access level users are only allowed to access the Custom View.
  • FTP-R: Specifies the FTP Read privilege, which controls whether the user is allowed to load jobs onto the vision system. Yes indicates that the user is allowed to load jobs. No indicates the user cannot load jobs.
  • FTP-W: Specifies the FTP Write privilege, which controls whether the user is allowed to save jobs on the vision system. Yes indicates that the user is allowed to save jobs. No indicates the user cannot save jobs.
  • Online/Offline: Specifies whether the user is allowed to change the Online/Offline status of the vision system. Enabled indicates that the user is allowed to transition the vision system between Online/Offline states. Disabled indicates the user cannot transition the vision system between Online/Offline states.
  • Online Job Save: Specifies whether the user is allowed to save jobs when the vision system is Online. Enabled indicates that the user is allowed to save jobs while Online. Disabled indicates the user cannot save jobs while Online.

Create a New User

  1. Click Add.

  2. Enter an alphanumeric string for the User Name field.

    Note: The length of the User Name and Password strings cannot exceed 15 characters (the User Name must be from 1 and 15 characters, and the Password must be from 0 and 15 characters). Valid characters include letters, numeric digits and "_" and "-".
  3. Enter a password for the new user.

  4. Retype the password in the Verify Password field.

  5. Select an access level for the new user from the Access drop-down list. The access level controls how much interaction is allowed for the current user to prevent inadvertent or unauthorized changes to the configuration. The selected access level is in effect whenever anyone logs on to In-Sight Explorer with the selected User Name and Password. Three access levels are available:
    • Full: This offers complete, unrestricted access to the In-Sight vision system. Any job can be loaded, modified or saved, and all menu selections are available. The default admin user account has Full access.
    • Protected: The user has limited access to the vision system. Protected mode allows you to access Live Video mode, toggle the Online/Offline status of the vision system (if permitted by your Allow Online/Offline privileges), open or save jobs (if permitted by your FTP Read/Write privileges) and customize the appearance of the interface through the Options dialog. In EasyBuilder View, Protected access allows you to edit tool parameters, but not to add or delete tools. In Spreadsheet View, Protected access always displays the Custom View of the spreadsheet. A user in Protected mode can edit the values of any Graphics Controls functions visible in the Custom View, but cannot change the functions themselves. The default operator user account has Protected access.
    • Locked: This offers the most restrictive access. You can only monitor the operation of the current In-Sight vision system. The default monitor user account has Locked access.

  6. Optionally, uncheck Show Custom View at Log On to display the Spreadsheet View after successful log on when the Job View is the Spreadsheet View. By default, this is checked and the Custom View is displayed at log on. This checkbox is always grayed out when the selected access level is Protected or Locked.

    Note:
    • By default, this is unchecked for the pre-configured admin user.
    • When checked, "Custom" is displayed in the View column in the User Access Settings dialog. When unchecked, "Normal" is displayed in the View Column in the User Access Settings dialog.
  7. Optionally, uncheck Allow Online/Offline to restrict users with Protected access from toggling the Online/Offline state of the vision system. This checkbox is always grayed out when the selected access level is Full or Locked. For more information, see Online/Offline.

  8. Optionally, check Allow Online Job Saveto allow users with Full or Protected access to save jobs while online. This checkbox is grayed out when the selected access level is Locked.

    Note:
    • When checked, users with Protected access can save jobs while online even if the FTP Write privilege is not enabled.

    • If the Allow Online Job Save checkbox is checked and the job is running at the maximum possible trigger rate, triggers may be missed while saving the job.

  9. Specify the user's FTP, Read and Write privileges. FTP Read privileges apply to opening job or image files from the In-Sight vision system, while FTP Write privileges apply to saving jobs or images to the In-Sight vision system. Additionally, these permissions are in effect when the user attempts to log on to the active In-Sight system from a remote FTP client on the network.
  10. Click OK.

Modify an Existing User

  1. Highlight a user from the list.

  2. Click Edit.

  3. Modify user settings as necessary. See the preceding section on creating a new user for a detailed description of the user options.

    Note:
    • If the admin password is changed, you must log off then log back on to the vision system with the new password or errors may occur. For more information, see Error Messages.
    • The Access level, Allow Online/Offline privileges, FTP privileges and User Name for admin cannot be modified.
    • The Show Custom View at Log On checkbox affects only the Spreadsheet View; EasyBuilder does not support Custom Views.

Delete a User

Note: The admin user cannot be deleted.
  1. Highlight a user in the list.

  2. Click Delete.

  3. Confirm the deletion.


HMI Settings Dialog

The HMI Settings dialog is used to configure the Web HMI settings.

Note:
  • The Web HMI application is only available on vision systems or sensors running In-Sight firmware 5.6.0 and later.
  • The HTTPS HMI Mode is only available on vision systems or sensors running In-Sight firmware 5.7.3 and later.

HMI Settings Dialog Controls

  • To display the HMI Settings dialog, click HMI Settings from the Sensor menu.

HMI Mode

  • Disabled: Select this option to disable the HMI server. You are not able to use the Web HMI application if the HMI server is disabled.
  • HTTP: Select this option to enable the HTTP Web HMI server.
  • HTTPS: Select this option to enable the HTTPS Web HMI server.

Maximum View Connections

The Maximum View Connections setting is used to configure the maximum number of applications (In-Sight Explorer, In-Sight Display Control, In-Sight SDK, VisionView or Web HMI) allowed to connect to an In-Sight vision system or sensor (1 - 5, default = 2). If you change the number of the Maximum View Connections, you must restart the vision system or sensor for the changes to take effect.

Note:
  • When the Maximum View Connections is set to 2 or more, additional image buffers are automatically allocated to the In-Sight vision system or sensor. For example, when the Maximum View Connections is set to 2 and the number of Image Buffers in the Image Buffers dialog is set to 3, 5 image buffers are allocated to the vision system or sensor. If the total number of image buffers exceeds the maximum number of image buffers available on the vision system or sensor, the maximum number of image buffers is allocated to the vision system or sensor. For more information, see Image Buffers Dialog.
  • Increasing the number of image buffers may decrease the maximum number of the Web HMI connections you are allowed to have.
  • The Maximum View Connections setting for In-Sight 2000 series vision sensor is 1 - 3, default = 2.
  • Increasing the number of view connections will decrease the amount of RAM available for other tasks, such as loading jobs and acquiring images, and may degrade performance.
  • For more information on how to use the multiple view connections with VisionView, see Multiple View Connections with VisionView.

Connection Mode

An In-Sight vision system or sensor can connect to only one application with the Standard View Connection and up to four applications with the View Only Connection.

Maximum View Connections | Standard View Connection (In-Sight Explorer, In-Sight Display Control, In-Sight SDK, VisionView or Web HMI) | View Only Connection (VisionView and/or Web HMI)
1 | 1 | 0
2 | 1 | 1
3 | 1 | 2
4 | 1 | 3
5 | 1 | 4

Standard View Connection

Allows any access level (Full, Protected or Locked). Typically, this connection mode is used by an application that performs various run mode actions such as editing interactive controls, placing the vision system or sensor online/offline, loading a new job or triggering the vision system or sensor.

If two or more applications are connected to the vision system or sensor, you can establish only one application with the standard view connection. If you set the Maximum View Connection to 1, the application is connected automatically with the standard view connection.

Note: The In-Sight Explorer, In-Sight Display Control, and In-Sight SDK can only be connected with the standard view connection mode.

View Only Connection

Allows only Locked access. With this connection mode, the application can only view the operation of the vision system or sensor. All interactive controls, such as Trigger, Online/Offline, etc., are disabled.

HMI Settings

  • HTTP Port: Specifies the port number to use in the web address of the selected vision system or sensor. The default port number is set to 8087, but can be changed to any available port on the server.

    Note:
    • The HTTP port number and the HTTPS port number cannot be the same.
    • For information about In-Sight reserved ports, see In-Sight Ports.

  • Inactivity Timeout (Min.): Specifies the amount of time (0 to 60 minutes; default = 15) the Web HMI application can remain inactive before the application logs you off. To disable the Inactivity Timeout, set the number to 0.

    Note: The Inactivity Timeout setting does not apply to the vision system or sensor with the default credentials (i.e., the admin user with a blank password).
  • Image Resolution: Specifies the image resolution (Full, Half, Quarter or Eighth) to use in the Web HMI display. You can improve the image transfer time by reducing the image resolution.

  • Allow Local Storage: Specifies whether your web browser will remember the Web HMI configuration settings (image scale, image degrees, image offset and view settings). If the checkbox is selected (default), the Web HMI configuration settings are automatically saved each time you click the Switch View button or adjust the image display settings.

    Note: Check your web browser's setting to make sure cookies and DOM/local storage are enabled. Otherwise, your Web HMI configuration settings will not be saved, and you may receive an error message.
  • Allow View Selection: Specifies whether the Switch View button is enabled in the Web HMI application.
  • Allow Online/Offline: Specifies whether the Online and Offline buttons are enabled in the Web HMI application.
  • Allow Live Video: Specifies whether the Live Mode button is enabled in the Web HMI application.
  • Allow Trigger: Specifies whether the Trigger button is enabled in the Web HMI application.
  • Allow Adjust Image: Specifies whether the Image Toolbar is enabled in the Web HMI application.

HTTPS

Note:
  • To enable the HTTPS settings, you need to select HTTPS from the HMI Mode drop-down list.
  • For information about how to configure the HTTPS connection, refer to Configure the HTTPS Connection.
  • Sending images using the HTTPS mode will be slower than the HTTP mode due to encryption.

  • HTTPS Port: Specifies the port number to use for the secure web connection of the selected vision system or sensor. The port number is set to 8443 by default, but it can be changed to any available port on the server.

    Note:
    • The HTTP port number and the HTTPS port number cannot be the same.
    • For information about In-Sight reserved ports, see In-Sight Ports.

  • Cognex Network Server: Enter the host name or IP address of the Cognex Network Server. The host name and IP address information can be found in the Cognex Network Server Manager.

    Note: For information about how to install the Cognex Network Server software, refer to Install the Cognex Network Server Software. For information about the Cognex Network Server, refer to the Cognex Network Server Help File, which is installed with Cognex Network Server software.
  • Password: Enter the password of the Cognex Network Server. By default, the password is 1234. The password can be changed in the Cognex Network Server Manager.
  • Save Password: Select this checkbox if you want In-Sight Explorer to remember the password of your Cognex Network Server.
  • HTTP Image Transfer: Select this checkbox to enable transferring images under HTTP mode (unsecure mode). When this option is enabled, the image content is not encrypted, but the image update rate is faster than using HTTPS mode (secure mode). By default, this checkbox is unchecked.
  • Verify HTTPS: Click the Verify HTTPS button to verify the HTTPS connection between your In-Sight device and the Cognex Network Server.

  • Status: Displays the information about HTTPS connection status between your In-Sight device and the Cognex Network Server.

    Note: For more information about the status message and possible solutions, refer to HTTPS Configuration Troubleshooting.


Image Settings Dialog

The Image Settings dialog configures the resolution and frame rate of Live Video and Online images and the resolution to use for image acquisition.

Note: The Live Acquisition and Online image settings only affect the image that is sent to the In-Sight Explorer user interface and do not affect the vision system image acquisition.

Image Settings Dialog Controls

To display the Image Settings dialog, click Image Settings from the Sensor menu.

Live Acquisition (Live Video)

  • Resolution: Full, Half, Quarter and Eighth resolution for live images displayed in the In-Sight Explorer user interface.

    Note: The Eighth resolution option is not supported for color vision systems.

  • Bit Depth: Specifies the bit depth (16-bit or 24-bit; default = 16-bit) at which color images will be displayed.

    Note: This option is only available on Color In-Sight vision systems.

  • Limit Maximum Rate: When selected, this checkbox enables the Maximum Rate (Frames/sec) text box for Live Acquisition.

    Note: This option is only enabled on In-Sight vision systems using In-Sight firmware 4.x.x, and is disabled on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  • Maximum Rate (Frames/sec): Specifies the maximum number of images the vision system may send per second (0.016 to 100). This feature can be used to reduce network traffic by limiting the number of images sent.

    Note: This option is enabled only when the Limit Maximum Rate checkbox is checked.

Online (Online Mode)

  • Resolution: Optimized, Full, Half, Quarter and Eighth resolution for Online images displayed in the In-Sight Explorer user interface.

    Note:
    • For vision system running In-Sight firmware 4.x.x, Optimized returns a full size image with a Manual trigger, and a half resolution image with a Camera or Continuous trigger. For vision systems running In-Sight firmware 5.1.0 and later, Optimized optimizes the resolution of the image sent to In-Sight Explorer for speed.
    • The Eighth resolution option is not supported for color vision systems.

  • Bit Depth: Specifies the bit depth (16-bit or 24-bit; default = 16-bit) at which color images will be displayed.

    Note: This option is only available on Color In-Sight vision systems.

  • Limit Maximum Rate: When selected, this checkbox enables the Maximum Rate (Frames/sec) text box for Online Acquisition.

    Note: This option is only enabled on In-Sight vision systems using In-Sight firmware 4.x.x, and is disabled on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  • Maximum Rate (Frames/sec): Specifies the maximum number of images the vision system may send per second (0.016 to 100). This feature can be used to reduce network traffic by limiting the number of images sent.

    Note:
    • This option is only enabled on In-Sight vision systems using In-Sight firmware 4.x.x, and is disabled on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
    • This option is enabled only when the Limit Maximum Rate checkbox is checked.

Acquisition

  • Resolution: Specifies the resolution to use for image acquisition. The vision system must be rebooted for the changes to take effect. The Acquisition Resolution option is only available for the following vision sensors and vision systems:

    In-Sight Model Options Default
    In-Sight Micro 1500

    800 x 600

    640 x 480

             640 x 480

    In-Sight 2000-130, 2000-130C, 2000-230, 2000-230C

    800 x 600

    640 x 480

             640 x 480
    In-Sight 2000-23M

    800 x 600

    640 x 480

             800 x 600
    In-Sight 2001-230, 2001-230C

    1280 x 960

    800 x 600

    640 x 480

             1280 x 960
    In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900, 7900C

    800 x 600

    640 x 480

             800 x 600
    In-Sight 7802, 7802C, 7902, 7902C

    1600 x 1200

    800 x 600 (Low Light Mode)

             1600 x 1200
    Note:
    • When using 640 x 480 for the In-Sight 2000 series vision sensor listed in the above table, Image Magnification Mode can be enabled and disabled in the Set Up Image application step. When using 800 x 600 or 1280 x 960 for the In-Sight 2000 series vision sensor listed in the above table, Image Magnification Mode is always enabled and cannot be disabled. For more information, refer to the EasyBuilder Help file.
    • When using 800 x 600 (Low Light Mode) for the In-Sight 7802, 7802C, 7902 and 7902C, it provides increased light sensitivity at a reduced resolution.
    • The supported Exposure, Start Row and Number of Rows will vary based on the selected acquisition resolution. For more information, see AcquireImage.

Focus

Note: The Focus group box is displayed only when connected to the In-Sight 2000 Mini series vision sensor.
  • Override Focus on Job Load: Specifies whether or not the vision sensor will override the Focus Distance (%) setting configured in the Focus tab in the EasyBuilder Set Up Image application step. By default, this checkbox is unchecked (= disabled). When checked, the Set button will be enabled.
  • Set button: When clicked, the Override Focus Distance (%) value is set to match the Current Focus Distance (%) value.
  • Current Focus Distance (%): Displays the current Focus Distance (%) value saved to the vision sensor's firmware.
  • Override Focus Distance (%): Displays the Focus Distance (%) value to use when the job is loaded.


Image Buffers Dialog

The Image Buffers dialog is used to configure the number of image buffers allocated to the In-Sight vision system at startup when Overlapped is selected for the Buffer Mode parameter. For more information, see AcquireImage.

Each vision system has a default number of image buffers available for image acquisition and spreadsheet function execution:

  • The first available buffer is used for image acquisition.
  • Once acquisition is complete, another buffer is locked to use for the next acquisition.
  • The buffered image is sent to the spreadsheet for job execution.
  • The buffer stays locked until the job is executed.
  • Some functions (for example, WriteImageFTP and WriteSMTP) may keep a buffer locked after the job is executed, but the spreadsheet can receive another buffered image even if a function has a buffer locked. Buffered images are queued if a job is being executed or if images are queued for display (from In-Sight Explorer or the VisionView application).
Note:
  • The Image Buffers setting has no effect for the vision systems/sensors with Single Buffer Mode enabled, such as In-Sight 2000 series vision sensor EasyBuilder jobs.
  • Setting the number of image buffers in the Image Buffers Dialog is only supported for vision systems running firmware version 4.6.0 and later. If the vision system is running firmware version 4.5.0 and earlier, the SetSystemConfig() Extended Native Mode Command must be used to set the number of image buffers.
  • When in Camera Trigger mode, if a trigger is received but no buffer is available for image acquisition, the image acquisition does not occur. In addition, if a Discrete Output line is configured to use ERR: Missed Acquisition, this signal will be raised for each acquisition until a buffer is available. For more information, see Configure Discrete I/O Lines.
  • If the vision system is configured to use the maximum number of image buffers available, and is also configured to use the Sensor Filmstrip when the vision system is Online, there may not be enough memory available to save filmstrip images to the vision system. In this case, decrease the number of image buffers below the maximum.

Image Buffers Dialog Controls

To display the Image Buffers dialog, click Image Buffers from the Sensor menu.

The slider control allows you to configure the number of image buffers allocated to the vision system at startup. The default and maximum number of image buffers is dependent on the vision system resolution and RAM size. The vision system must be rebooted for the changes to take effect.

Note:
  • To determine the RAM size of the vision system, right-click the vision system within the In-Sight Network pane and click Properties. Within the Properties dialog, select the Memory tab.
  • Increasing the number of image buffers will decrease the amount of RAM available for other tasks, such as loading jobs and acquiring images, and may degrade performance.
  • Additional image buffers are automatically allocated to the In-Sight vision system when the Maximum View Connections setting in the HMI Settings dialog is set to 2 or more. For example, when the Maximum View Connections is set to 2 and the Image Buffers setting is set to 3, 5 image buffers are allocated to the vision system. If the total number of image buffers exceeds the maximum number of image buffers available on the vision system, the maximum number of image buffers are allocated to the vision system. For more information, see HMI Settings Dialog.

In-Sight Vision Systems

Note:
  • For the following vision systems/sensors, the resolution can be configured in the Image Settings dialog: In-Sight Micro 1500, In-Sight 2000-130, 2000-130C, 2000-230, 2000-230C, 2000-23M, 2001-230, 2001-230C, In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900, 7900C, 7802, 7802C, 7902, 7902C.
  • For the 5604 and 5614 line scan vision systems, the Image Height can be configured in the LineScan Settings dialog.
  • For the 9902L line scan vision system, the 1K Resolution (Low Light Mode) and Max Image Height can be configured in the LineScan Settings dialog.
In-Sight Model | Resolution (pixels) | RAM | Default Image Buffers | Maximum Image Buffers
In-Sight Micro 1020, 1050, 1100, 1110, 1400, 1410 | 640 x 480 | 128MB | 6 | 25
In-Sight Micro 1020, 1050, 1100, 1110, 1400, 1410 | 640 x 480 | 256MB | 12 | 25
In-Sight Micro 1100C, 1400C (128MB RAM) | 640 x 480 | 128MB | 3 | 6
In-Sight Micro 1100C, 1400C | 640 x 480 | 256MB | 6 | 25
In-Sight Micro 1402, 1412 | 1280 x 1024 | 256MB | 12 | 25
In-Sight Micro 1403, 1413 | 1600 x 1200 | 128MB | 3 | 6
In-Sight Micro 1403, 1413 | 1600 x 1200 | 256MB | 12 | 25
In-Sight Micro 1403C | 1600 x 1200 | 128MB | 3 | 6
In-Sight Micro 1403C | 1600 x 1200 | 256MB | 6 | 16
In-Sight Micro 1500 | 640 x 480 | 256MB | 12 | 25
 | 800 x 600 |  | 12 | 25
5100, 5110, 5400, 5410 | 640 x 480 | 256MB | 12 | 25
5100C, 5400C | 640 x 480 | 256MB | 6 | 25
5403, 5413 | 1600 x 1200 | 256MB | 12 | 25
5600, 5610 | 640 x 480 | 128MB | 6 | 25
5600, 5610 | 640 x 480 | 256MB | 12 | 25
5603, 5613 (128MB RAM) | 1600 x 1200 | 128MB | 3 | 6
5603, 5613 | 1600 x 1200 | 256MB | 12 | 25
Line Scan 5604, 5614 | 1024 x 2048 | 128MB | 6 | 6
 | 1024 x 8192 |  | 5 | 6
Line Scan 5604, 5614 | 1024 x 2048 | 256MB | 6 | 25
 | 1024 x 8192 |  | 6 | 16
5605, 5615 | 2448 x 2048 | 256MB | 6 | 16
5705, 5715 | 2448 x 2048 | 512MB | 12 | 25
5705C | 2448 x 2048 | 512MB | 8 | 16
7010, 7020, 7050, 7200, 7210, 7230, 7400, 7410, 7430 | 800 x 600 | 256MB | 12 | 25
7010C, 7200C, 7400C | 800 x 600 | 256MB | 6 | 25
7402, 7412, 7432 | 1280 x 1024 | 256MB | 12 | 25
7402C | 1280 x 1024 | 256MB | 6 | 25
7500, 7600, 7800, 7900 | 800 x 600 | 512MB | 12 | 25
 | 640 x 480 |  | 12 | 25
7600C, 7800C, 7900C | 800 x 600 | 512MB | 8 | 25
 | 640 x 480 |  | 8 | 25
7501, 7801, 7901 | 1280 x 1024 | 512MB | 12 | 25
7801C, 7901C | 1280 x 1024 | 512MB | 8 | 25
7802, 7902 | 1600 x 1200 | 512MB | 12 | 25
 | 800 x 600 (Low Light Mode) |  | 12 | 25
7802C, 7902C | 1600 x 1200 | 512MB | 8 | 16
 | 800 x 600 (Low Light Mode) |  | 8 | 25
7905 | 2448 x 2048 | 512MB | 12 | 25
7905C | 2448 x 2048 | 512MB | 8 | 16
8200, 8400 | 640 x 480 | 512MB | 12 | 25
8200C, 8400C | 640 x 480 | 512MB | 6 | 25
8401 | 1280 x 1024 | 512MB | 12 | 25
8401C | 1280 x 1024 | 512MB | 6 | 25
8402 | 1600 x 1200 | 512MB | 12 | 25
8402C | 1600 x 1200 | 512MB | 6 | 25
8405 | 2592 x 1944 | 512MB | 6 | 25
9902L | 2048 x 2048 | 512MB if using firmware version 5.6.1 PR1. 832MB if using firmware version 5.7.0 and later. | 12 | 25
 | 2048 x 4096 |  | 12 | 25
 | 2048 x 8192 |  | 12 | 16
 | 2048 x 12288 |  | 10 | 14
 | 2048 x 16384 |  | 6 | 10
9912 | 4096 x 3000 | 832MB | 12 | 25
9912C | 4096 x 3000 | 832MB | 8 | 16

In-Sight 2000 Series Vision Sensors

Note: The In-Sight 2000 series vision sensor's Buffer Mode is always set to Single Buffer Mode in EasyBuilder-only jobs. Therefore, in this scenario, the Image Buffers setting has no effect.
In-Sight Model | Resolution (pixels) | RAM | Default Image Buffers | Minimum Image Buffers | Maximum Image Buffers
2000-110 2000-120 | 640 x 480 | 128MB | 6 | 3 | 25
2000-120C | 640 x 480 | 128MB | 3 | 3 | 6
2000-130* | 640 x 480 | 128MB | 6 | 3 | 25
 | 800 x 600 |  | 3 | 3 | 6
2000-130C* | 640 x 480 | 128MB | 3 | 3 | 6
 | 800 x 600 |  | 3 | 3 | 6
2000-230* | 640 x 480 | 128MB | 6 | 3 | 25
 | 800 x 600 |  | 3 | 3 | 6
2000-230C* | 640 x 480 | 128MB | 3 | 3 | 6
 | 800 x 600 |  | 3 | 3 | 6
2000-23M* | 640 x 480 | 128MB | 6 | 3 | 25
 | 800 x 600 |  | 3 | 3 | 6
2001-230* | 640 x 480 | 128MB | 6 | 3 | 25
 | 800 x 600 |  | 3 | 3 | 6
 | 1280 x 960 |  | 3 | 3 | 6
2001-230C* | 640 x 480 | 128MB | 3 | 3 | 6
 | 800 x 600 |  | 3 | 3 | 6
 | 1280 x 960 |  | 3 | 3 | 6
*The resolution can be configured in the Image Settings dialog.


Sensor Filmstrip Settings Dialog

The Sensor Filmstrip Settings dialog allows you to specify the filmstrip behavior for individual sensors, including:

  • The type of results stored to the sensor.
  • The number of results stored to the sensor.
  • The factors that determine the pass or fail status of the results.
  • The behavior of the filmstrip when a failing result is encountered.

Sensor Filmstrip Settings Dialog Controls

To display the Sensor Filmstrip Settings Dialog, click Sensor Filmstrip Settings.

Note: All results are deleted if the sensor is power-cycled or if the Queue, Queue Size or Queue Type settings are modified.
  • Queue: The type of results stored to the sensor.
    • Disabled (default): No results are stored.
    • Pass Results: Passing results are stored.
    • Fail Results: Failing results are stored.
    • Pass and Fail Results: Passing and failing results are stored.

    • Separate Pass and Fail Results: Passing and failing results are stored and can be displayed together or separately within the filmstrip, depending on the toggle state of the Pass Results and Fail Results buttons.

      Note:
      • When Separate Pass and Fail Results is selected:
        • The Queue Size drop-down is disabled.
        • The Pass Size and Fail Size drop-downs are enabled.
        • The Pass Results and Fail Results buttons are displayed next to the filmstrip; toggle these buttons to display pass and/or fail results in the filmstrip.

  • Queue Size: The number of results stored to the sensor. Up to 20 results can be saved, depending on the vision system's resolution and available RAM. If the specified Queue Size exceeds the sensor's available RAM, the largest number of results possible are automatically allocated to the vision system.

    Note: This option is disabled when Separate Pass and Fail Results is selected from the Queue drop-down.

  • Pass Size: The number of passing results stored to the vision system.The combined Pass Size and Fail Size will not exceed the supported Queue Size allocated to the vision system. This option is only enabled when Separate Pass and Fail Results is selected from the Queue drop-down. (Minimum = 1)

  • Fail Size: The number of failing results stored to the vision system. The combined Pass Size and Fail Size will not exceed the supported Queue Size allocated to the vision system. This option is only enabled when Separate Pass and Fail Results is selected from the Queue drop-down. (Minimum = 1)

  • Queue Type: Determines how the sensor stores results. The number of results stored is dependent on the Queue Size. For example, if the Queue Size is 10 and First Only is the selected Queue Type, only the first 10 results are stored; if Most Recent is the selected Queue Type, only the most recent 10 results are stored.
    • First Only: The first X number of results are stored, where X is equal to the Queue Size.
    • Most Recent (default): The most recent X number of results are stored, where X is equal to the Queue Size.
  • Display Mode: The behavior of the filmstrip when the Watch Cell result receives a failing status.
    • Freeze on Fail: If the Watch Cell result receives a failing status, the result is added to the filmstrip and the filmstrip stops updating until the Continue button is clicked.
    • Pause on Fail: If the Watch Cell result receives a failing status, the result is added to the filmstrip and the filmstrip pauses for the duration of the specified Pause Delay.
    • Normal (default): The filmstrip continues to update regardless of the Watch Cell result.
  • Pause Delay: If Pause on Fail is the specified Display Mode, this is the duration (in seconds) that the filmstrip pauses before resuming updates. (1 to 120; default = 5)
  • Save Path: Specifies a location for saving filmstrip images. The user must have write privileges for the specified location.
  • Result Condition: Determines the pass or fail status based on the Watch Cell value.

  • Watch Cell: Displays the cell that is being monitored.

    Note: There are three watch cells (Job Pass/Fail cell, Filmstrip Watch cell and Record/Playback watch cell) with similar effects in In-Sight. All three watch cells can be set independently, and control different functionality.
  • Select Cell: Clicking Select Cell invokes cell selection mode, allowing you to reference a Watch Cell to determine if the result should receive a pass or fail status.
    • Cell <= 0: The Watch Cell contains a numeric value that is less than or equal to zero during image acquisition.
    • Cell = #ERR: The Watch Cell contains #ERR during image acquisition.
    • Cell > 0: The Watch Cell contains a numeric value that is greater than zero during image acquisition.
  • LED Style: Displays the pass and fail results as status icons in the filmstrip.
    • Geometric: A pass result is displayed as a green circle [image] and a fail result is displayed as a red rectangle [image].
    • OK/NG: A pass result is displayed as a green OK [image] and a fail result is displayed as a red NG [image].
    • Check/X: A pass result is displayed as a green checkmark [image] and a fail result is displayed as a red X [image].
  • Clear When Placed in Online Mode: When enabled (default), the filmstrip is cleared every time the sensor is placed Online.


RAM Disk Settings Dialog

The RAM Disk Settings allows users to emulate a file system by utilizing the system RAM of an In-Sight sensor or emulator. When used in conjunction with the Export/Import Cells and ExportData and ImportData functions, RAM Disk allows data to be shared between In-Sight sensors and external devices, such as PLCs and robot controllers. Once the RAM Disk has been enabled and its size configured, a folder named "RAMDisk" will appear as a subdirectory on the sensor or emulator in the In-Sight Files pane.

Note:
  • Only Job (.JOB) and Cell Data (.CXD) files are supported and can be stored in the RAMDisk folder.
  • All files stored in the RAMDisk folder are deleted when the sensor is power cycled or when the RAMDisk settings are disabled.

RAM Disk Settings Controls

To display the RAM Disk Settings dialog, click RAM Disk Settings from the Sensor menu.

Note: If a sensor or emulator does not support RAM Disk, the RAM Disk Settings menu item will be grayed out. Only sensors with firmware version 3.20.00 or higher are supported.
  • Enabled: Check the box to enable using the RAM Disk. By default, RAM Disk is not enabled.
  • Size (MB) : This setting determines the maximum amount of data, in megabytes, that will be stored in RAM Disk. RAM Disk will track the total amount of memory used and reference that value against the Size setting. The maximum size for sensors is 32MB; emulators have a maximum setting of 64MB.

Store Files in a Vision System or Emulator's RAM Disk

  • Store .JOB Files: To save a .JOB file to a sensor or emulator's RAMDisk folder, use the Save As dialog and, using the Look in: drop-down list, set the file's location to the RAMDisk folder of the desired sensor or emulator. Alternately, you can also drag a .JOB file from the In-Sight Files pane and drop it into the desired sensor or emulator's RAMDisk folder; or you can use the right-click shortcut menu in the In-Sight Files pane to copy and then paste a .JOB file into a RAMDisk folder.

  • Store .CXD Files: To save multiple spreadsheet cells to a .CXD file and export that file to a sensor or emulator's RAMDisk folder, use the Export Cells dialog and specify the RAMDisk folder of the desired sensor or emulator. To save a single cell's data to a .CXD file and export that file to a sensor or emulator's RAMDisk folder, use the ExportData function and specify the RAMDisk folder of the desired sensor or emulator.

    Note:
    • When naming files, avoid using the backslash character ("\") because files with a backslash character in their name cannot be copied or deleted without first renaming the file and removing the backslash character; file names with a backslash will also cause an error during a restore operation.
    • The RAMDisk folder is not case sensitive; but the name of the RAMDisk folder cannot be modified. The RAMDisk folder itself may not be copied, but the contents within the folder may be copied.

Access Files in a Vision System or Emulator's RAM Disk

  • Open .JOB Files: To open a .JOB file in a sensor or emulator's RAMDisk folder, use the Open dialog and, using the Look in: drop-down list, set the file's location to the RAMDisk folder of the desired sensor or emulator.
  • Open .CXD Files: To open a .CXD file from a sensor or emulator's RAMDisk folder, use either the Import Cells dialog (for files containing multiple spreadsheet cells) or the ImportData function (for files containing a single cell's data) and specify the RAMDisk folder of the desired sensor or emulator.
  • Remotely Access RAMDisk Files: When remotely accessing files in a sensor or emulator's RAMDisk folder, follow these file name protocols:

    • In-Sight Sensors: "ramdisk/filename.type"

    • Connect to the sensor using an FTP command prompt.

      Note:
      • The CD (change directory) FTP command is not supported.
      • The RAMDisk folder cannot be accessed using FTP from a web browser.

  • Native Mode: "[Command]RAMDisk/filename.job". For example, to use the Read File Native Mode command to read the file "Model.job", issue the following command: "RFRAMDisk/Model.job".

    Note: It is not possible to get the file list from a RAMDisk folder using the Get Filelist Native Mode command. In order to obtain the file list of a RAMDisk folder, use the FTP protocol instead.


Active Cells Limit Dialog

The Active Cells Limit dialog is used to configure the number of programmable spreadsheet cells, allowing you to increase or decrease the number of cells in the job that can be utilized by a particular In-Sight sensor or vision system.

Active Cells Limit Dialog Controls

To display the Active Cells Limit dialog, click Active Cells Limit from the Sensor menu.

The slider control allows you to configure the number of programmable spreadsheet cells. Adjust the slider to set the number of programmable cells.

Adjusting the Active Cells Limit of an In-Sight vision system requires the vision system be rebooted, and will erase all job and settings files from non-volatile flash memory. Save or backup your job before continuing.

Note: Do not power cycle the vision system while the Active Cells Limit is being updated.

Active Cells Limits

 | Minimum | Default | Maximum
In-Sight vision system | 2048 | 6144 | 10400
Note: The Active Cells Limit dialog is disabled for the In-Sight 5000; the minimum and maximum active cell limit is 4,096 and cannot be modified.


Profile Job Dialog

The Profile Job dialog illustrates cell dependencies and execution times for any cell in the active job that contains formulas or data; cells containing text and fixed numbers are excluded. Dependencies and execution times are 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 Profile Job dialog is also helpful when tracking down formulas or functions that are causing errors (#ERR) in an In-Sight job.

Note:
  • Execution times for identical jobs running on different In-Sight vision system models and In-Sight emulators will vary according to the processing capabilities of the respective systems and the image resolution.
  • The Profile Job dialog is not accessible in Online mode, or when the current user is logged in with a Protected or Locked Access level.
  • The Profile Job dialog does not provide timing data for event-driven operations such as network/serial communications, discrete I/O, and the on-board acquisition trigger on the vision system .
  • The Profile Job dialog calculates time differently than the status bar and the GetAllTime function. The Profile Job dialog also accounts for the construction of result graphics, whereas the other two do not.

Display the Profile Job Dialog

  • On the Sensor menu, click Profile Job.

Profile Job Dialog Columns

Tip:
  • Profile Job data can be sorted by clicking on any column header, and the columns can be resized by dragging the bar between any two columns.
  • Highlight a cell in the Profile Job dialog to locate the cell in the spreadsheet.

  • Order: The cells are listed by order of execution in the spreadsheet unless the Dependencies checkbox is enabled. When the Dependencies checkbox is enabled, the cells are listed in order of dependency relative to the selected cell.

  • Cell: Lists the cells included in the execution profile. The table is populated with all occupied cells, unless the Structure Only checkbox is selected. By default, the cells are listed by order of execution in the spreadsheet.

  • Result: Shows the current value contained in each cell. Cells that contain structures will show Pass upon successful execution and #ERR on failure.

  • Time: Displays the execution time (ms) for the formula in each cell.

  • State: Indicates the Cell State for each cell. If an "X" is present in the State column, then the corresponding Cell State is Enabled; If a "-" is present, then the corresponding Cell State is Disabled.

  • Expression: Displays the formula contained in each cell.

    Tip: If the Expression is too long to view in the default dialog size, resize the dialog to view the entire formula.

Profile Job Dialog Controls

  • Acquire: Acquires a new image, executes the job and updates the Profile Job table. After being pressed, the time will equal the acquisition time, job execution time and the time to construct result graphics.

  • Execute From: This button executes only the highlighted cell and each of its dependencies, without acquiring a new image (nor updating the execution time of the AcquireImage function). No other cells are executed, and their results are not shown.

    Note: When pressing the Execute From button, if an image had been acquired previously, the previous image acquisition time will still be present in the table, however, it will not be included in the job time calculation.

  • Structure Only: Select this checkbox to limit the Profile Job dialog view to only those cells containing data Structures.

  • Dependencies: Select this checkbox to list the cells in order of dependency relative to the selected cell and to display dependency indicators for each cell in the list. The selected cell is dependent on any cells marked [image]. Cells marked [image] depend directly on the selected cell. Double arrows indicate indirect dependencies.

  • Total: If the Acquire button is pressed to update the Profile Job dialog, Total indicates the total execution time of all cells in the list, including the acquisition time. If the Execute From button is pressed, Total indicates the total execution time of the highlighted cell and each of its dependencies.

  • Available Cells: Displays the number of cells currently available for editing in the spreadsheet.

  • Copy as List: Copies the contents of the Profile Job dialogue to the clipboard for pasting in Microsoft Word or Excel.

    Note: If the job file has several memory-intensive functions, the vision system may run out of memory before the total number of Available Cells is used.


Job Pass/Fail Cell Setup Dialog

The Job Pass/Fail Cell Setup dialog allows you to monitor a cell, which contains a numeric result, to determine the job's overall pass/fail status. The job status can be sent as an output from the sensor to other applications, such as the Cognex VisionView.

Note:
  • The Job Pass/Fail Cell Setup dialog is available only to admin-level users.

  • There are three watch cells (Job Pass/Fail cell, Filmstrip Watch cell and Record/Playback watch cell) with similar effects in In-Sight. All three watch cells can be set independently, and control different functionality.

  • All EasyBuilder jobs displayed in the EasyBuilder View reference the same job pass/fail cell by default. If this cell reference is changed in the Job Pass/Fail Cell Setup dialog, it reverts to the default cell once the job is displayed again in the EasyBuilder View.

Set Up a Job Pass/Fail Cell

  1. Display the Job Pass/Fail Cell Setup dialog by clicking Job Pass/Fail on the Sensor menu (alternately, right-click on a cell and click Set Job Pass/Fail).

  2. Enable the Use Job Pass/Fail Cell checkbox, to access the other controls in the dialog.

  3. Click Select Cell. The Job Pass/Fail Cell Setup dialog enters cell selection mode.
  4. Select the desired cell in the spreadsheet and press the Enter key to confirm the cell selection. The Job Pass/Fail Cell Setup dialog reappears, displaying the selected cell reference in the Job Pass/Fail Cell field.
  5. From the Job Status drop-down lists, define how the job pass/fail's numeric result maps to the job pass/fail status. Status options include None, Pass, Fail or Warning.
    • Cell value < 0: The selected cell contains a numeric value that is less than zero. (default = Fail)
    • Cell value = 0: The selected cell contains a numeric value that is equal to zero. (default = Fail)

    • Cell value > 0: The selected cell contains a numeric value that is greater than zero. (default = Pass)

      Note:

      The following job status is automatically assigned in these cases:

      • Cell contains non-numeric result, not #ERR (for example, a string): Pass
      • Cell is empty: None
      • Cell contains #ERR: Fail
      • No cell selected: None
  6. Click OK.


TestRun™

TestRun™ is used to confirm that a machine vision application is operating within expected parameters. TestRun performs tests on the In-Sight vision system and compares the results of those tests against expected values.

Note: TestRun is only available to users with Full Access privileges.

TestRun consists of the following tests for an In-Sight vision system:

  • Limit Tests: Looks at a list of parameters and determines if the current value is within the upper and lower limits, as configured for that parameter. These parameter settings can be configured by users through Controls functions within the job, discrete inputs read into the job or values sent by an external device through a communication protocol.
  • Image Tests: Sends a series of known quality images ("good" and "bad") to a vision system and determines if the results from the current job match the expected results for each image.
  • Hardware Tests: Compares the image quality of an acquired image from the vision system to the expected image quality to determine if changes in camera position, focus, lighting, etc., have occurred.

Why Test an In-Sight Vision System?

Machine vision applications are complex, with many operator-adjustable parameters, interrelated inspection tools, and environmental variables affecting the expected results. Testing the In-Sight vision system provides a “baseline” to insure that changes to one part of the system do not cause other parts to stop working. For example, the ambient light provided by windows during the day shift may affect expected results through overexposure.

In a production environment, TestRun provides plant managers assurance that the vision inspection system is catching defects, and not rejecting good parts. For vision system engineers, TestRun enables fast confirmation of the system’s performance when new tools are added. For maintenance technicians, TestRun enables parameter adjustments to be checked immediately, so they know if an adjustment in one area causes problems with other tools.

Set Up TestRun

TestRun assumes the following:

  • The machine vision application has already been developed and saved as a job file on an In-Sight vision system. A job file (*.JOB) is configured to perform a specific set of machine vision tasks. On In-Sight vision systems, job file storage is limited to the amount of available flash memory. File storage on an In-Sight emulator (running on a PC) is based upon the size of the hard disk in the PC. Job files can be loaded onto In-Sight vision systems from an In-Sight FTP server as well as from non In-Sight FTP servers. The name of the active job file is displayed in the title bar if it has been saved at least once. A job file can also be opened using drag-and-drop from the In-Sight Files pane or from Microsoft Windows Explorer.
  • Within In-Sight Explorer, a connection to the vision system has been established and the .job file loaded.
  • An image database containing the images used in the application has been created.
Note: Ideally, the image database will include examples of "good" images (images that result in a Pass) and "bad" images (images that result in a Fail). TestRun is able to operate with a variety of file organization structures for the image database, however, sorting the images into separate "good" and "bad" folders prior to launching TestRun will simplify the process.

EasyBuilder View and Spreadsheet View Developed Jobs

In-Sight Explorer provides two different programming environments for developing In-Sight machine vision applications (.job files): the Spreadsheet View and the EasyBuilder View. TestRun works with .job files developed in either environment. However, there are minor differences in the configuration of TestRun, depending upon which development environment was used. For example, TestRun relies on symbolic tags as references. In the EasyBuilder development environment, symbolic tags are created automatically as the job is built, whereas in the Spreadsheet environment, cell references are generally used (TestRun includes a feature to automatically create symbolic tags).

TestRun™ - EasyBuilder View


Licensing

Password protection can be applied to individual cells, or a range of cells, within a job file. When cells are password-protected, cell formulas are hidden and cannot be edited; the cell value or function is displayed as *** in the Formula Bar. The In-Sight License Generator is used to generate a license for single or multiple vision systems. Once a license is generated, it can be added to the vision system using the Licensing dialog. When the license is added to the vision system, password-protected cells within the job file execute and the results are displayed, but the cell formulas remain hidden and cannot be edited.

Note:

  • If a job containing the password-protected cells is loaded on a vision system without the proper license, the cells display #ERR. Place the mouse over the cell displaying #ERR or use the GetErrorString function to return diagnostic information for the cells displaying #ERR; if the corresponding license is not on the vision system, an error message is returned: "A license is required to run this cell."

  • You can gain temporary access to edit password-protected cells by entering the appropriate password in the Licensing dialog.
  • Multiple passwords can be used in a single job file to protect different cells or ranges of cells. For each password contained in the job file, you must create a corresponding license. Only cells protected by the license will be executed.
  • You must have administrative privileges to the vision system to perform any of the licensing operations.
  • No license is required to execute protected cells on an emulator.

Add Password Protection to Cells

  1. Use the EasyBuilder View or Spreadsheet View to develop the job.

    WARNING: When a job is created and developed in the EasyBuilder environment, an EasyBuilder-specific spreadsheet is automatically created and programmed with EasyBuilder snippets. Do not protect cells that contain these automatically generated EasyBuilder snippets, as this can interfere with the EasyBuilder job.

  2. In the Spreadsheet View, highlight the cell(s) that you want to protect.

    Note: Blank cells are not protected. If you delete a protected cell, it becomes a blank, unprotected cell.

  3. On the Format menu, click Cells to open the Format Cells dialog.

  4. Click the Protection tab.

  5. Enter a password in the Password field.
  6. Re-enter the password in the Verify Password field.
  7. Click the OK button. The cell formulas are now hidden and cannot be edited; the cell value or function is displayed as *** in the Formula Bar. You can distribute the job file to any vision system on which you want to run the job. You can then add a license as described in the following sections to enable password-protected cell execution.
  8. Save the job file.

Add a License to a Single Vision System

  1. Open the In-Sight License Generator by opening the Windows Start menu and clicking All Programs > Cognex > In-Sight > In-Sight x.x.x > In-Sight License Generator.

  2. In the Password field, enter the password you used to password-protect the cell(s) in the job.

  3. Enter the vision system's MAC address in the MAC ID field.

  4. Click the Generate License button.

  5. Click the Copy to Clipboard button to copy the License.

  6. From In-Sight Explorer, connect to the vision system.

  7. From the Sensor menu, click Licensing to open the Licensing dialog.

  8. Right-click in the Enter a new license field and select Paste to paste the license into the field. If the license hasn't been generated using the MAC address for the vision system to which you are connected, a warning is displayed.

    Note: The EasyBuilder Licensing dialog does not include the Enter a temporary password field.
  9. Click the Add button.
  10. Click the Close button. The cells now execute and the results are displayed, but the cell formulas remain hidden and cannot be edited.

Add a Site License to Multiple Vision Systems

  1. Open the In-Sight License Generator by opening the Windows Start menu and clicking All Programs > Cognex > In-Sight > In-Sight x.x.x > In-Sight License Generator.

  2. In the Password field, enter the password you used to password-protect the cell(s) in the job.

    Note: When creating a license that will be used on multiple vision systems, you do not need to enter a MAC ID.

  3. Enable the Site License checkbox.

  4. Click the Generate License button.

  5. Click the Copy to Clipboard button to copy the License.

  6. From In-Sight Explorer connect to the vision system.

  7. From the Sensor menu, click Licensing to open the Licensing dialog.

  8. Right-click in the Enter a new license field and select Paste to copy the license into the field.

    Note: The EasyBuilder Licensing dialog does not include the Enter a temporary password field.
  9. Click the Add button.
  10. Click the Close button. The cells now execute and the results are displayed, but the cells formulas remain hidden and cannot be edited.
  11. Save the job file. You can now distribute the job and the site license to other vision systems.

Temporarily Access Password-Protected Cells

You can gain temporary access to edit password-protected cells by entering the appropriate password in the Licensing dialog. The temporary access is revoked when you load another job file or disconnect from the vision system using In-Sight Explorer.

  1. From the Sensor menu, click Licensing to open the Licensing dialog.

  2. In the Enter a temporary password field, enter the password you used to add password protection to the job.

    Note: The EasyBuilder Licensing dialog does not include the Enter a temporary password field.
  3. Click the Enter button. All of the cells associated with the password are now accessible.
  4. Click the Close button.

Remove Password Protection from Cells

  1. In the Spreadsheet View, highlight the protected cell(s).
  2. Click the Delete button on your keyboard to clear the cell content. Cell values and formulas are removed and the cell(s) are no longer protected.
  3. Save the job file.

Remove a License from a Vision System

  1. From In-Sight Explorer, connect to the vision system.

  2. From the Sensor menu, click Licensing to open the Licensing dialog.

  3. Highlight the license that you want to remove.

  4. Click the Delete button. The license is removed from the list.
  5. Click the Close button.
  6. Save the job file. The license is no longer stored on the vision system.


System Menu: Spreadsheet View

The System menu contains file operations that can be performed on multiple In-Sight sensors, as well as functions and options related to In-Sight Explorer. New or existing sensors can be configured to operate on a network or to communicate directly to a PC using the Add Sensor/Device to Network dialog. For more information, see Add Sensor/Device to Network Dialog.

  • Log On/Off: Displays the Log On/Off dialog. Allows you to supply user name and password credentials to In-Sight Explorer, as well as log off from all sensors. For more information, see Log On/Off Dialog.
  • Create Report: Creates an XML file that describes jobs and sensor settings for one or more In-Sight sensors.
  • Backup: Displays the Backup dialog, which allows you to store an archival copy of all jobs, images and sensor settings into a folder on your local PC. The destination folder for these archived backups is defined in the Options dialog. The destination folder for these archived backups is defined in the Options dialog. For more information, see Backup Dialog.
  • Restore: Displays the Restore dialog, which permits the restoration of jobs, images and sensor settings to one or more sensors from their most recently archived backup. For more information, see Restore Dialog.
  • Restore From: Displays the Restore From dialog where you are allowed to choose any archived backup (including different sensors) to restore to one In-Sight sensor. For more information, see Restore From Dialog.
  • Clone To: Duplicates jobs, images and sensor settings from a source In-Sight sensor to one or more destination In-Sight sensors. For more information, see Clone Dialog.
  • Update Firmware: Writes firmware files to one or more In-Sight sensors using the Update Firmware dialog. For more information, see Update Firmware Dialog.
  • Add Sensor/Device to Network: Displays the Add Sensor/Device to Network dialog, which allows you to configure new and existing In-Sight sensors for communication on a TCP/IP subnet, or for a direct connection to a PC. For more information, see Add Sensor/Device to Network Dialog.
  • Explorer Host Table: Displays the Explorer Host Table Setup dialog, which allows In-Sight Explorer to communicate with sensors on different subnets. Explorer Host Table entries appear in the In-Sight Network pane just like sensors that are automatically detected. For more information, see Explorer Host Table Setup Dialog.
  • Remote Subnets: Displays the Explorer Remote Subnet List dialog, which allows In-Sight Explorer to add and manage remote subnets. For more information, see Explorer Remote Subnet List.

  • Save View Layout: Takes a "snapshot" of any Spreadsheet Views and Sensor Status Views that you currently have open and remembers how they are arranged on the screen; when In-Sight Explorer is launched, it will log on to the corresponding sensors/emulators and arrange their views as when you saved the layout.

    Tip: The layout can be saved by pressing SHIFT+F7.
    Note: Toolbars and Panes may not show up properly if undocked when the layout is saved. It is recommend to have all Toolbars and Panes docked before saving the layout.
  • Options: Displays the Options dialog where you can configure startup, GUI and emulator preferences for In-Sight Explorer. For more information, see Options Dialog.

Log On/Off

Create Report

Backup

Restore

Restore From

Clone To

Update Firmware

Add Sensor/Device to Network

Explorer Host Table

Remote Subnets...

Save View Layout

Options Dialog


Log On/Off Dialog

The Log On/Off dialog establishes a user name and password used to log on to individual In-Sight vision systems.

This dialog can also be used to log off from all vision systems. By default, In-Sight Explorer will use admin as a user name and a blank password to log on to vision systems. If the Startup user name and password defined in the Options dialog do not match the user name and password defined in the User Access Settings dialog, the Log On/Off dialog will appear when In-Sight Explorer is launched.

In addition to providing job editing and viewing capabilities, In-Sight Explorer also provides administrative services including Backup, Restore, Reporting and file management. These administrative services require connections to In-Sight vision systems using FTP and/or Native Mode protocols. Although these functions always appear to be enabled, user authentication is verified per vision system once the operation is initiated; based upon the current user name, you will be either allowed or disallowed to perform the function, depending on the current user's access level on each vision system.

Log On to In-Sight Vision Systems

  1. On the System menu, click Log On/Off.

  2. Enter the user name and password.
  3. Select the Remember Password checkbox for the entered User Name and Password to be remembered at the next log on. By default, this option is unchecked, and the password needs to be entered each time the system is logged on to.

  4. Click the Log On button to finish. The User Name and Password entered in the preceding steps will be used to log on to individual In-Sight vision systems (by double-clicking their names under the In-Sight Network.)

    Note: If you are logged on to a vision system and then change the User Name or Password, you may be disconnected from any vision systems that cannot authenticate the new user information.

Once the log on is complete, the access level specified for the User Name in the destination system's User List will be in effect regardless of the user's access level on the In-Sight vision system from which the log on was initiated.


Create Report Dialog

The Create Report dialog allows you to generate HTML or XML-based output files documenting the network configuration and job details of one or more In-Sight vision systems, vision sensors, or emulators on your network.

Generate a Report

  1. On the System menu, click Create Report.

  2. Highlight any In-Sight vision systems or vision sensors that you would like to include in the report.

    3. Note: To select consecutive items, click the first item, hold down the SHIFT key, then click the last item. For non-consecutive items, hold the CTRL key while clicking the items for the report.

  3. From the Files of type drop-down menu, select the output file type: HTML or XML.
  4. Click Create Report.
  5. Enter a filename for the report.
  6. Click Save.


Backup Dialog

The Backup dialog allows you to store an archival copy of the jobs, images and sensor settings from an In-Sight sensor or emulator to the hard disk on your PC or the SD card installed to the vision system. Network settings are stored in a backup, but they are restored only when you are restoring to the same sensor that was backed up.

Backup to the PC

The destination folder on the In-Sight vision system/emulator, or Backup Directory, for archived data is defined in the Options dialog. When In-Sight Explorer archives data from a vision system or emulator, a folder is created in the Backup Directory with a name identical to the vision system's host name, along with a numerical suffix, starting with ".000". If a backup already exists for that particular sensor, then the numerical suffix will be incremented (such as is5400_010203.000, is5400_010203.001, etc.)

Note:
  • A maximum of 1,000 backups can be stored per In-Sight sensor.
  • After backing up a vision system that uses one or more colons in the host name, the resulting folder name will use the plus sign (+) instead of the colon. This is expected behavior because Windows does not allow the colon character to be used in folder names.
  • Backup operations should normally be done while In-Sight vision systems are Offline because file transfer operations may affect the performance of time-critical jobs. For jobs that are not time-critical, you can enable Online backups by selecting the Allow Online Backups checkbox within the Options dialog.
  • When an Online sensor is in the process of being backed up, its status will temporarily change to [image]. Once the backup is complete, the status will return to [image].
  • The Backup Directory's default folder is in the following location, to allow Standard User access: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x

Backup to the SD Card Installed to the Vision System

The SD card stores one backup only. For subsequent backups, the previous backup is overwritten.

Note: The vision system(s) must be Offline in order to backup to the SD card.

Use the Backup Dialog

  1. To display the Backup dialog, click Backup from the System menu.

  2. Select any vision systems/sensors or emulators that you would like to back up by checking the checkbox on the left-hand side.

  3. If you would like to back up to a SD Card, check the Use SD Card checkbox.

    Note:
    • You can search your desired vision systems/sensors or emulators dynamically by using the search box.
    • The Use SD Card checkbox is enabled only when a SD Card is installed to the vision system.
    • If a vision system with a SD Card is selected but the Use SD Card checkbox is unchecked, the backup data will be archived to the PC.
  4. Click Backup.


Restore Dialog

The Restore dialog allows you to retrieve an archived copy of the jobs, images and sensor settings from an In-Sight vision system/sensor or emulator; they must be backed up to your local PC before they will appear in the Restore dialog. The dialog also allows you to retrieve a backup stored on the SD card installed to the In-Sight vision system.

Restore From the PC

Archived backups are restored from the Backup Directory, which is defined in the Options dialog. In-Sight Explorer will look for any sub-folders that match sensor names from the In-Sight Network and display them in the Restore dialog.

Note:
  • Only the most recent backup for any archived vision system/sensor is listed in the Restore dialog. If you would like to restore from an older backup, or restore a backup from a different vision system/sensor, use the Restore From dialog instead.
  • Vision systems/sensors must be Offline to perform the Restore function. Attempting to restore an Online vision system/sensor will prompt a warning dialog to take the sensor Offline.
  • When restoring, existing files with the same name on the vision system/sensor or emulator, including the current Network Settings, will be overwritten. Existing files which are not in the set of files being restored will not be overwritten.
  • If a vision system/sensor is restored, the User List will not be cleared. Therefore, any user names that were added to the User List before the vision system/sensor has been restored will remain on the vision system/sensor after it has been restored. After the vision system/sensor has been restored, manually add or remove users from the User List.
  • The Backup Directory's default folder is in the following location, to allow Standard User access: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x

Restore From the SD Card Installed to the In-Sight Vision System

The most recent backup on the SD card will be restored to the In-Sight vision system.

Note:
  • The vision systems must be Offline in order to restore from the SD card.
  • The SD card stores one backup only. For the subsequent backups, the previous backup will be overwritten.
  • A backup on the SD card can only be restored to the In-Sight vision system that the SD card is installed.

Use the Restore Dialog

  1. From the System menu, click Restore.

  2. Select any vision systems/sensors or emulators that you would like to restore by checking the checkbox on the left-hand side.

    Tip: You can search your desired vision systems/sensors or emulators dynamically by using the search box.

  3. If you would like to restore from the SD Card, check the Use SD Card checkbox.

    Note:
    • The Use SD Card checkbox is enabled only when the SD card is installed to the vision system and there is a backup for the selected vision system on the PC.
    • When the SD Card is not installed to the vision system, the Use SD Card checkbox is disabled. When the SD card is installed to the vision system but there is no backup for the selected vision system on the PC, the Use SD Card checkbox is checked and disabled.
    • If a vision system with a SD Card is selected but the Use SD Card checkbox is unchecked, the archived data will be restored from the PC. For more information on the archived locations (PC or SD Card), refer to the Backup dialog.
  4. Click Restore.


Restore From Dialog

The Restore From dialog allows you to retrieve the following:

  • The most current archive of jobs, images, and configuration data for an In-Sight vision system/emulator.
  • Older archived copies of jobs, images, and configuration data for an In-Sight vision system/emulator.
  • An archive from a different In-Sight vision system/emulator
  • A backup from the SD Card installed to the vision system

Restore From the PC

Archived backups on the In-Sight vision system/sensor are restored from the Backup Directory, which is defined in the Options dialog. In-Sight Explorer will look for any subfolders that match sensor names from the In-Sight Network and display them in the Restore From dialog.

If a vision system has only been backed up once, then a single instance of its name (with a folder [image] icon) will appear in the right-hand pane. If a sensor has been backed up multiple times, additional folders show up with incremental numbers following the sensor name (such as is7802_010203.000, is7802_010203.001, etc.) The highest number corresponds to the most recent backup for a given sensor.

Note:
  • Vision systems/sensors must be Offline in order to perform the Restore From function; attempting to restore an Online vision system/sensor will prompt a warning dialog to take the sensor Offline.
  • Restoring an In-Sight vision system/sensor from the archive of a different vision system/sensor can cause unexpected behavior if the two sensors are different models (for example, attempting to restore from an In-Sight 5400C archive to an In-Sight Micro 1400 vision system); some job functions of the source In-Sight vision system/sensor might not be supported on the target In-Sight vision system/sensor.
  • When restoring, existing files with the same name on the vision system/sensor or emulator, including the current Network Settings, will be overwritten. Existing files which are not in the set of files being restored will not be overwritten.
  • If a vision system/sensor is restored, the User List will not be cleared. Therefore, any user names that were added to the User List before the vision system/sensor has been restored will remain on the vision system/sensor after it has been restored. After the vision system/sensor has been restored, manually add or remove users from the User List.
  • The Backup Directory's default folder is in the following location, to allow Standard User access: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x

Restore From the SD Card Installed to the Vision System

The most recent backup on the SD card will be restored to the In-Sight vision system.

Note:
  • The vision systems must be Offline in order to restore from the SD card.
  • The SD card stores one backup only. For the subsequent backups, the previous backup will be overwritten.
  • A backup on the SD card can only be restored to the In-Sight vision system that the SD card is installed.

Use the Restore From Dialog

  1. From the System menu, click Restore From.

  2. Select a vision system or emulator from the left-hand pane to receive files from the backup. Only one vision system or emulator can be selected at a time.
  3. Select the backup location from the right-hand pane to restore.

    1. SD Card: The last backup will be restored.

      Note: The SD Card option is enabled only when the In-Sight vision system with the SD Card installed is selected in the left-hand pane (the Select In-Sight Sensor to Restore list box).
    2. Backup Set: Select an archive from the list.
  4. Click Restore From.


Clone Dialog

The Clone dialog allows you to mimic the job and image data (as well as most vision system settings) from a source vision system to one or more destination vision systems.

Note:
  • Host Name, Use DHCP server, IP Address, Subnet Mask, Default Gateway, DNS Server and Domain Name settings are not copied to the destination vision system(s).
  • If a vision system is cloned, the User List will not be cleared. Therefore, any user names that were added to the User List before the vision system has been cloned will remain on the vision system after it has been restored. After the vision system has been cloned, manually add or remove users from the User List.

Use the Clone Dialog

  1. To display the Clone dialog, click Clone from the System menu.

  2. Select a vision system from the left-hand pane that you would like to use as the clone source.
  3. Select one or more vision systems from the right-hand pane to receive copies of the files from the source vision system.
  4. Click Clone.


Update Firmware Dialog

The Update Firmware dialog is used to load the most current version of In-Sight firmware onto In-Sight vision systems. For more information on supported firmware version, see Firmware Versions.

Update the Firmware

Note:
  • To update the firmware on an In-Sight vision system, the user must log on as a user with Full permissions.

  • This dialog does not support updating the firmware on I/O modules or the firmware on In-Sight vision systems that are on different networks and added to In-Sight Explorer using In-Sight Host Table. The firmware on vision systems on different networks that are added to In-Sight Explorer using Explore Remote Subnet List can be updated; however, Cognex recommends to place vision systems on local network when updating firmware to avoid any network failure.

CAUTION: Do not power cycle the device while the firmware is being updated.

  1. Connect the In-Sight vision system to the network as instructed in the hardware installation documentation.

  2. Launch In-Sight Explorer.

  3. Optionally, backup each vision system before proceeding with the Firmware Update.

    Note: The firmware update process will erase all job and settings files from In-Sight non-volatile flash memory. Although In-Sight Explorer creates a temporary copy of all jobs and settings prior to the firmware update, it is recommended to manually back up these files prior to starting the firmware update process. For more information, see Backup Dialog.
  4. Verify the following:

  • All target vision systems are Offline.

  • No other users are logged on to the target vision systems.

  • A new job is loaded on each vision system.

    Tip: Force Update can be used to place the target vision systems Offline and disconnect other users from the target vision systems during the firmware update process.

  5. From the System menu, click Update Firmware.

  6. Select the In-Sight vision system(s) to be updated by checking the vision system's checkbox.

    Note:
    • The New Version column shows the firmware version to be installed to the vision system. Depending on the vision system's Model type, the firmware version to be installed will be different. The vision system can only be updated to the last supported firmware version. For example, an In-Sight 1000 series vision system can only be updated to version 4.x.x, the last supported firmware version. On the other hand, an In-Sight 8405 vision system can be updated to the current version. For a complete list of models and supported firmware versions, see Firmware Versions.
    • Multiple vision systems can be updated at the same time even if the New Versions column shows different firmware versions.
    Tip:
    • The search box can be used to filter vision systems dynamically, based on the information in the Name, Model and Version columns. The vision systems will not be filtered based on the status.
    • To select multiple, non-consecutive vision systems, hold down the CTRL key and highlight the tools, and then check one of the highlighted checkboxes.
    • To select multiple, consecutive tools, hold down the SHIFT key and highlight the first vision system, and then the last tool in the list, and then check one of the highlighted checkboxes.

  7. If you have multiple versions of In-Sight Explorer software installed to the PC, you can upgrade or downgrade the firmware to a different version by using the drop-down in the New Version column. For example, if you have In-Sight Explorer 5.4.0 and 5.6.0 installed to the PC, you can upgrade or downgrade an In-Sight 2000 series vision sensor's firmware to 5.6.0 or 5.4.0; or you can upgrade or downgrade an In-Sight 1000 series vision system's firmware to 4.10.5 or 4.10.4.

  8. Optionally, check the Force Update checkbox. When checked, In-Sight Explorer forces to update the firmware by placing the vision system Offline, disconnecting other user from the vision system or ignoring any backup errors. By default, this checkbox is unchecked and the firmware update is aborted if the vision system is Online, logged on by other user or a backup error occurs.

    Note:
    • Save jobs before updating firmware. When the Force Update checkbox is checked, any unsaved job will be lost during the firmware update process.
    • If the vision system is forced to go Offline, the vision system will be placed Online again once the firmware update is completed.
    • If the user is forced to be disconnected from the vision system, the user will be connected to the vision system again once the firmware update is completed.
  9. Optionally, check the Disable backup and restore checkbox. When checked, the firmware will be updated without backing up and restoring files. By default, this checkbox is unchecked, and the backup and restore operations will be performed. If a backup error occurs, the firmware update is aborted.

  10. Click Next.

  11. Verify that each vision system listed in the dialog is to receive new firmware.

  12. Click Update Firmware.

  13. Once all vision systems have been updated and rebooted, click OK to close the Firmware Update dialog, or click Go Back to continue updating other vision system's firmware. If firmware update is failed, click Go Back and check the Force Update and/or Disable Backup and Restore checkboxes and update the firmware again.

    Note:
    • If "Faulted" is prepended to the Model type (e.g. "Faulted 8405"), it indicates that the vision system has failed to complete the firmware update process and is in an unusable state. You must connect the vision system to a DHCP server and update the firmware again to recover from this state.
    • If firmware update fails, backup files are retained in the Backup Directory specified in the Options dialog.

Troubleshooting

Error Messages

If an error occurs during the firmware update process, power-cycle the vision system and restart the firmware update.

Lack of Available Flash Memory

If a job containing a large number of functions is loaded on an In-Sight vision system when a firmware update is attempted, the update may be interrupted due to lack of available flash memory. If this occurs:

  1. Ensure that the vision system is Offline.
  2. Load a new job (from the File Menu, click New Job).
  3. Try the firmware upgrade again.

If the jobs on an In-Sight vision system consume a large portion of available flash memory, the firmware update may be interrupted due to lack of available flash memory. If this occurs:

  1. Delete the job files from the vision system.

  2. Try the firmware upgrade again.

    Note: The amount of available flash memory for In-Sight 70xx - 74xx series vision systems was increased from 256MB on In-Sight 4.7.0 firmware to 512MB on In-Sight 4.7.1 and later firmware. Therefore, if an In-Sight 70xx - 74xx series vision system undergoes a firmware downgrade from 4.7.1 or later to 4.7.0, and there was more than 256MB of data, one or more files may fail to be properly copied and pasted during the restore. If the proc.set file is not properly restored, copy the proc.set file from the backup directory of the PC, remove unnecessary files on the vision system and paste the proc.set into the directory.

Firmware Versions


Firmware Versions

The following topics list the supported firmware versions for In-Sight vision systems and sensors.

Firmware Version 4.x.x and Earlier

Firmware Version 5.x.x and Later


Add Sensor/Device to Network Dialog

The Add Sensor/Device to Network dialog allows you to configure In-Sight Ethernet devices. You can use this dialog to:

  • Configure In-Sight devices for communication on a TCP/IP subnet or for a direct connection to a PC.

  • Configure In-Sight devices with invalid network settings. These devices are automatically detected and displayed in the list. If an In-Sight device is power-cycled while the dialog is open, it is also added to the list.

    Tip: If the device does not automatically appear in the list, select the Show All radio button to display all In-Sight devices detected on the subnet.
  • Reset the Admin password.
  • Reset the In-Sight device to the factory default settings.
Note:
  • You must have administrative privileges to the device to perform any of the Add Sensor/Device to Network operations.
  • The full functionality of the Add Sensor/Device to Network dialog is available for devices running firmware 4.1.0 or later; upgrading to the latest version is recommended.
  • Devices with temporary link-local IP addresses are automatically displayed in the Add Sensor/Device to Network dialog if the network adapter on the computer does not have a link-local IP address assigned; replacing these devices' IP addresses with static or dynamic IP addresses is strongly recommended. For more information, see Link-local IP Address.
  • Devices on remote networks are not displayed in this dialog. To connect to devices on remote networks, use the Explorer Host Table Setup Dialog or the Explorer Remote Subnet List on the System menu.

Add Sensor/Device to Network Dialog Controls

To display the Active Cells Limit dialog, click Add Sensor/Device to Network from the System menu. The fields in the dialog remain disabled until a device is selected in the list.

  • Host Name: Specifies the name of the networked In-Sight device. Each device has its host name set automatically the first time it boots. You can change the host name by entering a new name into the field. Host names can contain a maximum of 63 characters. Valid characters for the host name are A–Z (upper and lowercase), 0 - 9, hyphen ('-'), colon (:), period ('.') and underscore ('_').

  • Obtain IP Address Automatically (DHCP): Specifies that the network settings of the In-Sight device will be configured dynamically by the DHCP Server on startup. For more information, see Dynamic IP Address or Dynamic Host Configuration Protocol (DHCP) Server
  • Use the Following Network Settings: Specifies that the In-Sight device will be configured according to the network settings configured below.
    • IP Address: Specifies a unique identifier for each In-Sight device on the network, which must be consistent with the IP address-numbering scheme of the local network.

    • Subnet Mask: Defines which part of the IP address refers to the network and which part refers to the host. The network part of the IP address is the same for all hosts on the same subnet, and the remainder is unique to each host.

      There are three classes of subnet masks. The class of a particular subnet on a network is defined by the number of bits used to represent the network and host address portions in the IP address, as in the table below:

      Class Subnet Mask Network Address Host Address

      A

      255.0.0.0

      8 bit

      24 bit

      B

      255.255.0.0

      16 bit

      16 bit

      C

      255.255.255.0

      24 bit

      8 bit

      For example, consider a networked In-Sight host system with the IP address 192.168.0.1. If the first three numbers (192.168.0) identify the 24-bit network address, and the last number (1) is the 8-bit address for the In-Sight host on the network, then the subnet mask for this host is 255.255.255.0.

    • Default Gateway: Specifies the IP address of the gateway host, if available on the network. The gateway host is responsible for relaying data between hosts on different networks. If an In-Sight device needs to communicate with a device on a different subnet, enter the address of the gateway device in the Default Gateway field. Otherwise, leave the field blank.
    • DNS Server: Specifies the IP address of the host on the network providing DNS resolution, if available. For more information, see Domain Name Service (DNS) Server.

    • Domain Name: Specifies the network domain for the host network. Domain names can contain a maximum of 63 characters. For more information, see About Domains.

  • Copy PC Network Settings: When enabled, specifies that all the network settings for the In-Sight device (except for the host portion of the IP address) will be configured according to those of the local computer.
  • Reset Admin Password: When enabled, resets the admin password for the In-Sight vision system to the factory defaults (blank). For more information, see User Access Settings Dialog.

  • Reset Sensor Settings to Factory Defaults: When enabled, resets all the settings for the In-Sight vision system (except for the network settings in this dialog) to the factory defaults. For example, user list, discrete I/O, date/time, host list, serial and FTP settings will all be reset. For more information, see PROC.SET

    Note:
    • This option is disabled for the CIO-MICRO and CIO-MICRO-CC I/O modules.
    • The In-Sight emulator can be reset to the factory defaults using the Emulation option on the Restore Defaults dialog accessible from the Options dialog. For more information, see Restore Defaults.
  • Flash Lights: Causes the LEDs on the In-Sight device to flash, to help you visually locate it. This button toggles to the Stop Flashing button, and the LEDs continue flashing until you do one of the following: click Stop Flashing, close the Add Sensor/Device to Network dialog or select another device in the list.
  • Refresh: Refreshes the list of In-Sight devices.
  • Show All: Displays all In-Sight devices detected on the subnet.
  • Show New (default): Displays In-Sight devices with invalid network settings on the subnet. An In-Sight device that is power-cycled on the subnet while the dialog is open is also added to the list.

Reconfigure Invalid Network Settings

  1. Verify that your device is physically connected to the network.

  2. Open the Add Sensor/Device to Network dialog and select the device from the list. If the device does not appear in the list, select the Show All button or power-cycle the device.

    Note: When cycling power on the In-Sight 70xx - 74xx series vision system, Cognex recommends that the power be disconnected for at least 5 seconds.
  3. Verify that the host name is correct.

  4. Use either a dynamic or a static IP address for the device.

    For a dynamic IP address:

    1. Select Obtain IP Address Automatically (DHCP), which enables the DHCP server to dynamically configure the device on startup.

    For a static IP address:

    1. Select Use the Following Network Settings.
    2. Enter an IP address.
    3. Do one of the following:
      • Select Copy PC Network Settings, which automatically assigns the local computer's subnet mask, default gateway, DNS server and domain name to the device.
      • Contact your network administrator for the subnet mask, default gateway, DNS server and domain name and enter them manually.

  5. Click Apply.

    Note:

    If the selected vision system is running firmware 3.4.x or earlier:

    • A dialog will appear, indicating that the vision system settings will automatically be reset to the factory defaults.
    • A progress bar will appear, prompting you to cycle power on the vision system (as a result of the power cycling, the dialogs mentioned in steps 8 and 9 will not appear).
  8. In the confirmation dialog that appears, click OK.
  9. In the verification dialog that appears, click OK.

Reset In-Sight Vision System Settings to the Factory Defaults

Selecting this option will reset all the settings for the In-Sight vision system (except for the network settings in this dialog) to the factory defaults. For example, user list, discrete I/O, date/time, host list, serial and FTP settings will all be reset. One possible application is if you have forgotten the password to a vision system and want to revert to the default, which is <blank>.

Note:
  • This option is disabled for the CIO-MICRO and CIO-MICRO-CC I/O modules.
  • The In-Sight emulator can be reset to the factory defaults using the Emulation option on the Restore Defaults dialog accessible from the Options dialog.
  1. Verify that your device is physically connected to the network.

  2. Open the Add Sensor/Device to Network dialog and select the device from the list. If the device does not appear in the list, select the Show All button or power-cycle the device.

    Note: When cycling power on the In-Sight 70xx - 74xx series vision system, Cognex recommends that the power be disconnected for at least 5 seconds.
  3. Select Reset Sensor Settings to Factory Defaults.
  4. Click Apply.
  5. In the confirmation dialog that appears, click OK.
  6. A progress bar appears; cycle power on the vision system, as prompted, so the configuration changes take effect.
  7. Note: When cycling power on the In-Sight 70xx - 74xx series vision system, Cognex recommends that the power be disconnected for at least 5 seconds.
  8. In the verification dialog that appears, click OK.


Explorer Host Table Setup Dialog

The Explorer Host Table Setup dialog provides In-Sight Explorer access to vision systems or emulators on different subnets and allows you to create aliases for vision systems or emulators. Explorer Host Table entries do not actually change the network settings of hosts at the specified IP addresses; these entries simply appear as additional vision systems or emulators to the In-Sight Network pane.

CAUTION: Sensors that are configured using DHCP cannot be guaranteed to have a specific IP address. Since the Explorer Host Table requires a fixed IP address in order to communicate with a sensor, it is strongly recommended that you set up any sensors on different subnets with static IP addresses.

Explorer Host Table Setup Dialog Controls

To display the Explorer Host Table Setup dialog, click Explorer Host Table from the System menu.

  • Add: Creates a new entry in the host table. You will be prompted with the Add Host dialog, where you can enter the host name, IP address and device type of the new host. When finished, click OK.

    Note:
    • Valid characters for the Host Name are A-Z (upper and lowercase), 0-9, hyphen ('-'), colon (:), comma (',') and underscore ('_').
    • Host Names can contain a maximum of 63 characters.

  • Edit: Modifies an existing entry in the host table. Select an entry from the list and click Edit. You will be prompted with the Edit Host dialog, where you can change the host name, IP address or device type of the host you selected. When you are finished, click OK.

  • Delete: Removes a host from the host table. Select the host that you wish to delete and click Delete.

    Tip: To select multiple hosts, hold down the CTRL key while selecting the Host Names.

Host Parameters

  • Host Name: The name of the networked In-Sight vision system or emulator to map (or assign) to the specified IP address. The host name entered will appear in any list of host names throughout the In-Sight interface.
  • IP Address: The IP address of the networked In-Sight vision system or emulator to map to the specified host name.
  • Sensor Type: The device type of the networked In-Sight vision system or emulator to map to the specified host name/IP address. The icon of the specified device type will be displayed next to the drop-down.


Explorer Remote Subnet List

Configures remote subnet settings to add and manage subnets in the In-Sight Network pane. When no remote subnetwork are configured, vision systems which are not in the same subnetwork as your PC will be ignored during automatic discovery. Configuring a remote subnet allows vision systems from that subnetwork to appear in the In-Sight network list automatically when your PC receives discovery message from them, even if they are not in the same subnetwork as your PC.

Explorer Remote Subnet List Dialog Controls

To display the Explorer Remote Subnet List dialog, click Remote Subnets from the System menu.

  • Name: Displays the name for the subnet, as it appears in the In-Sight Network pane.
  • IP Address: Displays the network IP address of the remote subnet.
  • Mask: Displays the subnet mask of the remote subnet.
  • Custom Gateway: Displays the gateway IP address, if necessary.
  • Add: Launches the Add Subnet dialog, where subnet information is added.
  • Edit: Launches the Edit Subnet dialog, where a previously created subnet may be modified.
  • Delete: Removes the selected subnet from the list.

Add/Edit Subnet Dialog Controls

The Add Subnet dialog is launched by pressing the Add button in the Explorer Remote Subnet List. The Edit Subnet dialog is launched by selecting an existing subnet in the Explorer Remote Subnet List and pressing the Edit button, or by double-clicking the selected subnet in the list.

  • Name: Specifies a descriptive name for the subnet, as it appears in the In-Sight Network pane.
  • IP Address: Specifies the network IP address of the remote subnet.
  • Mask: Specifies the subnet mask of the remote subnet.
  • Use Custom Gateway: Specifies whether or not a custom gateway is required to access the subnet, if the network infrastructure is incapable of routing to the network.
  • Gateway: Specifies the gateway IP address to be used to access the remote subnet.


Options Dialog

The Options dialog allows you to customize In-Sight Explorer's startup and default GUI preferences, to configure the Offline In-Sight emulator, and to configure file utility preferences.

To display the Options Dialog, click Options from the System menu:

Restore Defaults

Access Management Panel

Emulation Panel

File Utilities Panel

Image Display Panel

Job View Panel

Record Defaults Panel

User Interface Panel


Restore Defaults

The Restore Defaults dialog allows you to reset specific options to their original values as when In-Sight Explorer was installed. This can be useful if, for example, if you changed display resolutions and certain dialogs are being displayed at inaccessible regions of the screen. Options can be restored by individual category or all at once, depending on the checkboxes selected.

Note: Screen captures for each category, below, show default settings.


Access Management Panel

  • Start at Windows Log On: Select this checkbox to automatically launch In-Sight Explorer when you log on to a PC running Microsoft Windows.

    Note: When attempting to change the Start at Windows Log On option, the Run As dialog will be displayed if you are logged into Windows as a Standard User and the User Account Control (UAC) is disabled. Provide the Administrator credentials to continue the operation. For more information, see Run As Dialog.

  • Confirm Program Exit: When this checkbox is selected, you will be prompted with a confirmation dialog each time In-Sight Explorer is exited. This confirmation is primarily a reminder that any unsaved changes to the active job on the local emulator will be lost upon exit. When this checkbox is cleared, no confirmation will be required to exit the application.

    Note: Jobs on In-Sight vision systems will not be lost when In-Sight Explorer exits; however, if jobs are not saved before the vision system is power cycled, then unsaved job data will be lost.
  • Startup User Name: Specifies the User Name that will be automatically logged on to In-Sight Explorer when the application is launched; by default admin is selected.

  • Startup Password: Specifies the Password for the Startup User Name; by default this field is blank.

    Note:
    • The User Name and the Password in the Options dialog must match those defined in the User Access Settings dialog. Otherwise, the Log On/Off dialog appears and you are prompted to enter the User Access Settings' User Name and Password when the application is launched. For more information, see User Access Settings Dialog.
    • The User Name and Password lengths cannot exceed 15 characters, and both are case-sensitive.

  • Require Password To Exit: Select this checkbox to prompt a password whenever In-Sight Explorer is closed.

    Note: When attempting to uncheck the checkbox, you may be prompted to enter the password (the default password is blank).
  • Set Password:Opens the Change Password dialog to configure the password to exit In-Sight Explorer.


Emulation Panel

  • Use Emulator: When selected, this checkbox enables the offline programmer known as the In-Sight offline emulator. The emulator will start each time In-Sight Explorer is launched. To disable the emulator, clear this checkbox. For more information, see In-Sight Emulator.

    CAUTION: By unchecking Use Emulator, all local FTP services will be shut down including any WriteFTP, WriteImageFTP, control, or logging operations.

  • Model: Determines the emulator's behavior. The drop-down list includes all supported In-Sight vision systems, and the tools/functions that are available on those vision systems.

    Note:
    • The emulator that launches is the last supported version of the Model, except Standard (default) that always launches the latest emulator. For example, when In-Sight 8405 is the selected Model, the 5.x.x emulator is launched. When In-Sight Micro 1400 is the selected Model, the 4.x.x emulator is launched. For a complete list of models and supported firmware versions, see Firmware Versions.
    • Depending on the emulator version (5.x.x or 4.x.x), the Working Emulator Directory will be different:
      • 5.x.x emulator: [ProgramData]\Cognex\In-Sight\Emulators\5.x.x
      • 4.x.x emulator: [ProgramData]\Cognex\In-Sight\Emulators\4.x.x

      For example, if a job is saved to a 4.x.x emulator (e.g., In-Sight Micro 1400) and then the emulator Model is changed to 5.x.x (e.g., Standard), when attempting to open a saved job from the Open dialog, the job is not listed in the dialog.

    • The above working emulator directory is used regardless of the installation location of In-Sight Explorer.
    • Certain acquisition functions (such as Partial Acquisition and Lighting Parameters) are not supported on emulators. It is possible to create these functions on a vision system that supports them and load that job to an emulator which does not support the functions. This may cause the AcquireImage function in cell A0 to report #ERR.
  • FTP Sever Logins: Defines the maximum number of simultaneous incoming FTP connections the emulator can accept (0 to 32; default = 20).

  • Authorized FTP Directory: Specifies a path for FTP services. This is an additional directory that can be used for FTP server access, where files and images can be accessed and stored, allowing the directory and any sub-directories to be accessible to the FTP server (in addition to the emulator's working directory).

    Note: This option requires that Use Emulator is checked. The FTP directory must be a rooted, local path (e.g., C:\...) with proper permissions to write to the directory. The FTP directory must also exist. Any attempts to access the Authorized FTP Directory must precisely match the specified path. For example, if the Authorized FTP Directory is C:\temp, any requests to store the file "abc.txt" to that directory must be of the format, "put c:\temp\abc.txt." If the command is specified as "put abc.txt" instead, the file will be placed in the emulator's directory.
  • Offline Programming Reference: Code number that is automatically generated based upon your PC's configuration. Use this Reference number to obtain an Offline Programming Key to unlock the emulator.

  • Offline Programming Key: If In-Sight Explorer does not detect any In-Sight vision systems on your network, you are required to enter an Offline Programming Key here, to configure In-Sight jobs locally in the In-Sight Offline emulator environment. To obtain a Key, access the In-Sight® Key Generator site and follow the instructions.

    CAUTION: If you close the Options dialog without entering an Offline Programming Key, the Reference code will change. This will require you to obtain a new key upon reopening the dialog.
    • When attempting to enter the Offline Programming Key, the Run As dialog is displayed if you are logged into Windows as a Standard User and the User Account Control (UAC) is disabled. Provide the Administrator credentials to continue the operation. For more information, see Run As Dialog.
    • If you have purchased Offline programming licenses for any version of PC Host, then these licenses will work as valid Offline Programming Keys for In-Sight Explorer.
  • Help: Displays the Software Registration.


File Utilities Panel

  • Explorer FTP Port: Defines the network port that In-Sight Explorer attempts to connect to remote vision systems for file saving and opening. The vision system must have the Local Port in the FTP Settings dialog configured to the same value as the Explorer FTP Port for In-Sight Explorer to perform file operations (such as Backup, Restore, Firmware Update) and to view files in the In-Sight Files pane (1 to 65535; default = 21). For more information, see FTP Settings Dialog.

  • Backup Directory: Defines the folder on the local PC that In-Sight Explorer stores backups of In-Sight vision systems or emulators. The default location is: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x.

  • Allow Online Backups: When checked, In-Sight Explorer allows you to back up vision systems when Online. When unchecked, Online vision systems may not be backed up. You are prompted with a dialog to place the vision system Offline before proceeding with the backup operation. For more information, see Online/Offline.
  • Enable Passive FTP: When checked, the In-Sight Explorer allows you to save and load files using passive FTP mode. This option is useful when you need to access an FTP client through a firewall that does not allow connections to be initiated from the outside. By default, this option is enabled.


Image Display Panel

  • Low Saturation Level: When Show Image Saturation is enabled from the Image menu, pixels in the image that are less than or equal to the specified 8-bit value (the greyscale value for non-color In-Sight vision systems or the maximum R, G or B value for color In-Sight vision systems) are displayed in blue. (0 to 255; default = 5) For more information, see Color Components of a Pixel.
  • High Saturation Level: When Show Image Saturation is enabled from the Image menu, pixels in the image that are greater than or equal to the specified 8-bit value (the greyscale value for non-color In-Sight vision systems or the maximum R, G or B value for color In-Sight vision systems) are displayed in red. (1 to 255; default = 240) For more information, see Color Components of a Pixel.


Job View Panel

  • Make Spreadsheet View the Default View: When checked, In-Sight Explorer opens in Spreadsheet View.
  • Locked Connections: When checked, users are prevented from remotely logging on to a vision system or emulator if another user is already logged on.
  • Confirm Online / Offline Transitions: When checked, you are prompted with a confirmation dialog each time you toggle the Online state of a vision system. When unchecked, no confirmation is required to change the Online/Offline state. For more information, see Online/Offline.

  • Default Transparency: Specifies the default opacity of the spreadsheet overlay in relation to the background image and graphics. When this value is set to 0, the spreadsheet overlay completely blocks the background image and graphics. Increasing the percentage allows more of the image and graphics to show through the spreadsheet. This setting is overridden if any changes are made in the Overlay Transparency from the Image Menu.

    Note: By configuring a Custom View within the Spreadsheet View, you can remove the spreadsheet gridlines and control the size, positioning, and other characteristics of the spreadsheet display. For more information, see Define a Custom View of the Spreadsheet.


Record Defaults Panel

The Record Defaults panel options are the default settings used for all vision systems and emulators the first time the Record option is executed. Use the Record/Playback Options dialog to adjust Record settings on an individual vision system. For more information, see Record/Playback Options Dialog.

Tip: Use the Record Defaults panel to configure Record settings on multiple vision systems and emulators prior to the first execution of the Record option. For example, you can change the default Record Folder directory path for multiple vision systems that have never executed the Record option.

  • Record Folder: A user-specified directory for storing recorded images.

    Note: The Record Folder's default location is: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x
  • Maximum Images: The maximum number of images stored in the Record Folder. (1 to 10,000; default = 10,000)

  • Image Resolution: Sensor resolution while recording images. The sensor resolution will be restored to its original settings, configured in the Image Settings dialog, once recording is complete. Resolution options are: Full, Half, Quarter and Eighth resolution for stored images; the default resolution is Full. For more information, see Image Settings Dialog.

    Note: The Eighth resolution option is not supported for color vision systems.

  • Bit Depth: Specifies the bit depth to use when recording color images. (16 bit or 24 bit; default = 24 bit)

    Note:
    • This option is only supported on Color In-Sight vision systems.
    • JPEG (*.jpg) images are always recorded at 24-bit depth. If 16-bit depth is necessary, record the images as Bitmap files (*.bmp).
  • Filename Format: The filename format and file type of recorded images.
    • Prefix: The filename prefix of recorded images.
    • Format: The filename format of recorded images. Format options are: [Index] and [DateTime].
    • File Type: The file type of recorded images. File Type options are: Bitmap files (*.bmp) and JPEG files (*.jpg).
    • Example: Displays an example of the naming convention of recorded image files based on the Filename Format options currently selected in the Format and File Type drop-down lists.


User Interface Panel

  • Language: Sets the default language to use throughout In-Sight Explorer's interface. In-Sight Explorer must be restarted for the language change to take effect. In-Sight Explorer supports English, Japanese, French, German, Spanish, Chinese (Simplified) and Korean.

  • Use English Symbolic Tags for EasyBuilder: When checked all EasyBuilder symbolic tags are in English only. The user interface is displayed in the language is specified in the Language drop-down list, but all symbolic tags, Location Tools and Inspection Tools are in English by default. For example, if a Blobs Counting Tool is added, the tool has English symbolic tags (Blob_1.Blob_Count) and an English default tool name (Blobs_1). If checked and the job contains pre-existing tools, these tool names are not converted to English.

    Note:
    • For the Use English Symbolic Tags for EasyBuilder setting to be correctly applied, the Options menu must be accessed from the EasyBuilder View. Applying this setting while in Spreadsheet View will not correctly enable this feature, and text still appears in the language set in the Language parameter.
    • Pressing the Undo button after enabling/checking the Use English Symbolic Tags for EasyBuilder does not undo this action, but instead performs the Undo operation on the last operation performed before enabling/checking this control. To undo enabling/checking this control, it must be manually disabled/unchecked.
  • Large Toolbar Icons: Select this checkbox to increase the size of the Toolbar icons. For more information, see Toolbars: EasyBuilder View.
  • Large Tree Icons: Select this checkbox to increase the size of the In-Sight Network, In-Sight Files and Palette icons.


Window Menu

The Window menu allows you to display the EasyBuilder View, Spreadsheet View or Sensor Status View of the In-Sight device that is selected within the In-Sight Network pane. The Window menu also lists all In-Sight sensors and emulators on which you have opened an EasyBuilder View, Spreadsheet View or Sensor Status View. Select a device from the Window menu to display its view.

  • Show EasyBuilder View: Shows the current image from the EasyBuilder GUI with its current settings. A status bar is included to indicate the Online/Offline status. This command is enabled if an emulator or a sensor that supports this view is selected in the In-Sight Network pane. For more information, see EasyBuilder View.
  • Show Spreadsheet View: Shows the current image from the In-Sight sensor as well as the semi-transparent spreadsheet overlay or Custom View (optional). A status bar is included to indicate the Online/Offline status. Spreadsheet Views for multiple sensors may be shown simultaneously. For more information, see Spreadsheet View.
  • Show Sensor Status View: The Sensor Status View displays information contained within the memory buffers that make up the Machine Status Stack. For more information, see Sensor Status View.
  • Open Web Browser View: The Open Web Browser View opens the default browser to the web-based human-machine interface (HMI) of the selected In-Sight vision system or sensor. For more information, see Open Web Browser View.
  • Arrange Icons: If numerous windows are minimized, the Arrange Icons option groups all of the minimized windows at the bottom of the work area.
  • Tile Horizontally: Tiles all non-minimized windows horizontally.
  • Tile Vertically: Tiles all non-minimized windows vertically.
  • Cascade: Arrange all non-minimized windows in a cascading style.

Show EasyBuilder View

Show Spreadsheet View

Show Sensor Status View

Open Web Browser View

Arrange Icons

Tile Horizontally

Tile Vertically

Cascade


EasyBuilder View

The EasyBuilder View is at the center of the EasyBuilder. Job parameters are set and edited based on what is displayed in this view.

The EasyBuilder View consists of three components:

  • The title bar, which displays the vision system name and file name of the active job.
  • The display area, which consists of the active image from the In-Sight vision system.

  • The status bar, which indicates the current available job size, as a percentage of allocated size and the Online/Offline status of the active In-Sight vision system.

    Tip: Use the Job Size Limit dialog to modify the available job size. For more information, see Job Size Limit.
Note:
  • If you drag and drop or load the job from your PC, the title bar displays "EasyBuilder View" until the job is saved to the vision system. Once the job is saved, the file name is displayed.
  • Shortcuts to images cannot be dragged to the display area or the In-Sight Files pane. Drag the original source image, rather than the shortcut, to the desired location.
  • EasyBuilder can display multiple views within its GUI: EasyBuilder Views, Spreadsheet Views and Sensor Status Views. Once you click on a Spreadsheet View or a Sensor Status View, however, the GUI changes from EasyBuilder to the corresponding interface for the selected view. For more information, see Spreadsheet View and Sensor Status View.
  • The number of views you can simultaneously display depends on your PC's hardware (CPU speed and memory, primarily). Opening more than 6 windows might exceed memory resources and cause unexpected behavior if the jobs are particularly complex.


Sensor Status View

Eight memory buffers are allocated within the vision system's memory for the Machine Status Stack. The Sensor Status shows the contents of these memory buffers, along with a diagnostic log of information used to diagnose errors on the In-Sight vision system.

The first buffer (buffer 0) is used to store the current Machine Status information. Each time the PushMSStack function is executed, the current Machine Status is loaded into buffer 0, shifting previous Machine Status information to the next buffer. When all buffers of the stack are full, the data in buffer 7 is discarded. All data in the stack is cleared when the vision system is power cycled. For more information, see PushMSStack.

Note:
  • Machine Status data stored in the stack is accessed using the GetMSBuffer Extended Native Mode command or from the Machine Status Port. For more information, see GetMSBuffer and Machine Status Port.
  • When In-Sight Explorer is using the Machine Status Port, other applications on the PC are allowed to access it.
  • A timeout exists of about 10 to 15 seconds on the Machine Status Port. If you stop polling for the status, you will be disconnected after this period.

Sensor Status Dialog

The operational status information within the Sensor Status dialog consists of the following:

  • Title bar indicates the active vision system name
  • Buffer index number (0 to 7)
  • Current system date & time
  • Online/Offline status
  • File name and location of the active job
  • Date and time the active job was loaded
  • User name that is logged onto the In-Sight vision system
  • Name of the active emulator, which is used to log on to the In-Sight vision system or emulator
  • User data (determined by the WriteMSStack function). For more information, see WriteMSStack.
  • A log of information used to diagnose errors on the In-Sight vision system.
Note:
  • The Sensor Status dialog does not display the entire contents of the Machine Status Stack. Use the GetMSBuffer Extended Native Mode command or access it from the Machine Status Port to view the entire contents, including:
    • The vision system model number.
    • Firmware version and build.
    • The time of the last system reboot and the operational status:
      • IDLE: The In-Sight system is Online, but no cells within the job are being executed.
      • BUSY: The In-Sight system is Online, and cells are currently being executed within the job.

      • MAINTENANCE: The In-Sight system is Offline.

    For more information, see GetMSBuffer and Machine Status Port.

  • If you drag-and-drop the job file from your PC, the Current Job field displays "Drag And Drop Job" until the job is saved to the vision system.
  • Because local PC paths are absolute with respect to a given PC and the directory hierarchy on one PC may not exist on another, PC paths are not displayed for the Current Job location.
  • When a vision system is configured as a Modbus/TCP server, the diagnostic log displays information about the client connection, client disconnect, client idle timeout and client connection refusal/maximum connection limits. Each diagnostic message contains date, time, session ID (a unique session identifier, which can be used to link diagnostic messages between the same Modbus/TCP client) and IP address of the client.


Open Web Browser View

The Open Web Browser View opens the default browser to the web-based human-machine interface (HMI) of the selected In-Sight vision system or sensor.

Note:
  • The Web HMI application is only available on vision systems or sensors running In-Sight firmware 5.6.0 and later.
  • The HTTPS HMI Mode is only available on vision systems or sensors running In-Sight firmware 5.7.3 and later.

Browser Requirements

The Web HMI application supports the following web browsers.

  • Google Chrome™ browser, version 64 or greater
  • Microsoft Edge, version 42.x or greater

Login Dialog

If you use the default credential (i.e., an admin user without password), the Web HMI application will automatically display. Otherwise, you will be prompted to enter the user name and password to log on to the vision system or sensor.

The Web HMI application is displayed based on the connection mode, which is defined in the HMI Settings dialog and the user access level, which is defined in the User Access Settings dialog on the Sensor menu.

  • Full: Offers complete, unrestricted access to the Web HMI application.
    • Note:
    • To display the Online/Offline, Trigger, Live Mode and Switch View control buttons in the Web HMI application, you need to check the corresponding checkboxes in the HMI Settings dialog first. For more information, see Open Web Browser View.
    • If your Web HMI application's connection mode is View Only Connection, you can only access the Web HMI application with a Locked access.

  • Protected: Offers access to the Online/Offline, Trigger, Live Mode and Switch View control buttons, Image Toolbar, and the editable EasyView pane. For more information, see Run Mode Controls Pane, Image Toolbar and EasyView Pane

    Note:
    • To display the Online/Offline, Trigger, Live Mode and Switch View control buttons in the Web HMI application, you need to check the corresponding checkboxes in the HMI Settings dialog first.
    • If your Web HMI application's connection mode is View Only Connection, you can only access the Web HMI application with the Locked access.
  • Locked: Offers access to the Switch View button, Image Toolbar, and the read-only EasyView pane.

Web HMI Display


Web HMI Display

Number | Description
1 | Image Toolbar
2 | Status Border
3 | EasyView Pane
4 | Run Mode Controls Pane

Image Toolbar

Status Border

EasyView Pane

Run Mode Controls Pane

Web HMI Supported Cell Types


Image Toolbar

The Image Toolbar is displayed when the Allow Adjust Image check box in the HMI Settings dialog is selected.

Zoom In | Click this button to increase the magnification level of the image.
Zoom Out | Click this button to decrease the magnification level of the image.
Fit | Click this button to fit the image inside the image window.
Fill | Click this button to fill the entire window with the image. No visible border will appear.
Rotate Counter-Clockwise | Click this button to rotate the image counter-clockwise in 90-degree increments.
Rotate Clockwise | Click this button to rotate the image clockwise in 90-degree increments.
Show Pan Control | Click this button to display/hide the Pan Control [image] button. By default, the Pan Control [image] button is displayed.
Show Selected Pixel Data | Click this button to display the X, Y position and the RGB values of the selected pixel.
Pan Control Button | Click the up, down, left and right arrow to move the image. Click the circle in the middle of the Pan Control button to reset the image to the original position.


Status Border

The status border indicates the pass or fail status of a job. If a result passes, the border will be green. If a result fails, the border will be red.


EasyView Pane

To display the EasyView pane in the Web HMI application, you need to:

  1. Create an EasyView within the In-Sight Explorer or EasyBuilder and save it with the job.
  2. Select Image with Graphics and EasyView and/or EasyView Only in the HMI View Selection dialog.
  3. Enable Allow View Selection in the HMI Settings dialog, if neither Image with Graphics and EasyView nor EasyView Only is the first view listed in the HMI View Selection dialog.
Note:
  • The EasyView pane is read-only if your user access level is Locked or your Web HMI Connection mode is View Only Connection.
  • For information about supported EasyView cell types, see Web HMI Supported Cell Types.


Run Mode Controls Pane

The Web HMI Run Mode Controls Pane contains the operational control buttons and status information of the connected vision system.

Note: Control buttons are enabled or disabled based on your HMI Settings Dialog, Web HMI Connection Mode, and your User Access Settings Dialog.
Button Description
Click this button to display or hide the Run Mode Controls pane.

Click this button to open the Device Information dialog for details of vision system or sensor's hardware information and network identification.
Click this control button to load a job from a vision system/sensor (including RAM Disk and SD Card), a disk or a remote location. For more information, see Load or Save a Job in Web HMI.
Click this control button to save a job to a vision system/sensor (including RAM Disk and SD Card), a disk or a remote location. For more information, see Load or Save a Job in Web HMI.
Click this control button to place the vision system or sensor online. To use this button, you need to enable the Allow online/offline check box in the HMI Settings dialog.

Click this control button to place the vision system or sensor offline. To use this button, you need to enable the Allow online/offline check box in the HMI Settings dialog.

Click this control button to trigger an image acquisition manually. To use this button, you need to enable the Allow Trigger check box in the HMI Settings dialog.
Click this control button to display a live video image to use when making adjustments to vision system or sensor's lens, field of view and focus. To use this button, you need to enable the Allow Live Video check box in the HMI Settings dialog.

Click this control button to display the next view. To use this button, you need to enable the Allow View Selection check box in the HMI Settings dialog.

You can customize the visible views and their order in the HMI View Selection Dialog dialog. When you open the Web HMI application, the first view listed in the HMI View Selection dialog is displayed as the default view.

The Web HMI application supports the following views:

  • Image with Graphics and EasyView: Displays the image, tool graphics, and the EasyView. To display this view, you must first create an EasyView within In-Sight Explorer and save it with the job. Then, you need to enable this view in the HMI View Selection dialog.
  • Image Only: Displays only the image.
  • Image with Graphics: Displays the image and tool graphics.
  • EasyView Only: Displays only the EasyView. To display this view, you must first create an EasyView within In-Sight Explorer and save it with the job. Then, you need to enable this view in the HMI View Selection dialog.
Click this control button to log out of the current session. This button is not displayed if you have a default credential (i.e., an admin user without password). When you click this button, you will close the Web HMI application and display the Login dialog box.


Web HMI Supported Cell Types

The Web HMI application supports below cell types in the EasyView pane:

  • Button: Displays a labeled button in the EasyView pane. Click the button to trigger an event. For more information, see Button
  • CheckBox: Displays a labeled check box in the EasyView pane. Select the check box to toggle the state of the check box and associated value. For more information, see CheckBox
  • ColorLabel: Displays a colored text string with colored background in the EasyView pane. For more information, see ColorLabel
  • EditAnnulus: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the position and size of the annulus can be adjusted. For more information, see EditAnnulus
  • EditCircle: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the position and size of the circle can be adjusted. For more information, see EditCircle
  • EditCompositeRegion: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the composite region can be adjusted. The composite region can consist of multiple subregions. A subregion can consist of an annulus, circle, polygon or rectangle. For more information, see EditCompositeRegion
  • EditFloat: Displays an edit box in the EasyView pane, which allows users to enter a floating-point numeric value. For more information, see EditFloat
  • EditInt: Displays an edit box in the EasyView pane, which allows users to enter an integer numeric value. For more information, see EditInt
  • EditLine: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the position and size of the line can be adjusted. For more information, see EditLine
  • EditMaskedRegion: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the composite region can be adjusted. The composite region can consist of multiple masked regions. For more information, see EditMaskedRegion
  • EditPoint: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the position of the point can be adjusted. For more information, see EditPoint
  • EditPolygon: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the position and size of the polygon can be adjusted. For more information, see EditPolygon
  • EditPolylinePath: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the composite region can be adjusted. The composite region can consist of multiple path segments. For more information, see EditPolylinePath
  • EditRegion: Displays a button in the EasyView pane. Click the button to switch the display to Interactive Graphics Mode, where the position, size, rotation, and bend of the region can be adjusted. For more information, see EditRegion
  • EditString: Displays a text edit box in the EasyView pane, which allows users to enter an alphanumeric text string. For more information, see EditString
  • FloatResult: Displays a floating-point numeric number as static text in the EasyView pane.
  • ListBox: Displays a drop-down list box in the EasyView pane, which provides users a list of options to choose. The currently selected option is highlighted. For more information, see ListBox
  • MultiStatus: Displays a simulated LED status array in the EasyView pane. For more information, see MultiStatus
  • Status: Displays a simulated multi-colored status LED with text label in the EasyView pane. For more information, see Status
  • StatusLight: Displays a simulated LED status light with text label in the EasyView pane. The color of the status light and the label can both be user-specified. For more information, see StatusLight
  • StringResult: Displays an alphanumeric text string as static text in the EasyView pane.


Help Menu: Spreadsheet View

The Help menu provides access to help and support services for In-Sight Explorer, as well as version build information and In-Sight sensor hardware details.

  • In-Sight Explorer Help: Opens this Online Help file.
  • In-Sight Release Notes: Displays the Release Notes for In-Sight Explorer and In-Sight firmware.
  • Online Support: Launches the Cognex In-Sight sensor support home page (requires Internet access): cognex.com/support/insight.
  • About In-Sight Explorer: Displays version and build information for In-Sight Explorer, as well as hardware and network details about each In-Sight sensor detected on your network (including Explorer Host Table entries.) For more information, see About In-Sight Explorer Dialog.

In-Sight Explorer Help

In-Sight Release Notes

Online Support

About In-Sight Explorer


About In-Sight Explorer Dialog

The About dialog displays two primary groups of information:

  • Code compilation (build) details for the In-Sight Explorer application.
  • Hardware, firmware, and configuration details for In-Sight vision systems and emulators detected on your subnet, as well as devices that are defined in the Explorer Host Table Setup Dialog.
Note: Should you require assistance, you may need to provide this information to Technical Support. For more information, refer to Technical Support.

About In-Sight Explorer Dialog Controls

To display the About In-Sight Explorer dialog, click About In-Sight Explorer from the Help menu.

  • Information specific to In-Sight Explorer:
    • The major, minor, and revision version numbers of the In-Sight Explorer application. [5.5.0]
    • The incremental build number of the In-Sight Explorer application. [798]
  • Information specific to In-Sight vision systems on your network:
    • Host name of the vision system. [is7802_070809]
    • Type of vision system, which indicates a specific model of In-Sight vision system, a PC running the emulator or an Explorer Host Table entry. [7802]
    • Major, minor, revision, and build numbers for the particular Firmware Version running on the vision system. [5.5.0 (358)]
    • MAC Address of the vision system. [00-d0-24-3c-ef-28]
    • IP Address of the vision system. [192.168.0.1]
    • Serial Number of the vision system. [1A1538XA014394]

Copy the Information Vision System Information

The information on In-Sight vision systems can be copied to the Windows clipboard. This feature is useful when contacting Cognex Technical Support. To copy the information on the desired vision system(s), do one of the following.

  • Select the desired vision system(s) and press CTRL+C.
  • Right-click the desired vision system(s) and select Copy.
Note:
  • To select the information on all vision systems in the table, press CTRL+A, or right-click and select Select All.
  • To select the information on multiple, non-consecutive vision systems, hold down the CTRL key and highlight the desired vision systems.
  • To select multiple, consecutive items, highlight the first vision system and hold down the SHIFT key, and then the last vision system, in the list.


Vision Tools

In-Sight vision processing tools consist of functions that extract and process image features for further data analysis and decision making. Vision Tools are inserted into the spreadsheet using functions from the Insert Function dialog or the Palette. For more information, see Insert Function Dialog and Palette: Spreadsheet View. The vision tools include:

  • Blob: Extracts, selects, and sorts blob data from an image region. This type of vision processing is sometimes referred to as connectivity analysis.
  • Color: Extracts color data and matches found colors to trained models.
  • Edge: Locates straight and curved edges. Sorts edges into pairs. Computes edge statistics.
  • Flaw Detection: Performs advanced detection on a part or product for unacceptable variations.
  • Histogram: Counts image pixels for statistical image analysis, as well as feature classification.
  • ID: Reads and verifies linear bar codes, 1D bar codes, and 2D matrix codes.
  • Image: Processes an image to enhance desirable features while removing or diminishing undesirable features.
  • InspectEdge: Performs advanced edge analysis for detecting defects.
  • OCV/OCR: Segments, extracts, and trains fonts for reading (OCR) and verifying (OCV) a string in an image.
  • Pattern Match: Locates features in an image that exhibit maximum similarity to a previously defined pattern.
Note: The availability of functions and Vision Tools is contingent upon the specific In-Sight vision system and firmware. For more information about specific function and Vision Tool availability, please contact your Cognex sales representative.

Blob

Color

Edge

Flaw Detection

Histogram

ID

Image

InspectEdge

OCV/OCR

Pattern Match


Property Sheet

A Property Sheet is used to configure In-Sight Explorer functions whenever a function returns a structure or the function has many input parameters.

Note: Functions that accept a variable number of parameters, such as the Graphics Controls functions ListBox, Select and Wizard, do not have Property Sheets; these functions are configured directly in the cell or formula bar on the Job Edit toolbar. Only functions with a fixed number of parameters have Property Sheets.

Every Property Sheet has a table that lists the default parameters, values and expressions of a function. Each row of a Property Sheet consists of a parameter name and value, or a group of expanded/collapsed parameters (indicated by the [image] / [image] symbols) and values.

Tip: Property Sheet parameters support drag-and-drop placement of their controls into the spreadsheet. By selecting a parameter from a Property Sheet and then dragging that parameter to the spreadsheet, the parameter's label and an edit control will be automatically created and referenced in the spreadsheet. For example, if the Property Sheet of an ExtractBlobs function were open, you may drag-and-drop the Threshold parameter into the spreadsheet in cell A2, with cell A2 being popluated with the text, "'Threshold" and A3 being populated with an EditInt function. The Threshold parameter in the ExtractBlobs function's Property Sheet will be automatically set as an absolute reference to cell A3.

Parameter values can be assigned through the following methods:

  • Cell References: The value is determined by either an Absolute Reference or Relative Reference to a cell in the spreadsheet.

    Note: When running In-Sight Explorer, if a parameter value is double-clicked and the ESC key is pressed, the text for the parameter will be copied to the operating system's clipboard, overwriting any previously copied text. When editing property sheets, it is recommend that the property sheet's menus or toolbar buttons be used to edit the parameters, instead of double-clicking them.

  • Coordinates: The value is determined by either entering Interactive Graphics Mode or manually entering numeric coordinate values.

  • Integer: The value can be increased or decreased by clicking the [image] buttons, or by manually entering the desired numeric value.

  • Text: The value is represented by an alphanumeric character string.

  • Checkbox: The value is assigned a 0 when unchecked and a 1 when checked.

  • Drop-down list: The value is selected from an available choice in the list; the value is set to the index number (zero-based) of the selected item within the list.

    Note: Property Sheet parameters are context-sensitive; therefore the menu bar and toolbars will only be enabled if the selected parameter supports that particular Edit or Insert ability.

Display a Property Sheet

Using the Insert Function dialog, insert a function into a cell in the spreadsheet. If the function has an associated Property Sheet, it will automatically open. Each Property Sheet consists of the following:

  • The title bar indicating the sensor, dialog and function names

  • Menu bar

  • Toolbar

  • The parameter configuration area

  • Context-sensitive help

    Note: If any text is highlighted in red, then the value contains an error which must be corrected before being accepted. If another parameter or the OK button is selected, the value will revert to the previous valid selection.

Edit a Cell Graphic in a Property Sheet

  1. Click on the parameter with an associated cell graphic.

  2. From the Property Sheet's Edit menu, click Graphic. Alternately, you can click the Edit Graphic [image] button on the Property Sheet's toolbar or double-click the parameter name with an associated cell graphic. The Property Sheet will disappear and the interactive graphic will be displayed on top of the image.

    Note: The Edit Graphic menu and toolbar button will be grayed out if the selected parameter does not have an associated cell graphic.
  3. To accept the modifications, click the OK button on the Job Edit toolbar, press ENTER or double-click within the cell graphic. To cancel the modifications, click the Cancel button on the Job Edit toolbar or press ESC.

Maximize a Region Cell Graphic

  1. Click on the parameter with an associated region cell graphic.

  2. From the Property Sheet's Edit menu, click on Maximize Region. Alternately, you can click the Maximize Region [image] button on the Property Sheet's toolbar. The region's cell graphic is resized, equal to the image region in the referenced Image data structure. Cell A0 is the default image source.

    Note: The Maximize Region menu and toolbar button will be grayed out if the selected parameter does not have an associated region cell graphic.

  3. To accept the modifications, click the OK button. To cancel the modifications, click the Cancel button.

    Closed Example

  1. Insert a FindPatterns function into the spreadsheet. The FindPatterns Property Sheet automatically opens. The Image parameter value is $A$0, referencing the default image source, cell A0.

  2. Highlight the FindRegion parameter.

  3. From the Property Sheet's Edit menu, click on Maximize Region. The region's cell graphic is resized, equal to the image region in the referenced Image data structure (cell A0).
  4. Highlight the ModelRegion parameter.
  5. From the Property Sheet's Edit menu, click on Maximize Region. The region's cell graphic is resized, equal to the FindRegion parameter.

Insert a Function in a Property Sheet

Inserting a function into a Property Sheet parameter allows you to create a dynamic argument. For example, if you had a FindPatterns function, and you needed the Threshold: Accept parameter to change dynamically with the image acquisition based on a set of fluctuating variances, you could insert a Mathematics function into the parameter to compute against those variances. By adding a function within the parameter (instead of creating a separate function within the spreadsheet and building the same formula and then referencing those cells), you can save time and computational space within the spreadsheet.

Note: The maximum length of formulas is 248 characters. If a formula is entered that is longer than 248 characters, In-Sight Explorer may become unresponsive until the property sheet is closed by canceling the change. All changes will be lost and the updated formula will not be accepted.

  1. Click on the parameter for which you would like to enter a function.

    Note: Functions cannot be placed into a group when collapsed; the group must first be expanded by pressing the plus button. Then select an individual sub-parameter.

  2. From the Property Sheet's Insert menu, click on Function. Alternately, you can click the Insert Function [image] button on the Property Sheet's toolbar.

    Note: The Insert Function menu and toolbar button will be grayed out if the selected parameter does not support a function.

  3. The parameter's value will switch to an editable expression:

  4. Manually type the name of the function, followed by an open parenthesis and the parameter data or press either the UP or DOWN ARROW on the keyboard to open the function box, which lists applicable functions.

    Note: When manually typing the name of the function, if any text is highlighted in red, then your formula contains an error which must be corrected before being accepted.

    To find a function, you can either begin typing the name of the function or scroll through the list of functions. Once you have found the function that you would like to insert, either press TAB or double-click the function.

  5. Once you have created your function, press the TAB key to accept the function and move to the next parameter:

  6. Pressing the ENTER key will automatically accept the function and exit the Property Sheet. Pressing the ESC key will exit the Property Sheet without accepting the function.

Insert a Cell Reference From the Property Sheet

  1. Click on the parameter for which you would like to set a cell reference.

  2. From the Property Sheet's Insert menu, click either Absolute Reference or Relative Reference. Alternately, you can click either the Insert Absolute Reference [image] button or the Insert Relative Reference [image] button on the Property Sheet's toolbar. The Property Sheet disappears and you enter cell selection mode.

    Tip: If applicable, double-clicking on the parameter also takes you to cell selection mode.

  3. Select the cell(s) containing the value(s) for that Property Sheet's parameter(s).

    Tip:
    • Multiple-cell references can be useful when defining parameters that have more than one value, such as fixtures and regions.
    • Once a cell reference is set within a parameter, it will be highlighted in the spreadsheet. The cell selection can be moved without closing the Property Sheet.
    • If you are manually typing a function into a parameter, if applicable, you can click on a spreadsheet cell using the relative cell reference cursor [image] (pressing Shift changes the cursor to an absolute cell reference [image]) to insert a cell reference.
  4. To accept the cell reference(s), click the OK button on the Job Edit toolbar, press ENTER or double-click the cell(s). To cancel the cell reference(s), click the Cancel button on the Job Edit toolbar or press ESC.
  5. After all the changes have been made to the Property Sheet, click either OK to accept the changes or Cancel to undo all changes and return to the spreadsheet.

Property Sheet Shortcuts

Action

Keyboard

Mouse
Open the property sheet
  1. Navigate to the desired cell with the ARROW KEYS
  2. Press ENTER or SHIFT+F3.
 Double-click the function in the spreadsheet. Alternately, on the Job Edit toolbar, click the Function [image] button.
Accept changes
  1. TAB to the OK button.
  2. Press ENTER.
 Click OK.

Cancel changes

 ESC Click Cancel.
Navigate among parameters

UP ARROW / DOWN ARROW

TAB / SHIFT+TAB

 Click the desired parameter.
Modify a parameter's value

Numbers can be incremented or decremented using UP ARROW and DOWN ARROW, respectively.

Note: Quotation marks are added automatically to text string parameters.
 Use the parameter's Edit controls ( [image] for example) to adjust the value as desired.
Set minimum numeric parameter value | CTRL+UP ARROW | N/A
Set maximum numeric parameter value | CTRL+DOWN ARROW | N/A
Insert a function | CTRL+SHIFT+F | On the Property Sheet's toolbar, click the Function [image] button.
Insert an absolute cell reference | CTRL+SHIFT+A | On the Property Sheet's toolbar, click the Absolute Reference [image] button.

Insert a relative cell reference

CTRL+SHIFT+R

 Double-click either the Value or the Expression cell for the desired parameter. Alternately, on the Property Sheet's toolbar, click the Relative Reference [image] button.
Expand a property group | PLUS (+ on the numeric keypad) | Click the plus [image] sign or double-click the function.
Collapse a property group | MINUS (- on the numeric keypad) | Click the minus [image] sign.
Expand a drop-down list | ALT+DOWN ARROW | Click the drop-down list [image] control.
Collapse a drop-down list | ALT+UP ARROW | Click the drop-down list [image] control.
Navigate through drop-down list values | UP ARROW / DOWN ARROW | Select the desired value.
Edit an interactive graphic | F9 | On the Property Sheet's toolbar, click the Edit Cell Graphic [image] button.
Maximize a region cell graphic. | CTRL+SHIFT+M | On the Property Sheet's toolbar, click the Maximize Region [image] button.
1 For functions that do not have a Property Sheet, the Insert Function dialog will be opened instead.

2 Certain functions (such as Controls) take special action after pressing ENTER on their cell. Use SHIFT+F3 instead to open the Property Sheet for these functions.


AcquireImage

The AcquireImage function specifies the parameters for capturing a digital image and transferring it to the In-Sight vision system's processing memory.

In-Sight vision systems capture all images using asynchronous reset and progressive scan. Greyscale vision systems produce 8-bit images, while color vision systems produce 24-bit images. The image acquisition process begins within approximately 250µs for all vision systems, and proceeds as follows:

  • The image sensor integrates light for the duration of time specified by the Exposure parameter.
  • The image accumulated in the image sensor is transferred, row-by-row, into a serial shift register.

  • For every row transfer, the sensor clocks the shift register, pixel-by-pixel, out of the image sensor through the following path:

    video amplifier -> Gain and Offset -> analog-to-digital converter -> vision processor memory

  • The transfer begins at the specified Start Row and proceeds for the specified Number of Rows.

The memory buffer containing the acquired image is represented in the spreadsheet as an Image data structure. The Image data structure returned by AcquireImage is in turn referenced by other In-Sight spreadsheet functions that process image regions. Any function that directly or indirectly depends on acquired image data is forced to update when a new image is acquired. This relationship between the input image and other functions in the spreadsheet is what drives the execution of vision tasks on In-Sight vision systems. For more information on dependencies and cell execution order, see Spreadsheet Cell Execution and Editing Reference.

Unlike other spreadsheet functions, AcquireImage exists permanently in cell A0 and cannot be cut, copied, or cleared from the spreadsheet. This enforcement guarantees that an image is always available in a predefined location. Most Vision Tool functions, as well as many other functions, take advantage of this by specifying an absolute reference to cell A0 as their default image source. For more information, see Cell References - Relative/Absolute.

Note:
  • The default AcquireImage parameter settings vary based on the vision system model. If a job is developed on one model and then loaded onto a different model, verify that the parameter settings are appropriately configured.
  • If the AcquireImage function's parameters are modified programmatically, when the function displays the result of the modified parameter depends on the selected Trigger parameter.
    • If the Trigger parameter is set to Camera, the AcquireImage function's parameters are loaded just after the acquisition. For example, if the function's Max Exposure value is programmatically adjusted, the change is not visible in the next image, but is available in the image after that.
    • For all other Trigger parameter modes, the parameter values are loaded when the acquire signal is received, so modifications are reflected in the next image.
  • When you open the AcquireImage property sheet, the vision system acquires a new image and it is displayed. If you click the Cancel button to exit the property sheet, the new image and any changes made in the property sheet are retained. If the previous image needs to be retained, save the image before you open the AcquireImage property sheet and then reload the image after opening the AcquireImage property sheet.
  • If you are connected to an In-Sight Emulator and want to view images from an In-Sight vision system that had acquired images with the partial acquisition parameters (Start Row and Number of Rows) enabled, set the Start Row and Number of Rows parameters of the Emulator to the same settings as those on the In-Sight vision system that acquired the images.
  • If a vision system running In-Sight 5.x.x firmware is power-cycled and no Ethernet connection is detected, it may result in missed triggers until the 30-second network timeout is complete and the vision system has fully restarted.
  • If using a color In-Sight vision system:
    • White Balancing is often employed as a method to equalize colors to compensate for differing lighting conditions. White balancing generates a histogram of the Red, Green, and Blue (RGB) channels of a 100x100 region in the center of the image. The peak response for each channel is found. The two channels with the lowest bin numbers are then divided into the highest bin number to get scale factors that are used to create color tables. These tables are referenced each time an image is acquired.
    • The white balance settings are stored with the job and take effect once the first image is acquired by that job (not upon job load). A white field image (such as a blank piece of paper) must be acquired before entering the AcquireImage property sheet. Also ensure that the lens aperture is adjusted so that the image is not approaching saturation where all bin values are 255). Pressing the White Balance button is the same as executing the WhiteBalance function in the spreadsheet.

AcquireImage Inputs

Syntax: AcquireImage(Trigger,Manual,Exposure,Auto Exposure.Mode,Auto Exposure.Max Exposure,Auto Exposure.Target Brightness,Auto Expose Region.X,Auto Expose Region.Y,Auto Expose Region.High,Auto Expose Region.Wide,Start Row,Number of Rows,Number of Lines,Light Control.Mode,Light Control.Light Enable 0,Light Control.Light Enable 1,Light Control.Unused,Light Control.Unused,Gain,Offset,Orientation,Network Trigger.Master,Network Trigger.Master Name,Network Trigger.Master Data,Buffer Mode,Delay,Focus Metric Region.X,Focus Metric Region.Y,Focus Metric Region.High,Focus Metric Region.Angle,Focus Metric Region.Curve,White Balance Region.X,White Balance Region.Y,White Balance Region.High,White Balance Region.Wide,Line Scan.Line Trigger Type,Line Scan.Line Period/Steps Per Line,Line Scan.Encoder Acquisition Timeout,Line Scan.Clip Mode,Line Scan.Acquisition Duration,Trigger Debounce,High Dynamic Range)

Parameter Description

Trigger

Specifies the source of the image acquisition trigger when the In-Sight vision system is Online.

Note: Do not change the Trigger programmatically while the sensor is Online. Doing so may put the sensor in an unpredictable state.

  • 0 = Camera (default): Enables image acquisition on a rising edge sensed at the vision system's dedicated acquisition trigger input.

    Note: The ERR: Missed Acquisition discrete output signal is only supported when the Trigger parameter is set to Camera.
  • 1 = Continuous: Enables "free running" (as fast as possible) image acquisitions.

  • 2 = External: Enables image acquisition on either a serial command (when Trigger On First Byte is selected in the DeviceNet Details dialog), on the rising edge applied to a discrete input line configured as an Acquisition Trigger, or from a PLC using an Industrial Ethernet protocol.

    Note:
    • Faster trigger rates can be achieved by using the vision system's built-in acquisition trigger input (by setting the AcquireImage function's Trigger parameter to Camera) versus triggering the vision system with a general-purpose input line configured as an Acquisition Trigger (by setting the AcquireImage function's Trigger parameter to External).
    • If the AcquireImage function's Trigger parameter is set to External and an acquisition is missed, the ERR: Missed Acquisition discrete output will not be sent from the vision system. The ERR: Missed Acquisition signal is only supported when the AcquireImage function's Trigger parameter is set to Camera.
  • 5 = Timestamp: Enables image acquisition when a timestamp trigger is sent to the vision system from a PLC over EtherNet/IP. The Timestamp option is only supported with the following vision systems:

      • In-Sight 5000 series vision systems with 128MB non-volatile flash memory and running firmware version 4.5.0 or later

        Note: The In-Sight 5605 vision system (Hardware Type 821-0032-1R), In-Sight 5705 vision system and In-Sight 5705C vision systems are not supported.
      • In-Sight 7000 Gen2 series vision systems
      • In-Sight 9000 series vision systems
    Note:
    • The vision system must have Use Time Synchronization checked in the Date/Time Settings dialog to use the Timestamp acquisition trigger.
    • If the vision system receives the timestamp trigger after the time has expired, or more than one hour in the future, a TimeTriggerFault will be set and the Eip.TimestampTriggerFaults count will be incremented.
    • If an acquisition is scheduled, but is not able to be execute due to another acquisition already in progress, the Missed Acquisition signal will be sent from the vision system.
    • The SetSystemConfig("Eip.TriggerTimestampInputOffset",0) command can be used to set the offset into the EtherNet/IP input assembly.

  • 6 = Industrial Ethernet: Enables image acquisition on triggers originating from an Industrial Ethernet protocol, such as EtherNet/IP, POWERLINK, PROFINET, SLMP Scanner or Modbus TCP Server.

    Note: Please verify the network settings are correctly enabled for the protocol (Industrial Ethernet Protocols group box in the Network Settings dialog).

    The following table shows how to trigger the vision system via each protocol. For more information, please click the links provided in the table.

    Protocol | Firmware Version | How to...
    EtherNet/IP | 5.x.x | Toggle Bit 1 in the Output Assemblies - Instance 22 (Byte 0). For more information, see I/O Assembly Data Attribute Format - Output Assemblies - Instance 22.
    4.x.x | Toggle Bit 1 in the Output Assemblies - Instance 21 (Byte 0). For more information, see Input and Output Assembly Objects.
    POWERLINK | 4.x.x | Toggle Bit 1 in the Control Object. For more information, see POWERLINK Factory Interface.
    PROFINET | 5.x.x | Toggle Bit 1 in the Acquisition Control Module. For more information, see PROFINET IO Module Reference Table - In-Sight 5.x.x Firmware.
    4.x.x | Toggle Bit 1 in the Acquisition Control Module. For more information, see PROFINET IO Module Reference Table - In-Sight 4.x.x Firmware.
    SLMP Scanner | 5.x.x | Toggle Bit 1 in the Vision Control Block (Byte 0). For more information, see Vision Control Block.
    4.x.x | Toggle Bit 1 in the Vision Control Block (Byte 0). For more information, see SLMP Scanner Factory Interface - In-Sight 4.x.x Firmware.
    Modbus TCP Server | 5.3.0 or later | Toggle Bit 1 in the Vision Control Block (Byte 0). For more information, see Vision Control Block.
  • 32 = Manual: Enables image acquisition when pressing F5. For F5 to manually acquire an image, the spreadsheet must have focus.
  • 99 = Network: Enables image acquisition when the specified In-Sight "Master" system on the network is triggered. The Master checkbox must be OFF, and a valid Master Name must be specified.

Manual

Enables a manual image acquisition trigger when the In-Sight vision system is Offline.

  • 0 = OFF: Disables image acquisitions when the vision system is Offline. When Manual is OFF and the vision system is Offline, image acquisition cannot be initiated by any means.
  • 1 = ON (default): Enables image acquisitions when the vision system is Offline. When Manual is ON and the vision system is Offline, pressing F5 or clicking the Trigger [image] button from the Job Display toolbar will initiate an image acquisition.

Exposure

Specifies the exposure time (in milliseconds). When the vision system receives a trigger signal, light is integrated in the image sensor array for the specified duration. Shorter durations are better for stopping motion but may require larger lens apertures or higher amplifier Gain to achieve sufficient image intensity.

Note:
  • Exposure is disabled if Automatic Exposure is enabled.
  • While the Exposure may technically be set to 0, the Exposure time is In-Sight vision system dependent, and an Exposure value of 0 will default to the minimum exposure time (in milliseconds or microseconds) for the selected vision system.
  • The Exposure time is rounded down to the next valid increment for the specified vision system.
  • If using a strobe with the In-Sight 8405 vision system, a minimum Exposure value of 72ms is recommended for a full frame image capture, to ensure that all pixel rows are exposed when the strobe is pulsed. For more information, see In-Sight 8405 Rolling Shutter Operation.
  • When connected to an In-Sight 5604, 5614 or 9902L line scan vision system, the exposure time is set in microseconds.
  • When calculating the exposure time, it may be necessary to add a small amount of time to the Exposure value to account for the warm-up time of the lights. For In-Sight 70xx - 74xx series vision systems using the internal LED light ring, it may be necessary to add an additional 0.4 ms - 0.5 ms to the Exposure time. For all other vision system models using external lights, please refer to the light manufacturer’s user manual for additional information about the warm-up time of the LED lights.

The exposure times for In-Sight vision system models are shown in the following table.

Note:
  • For the following vision systems/sensors, the resolution can be configured in the Image Settings dialog: In-Sight Micro 1500, In-Sight 2000-130, 2000-130C, 2000-230, 2000-230C, 2000-23M, 2001-230, 2001-230C, In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900, 7900C, 7802, 7802C, 7902, 7902C.
  • For the 5604 and 5614 line scan vision systems, the Image Height can be configured in the LineScan Settings dialog.
  • For the 9902L line scan vision system, the 1K Resolution (Low Light Mode) and Max Image Height can be configured in the LineScan Settings dialog.
In-Sight Model | Resolution | Sensor Type | Exposure Time (ms)
Micro 1020, 1050, 1100, 1110, 1100C, 1400, 1410, 1400C | 640 x 480 | CCD, global shutter | 0.016 to 1000
Micro 1402, 1412 | 1280 x 1024 | CMOS, global shutter | 0.016 to 950
Micro 1403, 1413, 1403C | 1600 x 1200 | CCD, global shutter | 0.052 to 1000
Micro 1500 | 640 x 480 | CMOS, global shutter | 0.004 to 500
 | 800 x 600 | CMOS, global shutter | 0.005 to 500
5100, 5110, 5100C, 5400, 5410, 5400C, 5600, 5610 | 640 x 480 | CCD, global shutter | 0.016 to 1000
5403, 5413, 5603, 5613 | 1600 x 1200 | CCD, global shutter | 0.027 to 1000
5604 & 5614 Line Scan | 1024 x 8192 | CCD, global shutter | 1.33 µsec to 1000 µsec
5605, 5615, 5705, 5715 | 2448 x 2048 | CCD, global shutter | 0.014 to 1000
5705C | 2448 x 2048 | CCD, global shutter | 0.016 to 1000
7010, 7010C, 7020, 7050, 7200, 7210, 7230, 7200C, 7400, 7410, 7430, 7400C | 800 x 600 | CMOS, global shutter | 0.016 to 950
7402, 7412, 7432, 7402C | 1280 x 1024 | CMOS, global shutter | 0.016 to 950
7500, 7600, 7600C, 7800, 7800C, 7900, 7900C | 800 x 600 | CMOS, global shutter | 0.014 to 550
 | 640 x 480 | CMOS, global shutter | 0.014 to 520
7501, 7801, 7801C, 7901, 7901C | 1280 x 1024 | CMOS, global shutter | 0.017 to 750
7802, 7802C, 7902, 7902C | 1600 x 1200 | CMOS, global shutter | 0.020 to 940
 | 800 x 600 (Low Light Mode) | CMOS, global shutter | 0.020 to 940
7905, 7905C | 2448 x 2048 | CMOS, global shutter | 0.021 to 1000
8200, 8200C, 8400, 8400C | 640 x 480 | CMOS, global shutter | 0.014 to 520
8401, 8401C | 1280 x 1024 | CMOS, global shutter | 0.0174 to 750
8402, 8402C | 1600 x 1200 | CMOS, global shutter | 0.020 to 940
8405 | 2592 x 1944 | CMOS, rolling shutter | 0.032 to 1000
9902L Line Scan | 2048 x 16384 | CMOS, global shutter | 2.00 µsec to 1000 µsec
 | 1024 x 16384
9912, 9912C | 4096 x 3000 | CMOS, global shutter | 0.021 to 1000

Automatic Exposure

Specifies whether the exposure time is automatically determined or not. When enabled, the exposure is automatically adjusted to compensate for different lighting conditions.

Note: If the vision system does not support this feature, the parameter is disabled.

Mode

Specifies how the automatic exposure is determined.

  • 0 = Disabled: Disables the Automatic Exposure option.

  • 1 = Continuous: Exposure time is automatically adjusted after each acquisition to compensate for different lighting conditions.

    Note: Time between acquisitions is increased while in Continuous mode.
  • 2 = Single-shot:
    • First Acquisition: If the vision system is Offline, the first acquisition is used to determine exposure and the exposure value is stored until Single-shot is disabled. If no acquisition has occurred while the vision system is Offline, when it is put Online, the first acquisition is used to determine exposure.

    • Subsequent Acquisitions: The vision system acquires the image using the exposure value calculated at the first acquisition.

    Note: Toggling the Single-shot checkbox or selecting a different Auto Exposure Mode resets the exposure value. The first acquisition after the exposure value has been reset is used to determine a new exposure value.

Max Exposure

Specifies the maximum exposure time used when determining the proper exposure.

Target Brightness

Specifies the desired brightness level (0 to 100; default = 10). The Target Brightness parameter governs the allowed percentage of saturated pixels (255). When Automatic Exposure is enabled, the Target Brightness setting adjusts the exposure value to return an image which has a "target brightness” of “x%” saturated pixels. For example, if the image has 10000 pixels and the Target Brightness parameter is set to 20, Automatic Exposure will adjust the exposure value to return an image containing approximately 2000 saturated pixels.

Auto Expose Region

Specifies the Region to use when automatically calculating the exposure time.

Note: If the vision system does not support this feature, the parameter is disabled.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.

Start Row

Specifies the first row to be transferred from the image sensor into memory on the In-Sight vision system:

Resolution | Valid Start Row Values
640 x 480 | 0 to 479
800 x 600 | 0 to 599
1024 x 768 | 0 to 767
1280 x 1024 | 0 to 1023
1600 x 1200 | 0 to 1199
2448 x 2048 | 0 to 2047
2592 x 1944 | 0 to 1943
4096 x 3000 | 0 to 2999
Note:
  • Due to Bayer Pattern constraints, the Start Row parameter value must be an even number for In-Sight color vision systems. If the Start Row parameter is not an even number, the software automatically converts this value to an even number. The AcquireImage property sheet displays the original odd number value, but the GetRow(A0) function returns the converted even number value. For more information, see Bayer Pattern.
  • Many of the In-Sight Vision Tool functions’ Region of Interest (ROI) calculate their algorithms four-pixel rows at a time, and the ROI automatically adjusts its size to be either divisible by four or on a four-pixel boundary, if not configured in this manner. When capturing images using partial acquisitions, if the ROI of the Vision Tool is not divisible by four or on a four-pixel boundary, the ROI automatically expands, which could cause the ROI to be outside the bounds of the image and result in a #ERR state.
  • The Start Row parameter is disabled when connected to an In-Sight 5604 or In-Sight 9902L line scan vision system.

Number of Rows

Specifies the number of image sensor rows to be transferred into memory on the In-Sight vision system.

Resolution | Number of Rows Allowed
640 x 480 | 1 to 480
800 x 600 | 1 to 600
1024 x 768 | 1 to 768
1280 x 1024 | 1 to 1024
1600 x 1200 | 1 to 1200
2448 x 2048 | 1 to 2048
2592 x 1944 | 1 to 1944
4096 x 3000 | 1 to 3000
Note:
  • Many of the In-Sight Vision Tool functions’ Region of Interest (ROI) calculate their algorithms four-pixel rows at a time, and the ROI automatically adjusts its size to be either divisible by four or on a four-pixel boundary, if not configured in this manner. When capturing images using partial acquisitions, if the ROI of the Vision Tool is not divisible by four or on a four-pixel boundary, the ROI automatically expands, which could cause the ROI to be outside the bounds of the image and result in a #ERR state.
  • The Number of Rows parameter is not supported for In-Sight 5604 or In-Sight 9902L line scan vision systems.

Number of Lines

(In-Sight 5604 and In-Sight 9902L only)

Specifies the number of lines to acquire, to construct an image from the line scan vision system.

  • By default, the In-Sight 5604 produces standard area images in 1024 x 2048 resolution. The width cannot be adjusted. The maximum image height can be adjusted by pressing the Encoder Setup button to launch the Line Scan Settings dialog. The Number of Lines parameter value can range from 1 to the Max Image Height.
  • By default, the In-Sight 9902L produces standard area images in 2048 x 4096 resolution. The width and maximum image height can be adjusted by pressing the Encoder Setup button to launch the Line Scan Settings dialog. If the 1K Resolution (Low Light Mode) check box is selected, the width is decreased to 1024, providing increased light sensitivity. The Number of Lines parameter value can range from 1 to the Max Image Height. For more information, see Line Scan Settings.
In-Sight Model | Resolution | Minimum | Maximum | Default
In-Sight 5604 | 1024 x 8192 | 1 | 8192 | 2048
In-Sight 9902L | 2048 x 16384 | 1 | 16384 | 4096
 | 1024 x 16384
Note:
  • If acquiring images of rotating targets, the Number of Lines value should be smaller than the number of rows between any two frame triggers to avoid missing image triggers.
  • While this parameter can technically be set to 1, any value below 8 results in an unsuccessful image acquisition.

Light Control

(In-Sight 5000 series and 70xx - 74xx series only)

The following parameters control LED light banks and rings.

Note: For the In-Sight 70xx - 74xx series vision systems with the M12 lens configuration, the Light Control parameter is used to configure the pre-installed internal LED ring light. If connecting an external strobe device to the vision system's Light cable, use the Light Settings dialog to configure the light settings.

Mode

(5000 series and 70xx - 74xx series)

Specifies whether the ring light on an In-Sight 5000 series or 70xx - 74xx series vision system is only ON for the duration of the specified Exposure or is constantly ON.

  • 0 = Exposure Controlled: Enables the ring light to be ON for the duration of the exposure.
  • 1 = Always ON: Enables the ring light to be always ON, reducing the strobe effect by keeping the LEDs lit at 50% intensity when not exposing an image.
  • 2 = Disabled: Disables the ring light (In-Sight 70xx - 74xx series only).

Light Enable

(5000 series only)

 Specifies whether up to four LED light channels are on or off. Any non-zero value (1 to 255) will turn on the light channel for the Exposure duration. If the parameter is zero, the light channel will remain off. The In-Sight 5000 series ring light (P/N 200-0187-1) is divided into two banks of LEDs: one horizontal and one vertical. Light Enable 0 controls the horizontal LED bank and Light Enable 1 controls the vertical LED bank.
Note:
  • Light Enable 0 and Light Enable 1 must be set to zero (0) when using an external strobe.
  • Increasing the value of the Light Power parameters will not increase the intensity of the LEDs.

Light Intensity

(70xx - 74xx series only)

 Controls the effective intensity of the LEDs [(0 to 100); default = 1; OFF = 0].

Gain

Specifies the gain of the amplifier stage that precedes the analog-to-digital converter.

In-Sight Model | Gain Settings
Micro 1000 series (except the In-Sight Micro 1402, 1412 or 1500) | 0 to 255; default = 128
Micro 1500 | 0 to 3; default = 0
5000 series | 0 to 255; default = 128
70xx - 74xx series and In-Sight Micro 1402 and 1412 | 0 to 7; default = 0
7500, 7501, 7600, 7600C, 7800, 7800C, 7801, 7801C, 7802, 7802C , 7900, 7900C, 7901, 7901C, 7902, 7902C | 0 to 6; default = 0
7905, 7905C | 0 to 240; default = 60
8200, 8200C, 8400, 8400C, 8401, 8401C, 8402, 8402C | 0 to 6; default = 0
8405 | 0 to 159; default = 16
9902L | 0 to 255; default = 0
9912, 9912C | 0 to 240; default = 60
Note: For very fine Gain adjustments when connected to an In-Sight 5604 or 9902L line scan vision system, you can manually type the Gain value in 0.25 increments.

Offset

Specifies a DC level that is added or subtracted from the analog signal from the vision system before the analog-to-digital conversion. The Offset affects the image's brightness and darkness while maintaining the dynamic range within the image.

Note: If the In-Sight 7905 vision system's Offset or Orientation parameters are modified outside the AcquireImage property sheet (i.e., a job is loaded with different parameter values or the parameters values are changed programmatically), it may result in a missed acquisition for Camera or Timestamp Trigger types or delay the start of the next acquisition by approximately 9ms for other Trigger types. Subsequent acquisitions will not experience this delay.
In-Sight Model | Offset Settings
Micro 1000 series | 0 to 255. Default varies by type.
5000 series | 0 to 255. Default varies by type.
70xx - 74xx series | 0 to 255. Default varies by type.
7500, 7600, 7600C, 7800, 7800C, 7900 and 7900C (640 x 480) | 0 to 90. Default varies by type.
7500, 7600, 7600C, 7800, 7800C, 7900 and 7900C (800 x 600) | 0 to 128. Default varies by type.
7501, 7801, 7801C, 7802, 7802C, 7901, 7901C, 7902, 7902C | 0 to 128. Default varies by type.
7905, 7905C | 0 to 255. Default varies by type.
8200, 8200C, 8400 and 8400C | 0 to 90. Default varies by type.
8401, 8401C, 8402, 8402C, 8405 | 0 to 255. Default varies by type.
9902L | 0 to 1023. Default varies by type.
9912, 9912C | 0 to 255. Default varies by type.
Orientation

Specifies the orientation of the image.

  • 0 = Normal (default)
  • 1 = Mirrored horizontally
  • 2 = Flipped vertically
  • 3 = Rotated 180 degrees
Note:
  • If the vision system does not support this feature, the parameter is disabled.
  • If the In-Sight 7905 vision system's Offset or Orientation parameters are modified outside the AcquireImage property sheet (i.e., a job is loaded with different parameter values or the parameters values are changed programmatically), it may result in a missed acquisition for Camera or Timestamp Trigger types or delay the start of the next acquisition by approximately 9ms for other Trigger types. Subsequent acquisitions will not experience this delay.
  • The In-Sight 5604 and In-Sight 9902L line scan vision systems only support Normal and Mirrored horizontally Orientation settings.
  • Do not change the Orientation programmatically when the vision system is Online. Doing so may put the vision system in an unpredictable state.

Master

When this checkbox is selected, the active vision system is designated as a "master" vision system on a network of vision systems. As a master system, the active vision system can generate a Network acquisition trigger for other In-Sight vision systems ("slaves") on the network.

  • 0 = OFF (default): The active vision system cannot generate a Network trigger.
  • 1 = ON: The active vision system generates a Network trigger. Slave vision systems on the network configured for both Network Trigger and with the specified Master Name acquire an image whenever the master vision system acquires an image.
Note:
  • A vision system cannot simultaneously function as both a master and a slave on the network. In other words, it cannot receive a network trigger and then generate a network trigger. Therefore, when the Trigger parameter is set to Network, the Master checkbox should be unchecked.
  • It is possible to have more than one vision system acting as a master on a network. Every master and any slaves that reference that master must share a unique name in the Master Name parameter.
  • In-Sight Micro 1020 vision systems do not support the Master parameter.
  • Vision systems in the EasyBuilder view will only work as slaves in the master/slave configuration. The Master option is only available in the Spreadsheet view.

Master Name
  • When Trigger is not set to (99) Network and Master is selected (ON), the Master Name field specifies the name of the network trigger that the active vision system sends out to trigger its slaves.
  • When Trigger is set to (99) Network and Master is cleared (OFF), the Master Name field specifies the name of the network trigger that causes the active vision system to acquire.
Note:
  • The Master Name field on a slave vision system must match the Master Name field on the master vision system. Otherwise, the slave vision system will not be triggered.
  • Any slave vision systems that have a blank Master Name field will be triggered by all master vision systems on the network.
  • The Master Name is case-sensitive.

Master Data

When the active vision system is a master on the network, it can optionally send a string of alphanumeric data to the slaves that it triggers. To read the Master Data that it receives along with a network trigger, the slave must have a GetString function in its spreadsheet that references the AcquireImage function in cell A0.
Buffer Mode

Specifies the number of buffers used for image acquisition. The Buffer Mode parameter cannot be modified while the sensor is Online.

  • 0 = Overlapped (default): The number of image buffers specified in the Image Buffers dialog is used for image acquisition. For more information, see Image Buffers Dialog.

  • 1 = Single: Only a single buffer is used for image acquisition. This option is only supported when the Trigger parameter is set to Camera.

    Note: The In-Sight 2000 series vision sensor's Buffer Mode is always set to Single Buffer Mode in EasyBuilder-only jobs.
Delay
  • When the Trigger parameter is set to Camera or Network, it specifies the delay in milliseconds between the time the trigger is received and the time the vision system begins acquisition (0 to 10,000).
  • When the Trigger parameter is set to Continuous:
    • It specifies an interval, in milliseconds, between acquisitions (0 to 10,000; default = 500).
    • This delay is dependent on the amount of time the job takes to complete processing the image. For example, if the Delay parameter is set to 5,000 milliseconds, the vision system acquires an image every 5,000 milliseconds, provided the job completes its image processing within 5,000 milliseconds. If not, the In-Sight vision system acquires an image as soon as it completes processing the image.
  • When connected to an In-Sight 5604 or In-Sight 9902L line scan vision system and the Trigger parameter is set to Camera, it specifies the number of lines to delay after the camera trigger occurs before starting an acquisition.
Note:
  • The delay is accurate to the requested millisecond, plus or minus the maximum line exposure time.
  • If Acquisition Start or Strobe is the specified Type in the Discrete I/O Settings dialog, these outputs are also delayed by the specified time.
  • When connected to an In-Sight 5604 or 9902L line scan vision system and the Delay parameter is set to a non-zero value, if the vision system receives an image acquisition trigger during the Delay period, the trigger is not activated and the missed acquisition(s) are not reported until the period specified in the Delay parameter has completed.
  • When connected to an In-Sight 5604 or 9902L line scan vision system and the Delay parameter is set to a large period, the system does not start another image until the delay period is completed, regardless if the system is placed Online/Offline or the Encoder Acquisition Timeout is reached. If the vision system is reset through either the In-Sight Explorer Sensor menu Reset option or the Reset System Native Mode command, the vision system may become unresponsive and require a power cycle to restore the system. Wait until the Delay period has completed before sending a soft reset.

Focus Metric Region

Specifies the Region to use when automatically calculating the Focus Metric score while in Live Video mode.

Note: For the In-Sight 7000 series vision system, the Focus Metric Region is used to define the region for either calculating the autofocus of the lens or setting the focal position of the lens while in Live Video.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.
White Balance Region

Specifies the Region to use when calculating the White Balance.

Note: The WhiteBalance function references the White Balance Region and uses the parameters of this region when calculating the white balance.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.

Line Scan

(In-Sight 5604 and In-Sight 9902L only)

The Line Scan controls specify the settings of In-Sight 5604 and In-Sight 9902L line scan vision systems. The line scan vision system assembles an image row by row as the target object passes beneath it, which allows for the construction of full, "unwrapped" images of cylindrical objects or sliced, continuous images of a surface. When connected to a user-supplied hardware encoder, the line scan vision system provides high-precision images despite target speed variability.

Note:
  • To enable these controls:
    • You must be connected to an In-Sight 5604 or In-Sight 9902L line scan vision system or Emulator.
    • The line scan vision system must be Offline.
    • The user must have Full Access. For more information, see User Access Settings Dialog.
  • Exiting the AcquireImage property sheet by either pressing OK or Cancel results in the GUI losing synchronization between images. For example:
    • If you press the Cancel button to exit the property sheet, the GUI displays a newly acquired image. However, the Vision Tools perform their functions on the previously acquired image.
    • If you press the OK button, a new image is acquired and the Vision Tools operate on this image However, another new image will be acquired and displayed, but the Vision Tools will not operate on this image.

    After accessing the AcquireImage property sheet, always manually acquire an image, and save the currently displayed image prior to accessing AcquireImage if you need to return to that specific image.

Line Trigger Type

Specifies the type of encoder: Software Encoder or Hardware Encoder.

  • 0 = Hardware Encoder: Specifies that the Steps Per Line setting and an external hardware encoder will be used to drive the line triggers. A Hardware Encoder is a device that digitizes the position of the target object by providing a signal transition every time the target moves a specified direction or distance. The In-Sight 5604 and In-Sight 9902L support two different types of Hardware Encoders: Single or Quadrature. This can be specified by pressing the Encoder Setup button to launch the Line Scan Settings dialog. For more information, see Line Scan Settings.
  • 1 = Software Encoder (default): Specifies that the Line Period setting will be used as a clock to drive the line triggers at a defined interval. A Software Encoder is a software emulation of a hardware encoder and acquires lines at a defined rate. This method is primarily used for setup and troubleshooting, because it is vulnerable to changes in target speed (low-frequency acceleration and higher-frequency shake) that could result in vertical image artifacts.

Line Period/Steps Per Line

  • Line Period: When Line Trigger Type is set to Software Encoder, specifies the time, in microseconds, per image line (0.250 to 1000000 µsec; default = 40 µsec).

    In-Sight Model | Line Period
    In-Sight 5604 | 21.000 to 1000000.000; default = 40.000
    In-Sight 9902L | 21.000 to 1000000.000; default = 40.000
    In-Sight Emulator | 10.000 to 1000000.000; default = 40.000
    Note:
    • For the 5604, to prevent missing line triggers, the Line Period/Steps Per Line value must be configured so the shortest time between any two lines is 21.47 µsec greater than the Exposure setting (at a minimum of 1.33 µsec).
    • For the 9902L, to prevent missing line triggers, the Line Period/Steps Per Line value must be configured so the shortest time between any two lines is 3 µsec greater than the Exposure setting or 15µs, whichever is greater.

  • Steps Per Line: When Line Trigger Type is set to Hardware Encoder, specifies the number of encoder steps per image line. A "step" is a complete cycle of the encoder signal, or signals, when a quadrature hardware encoder is used. For a single line hardware encoder, that is equivalent to two signal transitions and for a quadrature hardware encoder, that is equivalent to four signal transitions.

    In-Sight Model | Steps Per Line
    In-Sight 5604 | 0.250 to 256; default = 40
    In-Sight 9902L | 0.250 to 8191; default = 40
    Note: The Steps Per Line value should be incremented by 0.5 for single line hardware encoders, and 0.25 for quadrature hardware encoders.

    Steps Per Line Hardware Encoder Timing Diagram:

Encoder Acquisition Timeout

Specifies the maximum amount of time, in milliseconds, to acquire an image (0 to 300000; default = 0, disabling the timeout). If the image acquisition does not complete within the specified time, the acquisition is aborted and an Acquisition Error issued.

Note: Set the parameter to 0 to disable the timeout.

Clip Mode

Specifies an action if an image acquisition trigger is received, but the specified number of lines have not yet been acquired.

  • 0 = No Clipping (default): Specifies that the image trigger is ignored and an "Acquisition error" event generated.

  • 1 = Fill Black: Specifies the remaining lines are filled with black pixels, and a new image is immediately started. An "Acquisition error" event is not generated.

  • 2 = Reduce Image Lines: Specifies that the current image be reduced to the size of the number of rows currently acquired, and a new image is immediately started.

Note:
  • When either Fill Black or Reduce Image Lines is selected:
    • Set the Trigger type to Camera to clip images properly. With any other Trigger type, if the trigger arrives while an image is being acquired, the current image is not clipped and the trigger is missed.
    • If a Set Event Native Mode command is sent to trigger an acquisition and the trigger arrives while an image is being acquired, the current image is not clipped and the trigger is missed. For more information, see Set Event.
  • For time-critical applications, select the Reduce Image Lines option. Or, if using the Fill Black option, keep the fill under a few hundred lines.
    • For the 5604, the Fill Black option requires roughly 2 µsec per line of fill (e.g., 0.2 milliseconds for 100 lines).
    • For the 9902L, the Fill Black option requires roughly 3 µsec per line of fill (e.g. 0.3 milliseconds for 100 lines).
Acquisition Duration

Specifies when to end image acquisition when the Clip Mode parameter is set to Fill Black or Reduce Image lines. This parameter is only supported for the In-Sight 9902L vision system when Camera is the selected Trigger type.

  • 0 = Next Trigger (default): Image acquisition begins at the leading edge of the trigger pulse and ends at the beginning of the next trigger signal.
  • 1 = End of Trigger: Image acquisition begins at the leading edge of the trigger pulse and ends at the trailing edge of the trigger pulse. Image acquisition is complete when either:
    • The specified Number of Lines have been acquired, even if the trailing edge of the trigger pulse has not yet arrived.

    • The trailing edge of the pulse arrives and terminates acquisition before the specified Number of Lines have been acquired.

    Note: When End of Trigger is selected, the Delay parameter is disabled and no delay is applied to the acquisition.
Trigger Debounce

Specifies the amount of time, in microseconds, that the input trigger must remain active to be recognized as a valid trigger (0 to 65,536; default = 1). This setting delays the recognition of a valid trigger by the amount of time specified.

Note:
  • The Trigger parameter must be set to Camera to enable this control.
  • The Trigger Debounce option is available for the In-Sight Micro 1000 series, In-Sight 7000 series and In-Sight 8000 series vision systems. This option is also available for the In-Sight 5100 series, 5400 series, 5600, 5603 and 5605 vision systems with 128MB non-volatile flash memory or higher. Models can be identified by the Type number (821-xxxx-xx). The Type number is located on the label affixed to the vision system. For a complete list of models and supported firmware versions, see Firmware Versions.
High Dynamic Range

HDR (High Dynamic Range) provides better contrast and more brightness for darker regions of an image. This effect is completed in a single acquisition.

Note: HDR is supported only with In-Sight 7905 and 9912 monochrome vision systems.

The following parameters determine the HDR method and kernel size.

HDR Mode

Defines the method of HDR to use.

  • Disabled (default): Do not use HDR.
  • HDR+: Adjusts each pixel greyscale value by considering neighboring pixels (depending on the kernel size setting). This provides more contrast in dark (underexposed) and light (overexposed) regions than HDR.
  • HDR: Adjusts each pixel greyscale value individually. This provides more contrast with dark (underexposed) regions on the input image.

HDR+ Kernel Size

Defines the number of pixels that are processed simultaneously with HDR+.

  • Small: 121 pixels (11x11 grid)
  • Large: 484 pixels (22x22 grid)

AcquireImage Outputs

The AcquireImage function returns an Image data structure. Different sensor models return different types of images.

Note:
  • For the following vision systems/sensors, the resolution can be configured in the Image Settings dialog: In-Sight Micro 1500, In-Sight 2000-130, 2000-130C, 2000-230, 2000-230C, 2000-23M, 2001-230, 2001-230C, In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900, 7900C, 7802, 7802C, 7902, 7902C.
  • For the 5604 and 5614 line scan vision systems, the Image Height can be configured in the LineScan Settings dialog.
  • For the 9902L line scan vision system, the 1K Resolution (Low Light Mode) and Max Image Height can be configured in the LineScan Settings dialog.
  • Maximum frames per second is job-dependent, based on the minimum exposure for a full image frame capture using the dedicated acquisition trigger, and assumes there is no user interface connection to the vision system.
  • For the In-Sight 5604 and 9902L Line Scan models, acquisition is measured in frequency (KHz).
  • Functions that require an Image parameter must reference a spreadsheet cell that contains a valid Image data structure. The default Image parameter reference in all property sheets is cell A0, which contains the Image data structure returned by AcquireImage. But Image data structures returned by CompareImage, FindCircleDefects, NeighborFilter, and PointFilter are also valid references for Image Parameter values in property sheets.
In-Sight Model | Resolution | Greyscale/Color | Bit depth | Number of grey levels or colors | FPS
Micro 1020, 1050, 1100, 1110, 1400, 1410 | 640 x 480 | greyscale | 8-bit | 256 | 60
Micro 1100C and 1400C | 640 x 480 | color | 24-bit | 16,777,216 | 58
Micro 1402 and 1412 | 1280 x 1024 | greyscale | 8-bit | 256 | 60
Micro 1403 and 1413 | 1600 x 1200 | greyscale | 8-bit | 256 | 14
Micro 1403C | 1600 x 1200 | color | 24-bit | 16,777,216 | 7
Micro 1500 | 640 x 480 | greyscale | 8-bit | 256 | 213
 | 800 x 600 | greyscale | 8-bit | 256 | 157
5100, 5110, 5400, 5410, 5600 | 640 x 480 | greyscale | 8-bit | 256 | 60
5100C and 5400C | 640 x 480 | color | 24-bit | 16,777,216 | 60
5604 and 5614 Line Scan | 1024 x 8192 | greyscale | 8-bit | 256 | 44 KHz
5403, 5413, 5603 and 5613 | 1600 x 1200 | greyscale | 8-bit | 256 | 14
5605, 5615, 5705 and 5715 | 48 x 2048 | greyscale | 8-bit | 256 | 16
5705C | 2448 x 2048 | color | 24-bit | 16,777,216 | 14
7010, 7020, 7050, 7200, 7210, 7230, 7400, 7410, 7430 | 800 x 600 | greyscale | 8-bit | 256 | 102
7010C, 7200C, 7400C | 800 x 600 | color | 24-bit | 16,777,216 | 50
7402, 7412, 7432 | 1280 x 1024 | greyscale | 8-bit | 256 | 60
7402C | 1280 x 1024 | color | 24-bit | 16,777,216 | 30
7500, 7600, 7800, 7900 | 800 x 600 | greyscale | 8-bit | 256 | 165
 | 640 x 480 | greyscale | 8-bit | 256 | 217
7600C, 7800C, 7900C | 800 x 600 | color | 24-bit | 16,777,216 | 100
 | 640 x 480 | color | 24-bit | 16,777,216 | 135
7501, 7801, 7901 | 1280 x 1024 | greyscale | 8-bit | 256 | 76
7801C, 7901C | 1280 x 1024 | color | 24-bit | 16,777,216 | 45
7802, 7902 | 1600 x 1200 | greyscale | 8-bit | 256 | 53
 | 800 x 600 (Low Light Mode) | greyscale | 8-bit | 256 | 53
7802C, 7902C | 1600 x 1200 | color | 24-bit | 16,777,216 | 33
 | 800 x 600 (Low Light Mode) | color | 24-bit | 16,777,216 | 45
7905 | 2448 x 2048 | greyscale | 8-bit | 256 | 32
7905C | 2448 x 2048 | color | 24-bit | 16,777,216 | 17
8200 | 640 x 480 | greyscale | 8-bit | 256 | 217
8200C | 640 x 480 | color | 24-bit | 16,777,216 | 135
8400 | 640 x 480 | greyscale | 8-bit | 256 | 217
8400C | 640 x 480 | color | 24-bit | 16,777,216 | 135
8401 | 1280 x 1024 | greyscale | 8-bit | 256 | 76
8401C | 1280 x 1024 | color | 24-bit | 16,777,216 | 45
8402 | 1600 x 1200 | greyscale | 8-bit | 256 | 53
8402C | 1600 x 1200 | color | 24-bit | 16,777,216 | 33
8405 | 2592 x 1944 | greyscale | 8-bit | 256 | 13
9902L | 2048 x 16384 | greyscale | 8-bit | 256 | 66 KHz
 | 1024 x 16384
9912 | 4096 x 3000 | greyscale | 8-bit | 256 | 14
9912C | 4096 x 3000 | color | 24-bit | 16,777,216 | 8


TestRun™ - Spreadsheet View

After connecting to the desired In-Sight vision system and loading the appropriate .job file to the vision system, TestRun configuration may begin. TestRun is configured using the TestRun Setup dialog, which offers a step-by-step series of screens to program TestRun. A navigational pane is provided on the left side of the dialog, from which any of the setup screens can be selected.

Note: After the initial configuration of TestRun, any of the steps can be revisited by simply selecting the step in the step in the navigational pane.
  • Configure the Job's Pass/Fail Cell
  • Create Symbolic Tags
  • Image Database Folder
  • Variant Configuration
  • Job/Variant - Setup Actions
  • Job/Variant - Limit Tests
  • Job/Variant - Image Selection
  • Job/Variant - Defect Tests
  • Hardware Tests - Setup Actions
  • Hardware Tests - Tests
  • Cleanup Actions

Once the TestRun Setup dialog has been configured, return to the Palette and use the buttons to:

  • New: Create a new TestRun test.
  • Configure: Launches the TestRun Setup dialog.

  • Run: Execute an existing TestRun test.

    Note: For In-Sight vision systems running In-Sight firmware 4.10.x, or In-Sight firmware 5.6.0 and greater, TestRun can also be initiated by an external device, such as a PLC via EtherNet/IP Communications or PROFINET Communications. For more information, see EtherNet/IP Communications and PROFINET Communications.
  • Repair: Repair a broken test or value.
  • Import: Import a previously created test.
  • Export: Export a test.
  • Batch Run: Launches the Batch Run dialog, which is used to configure TestRun to execute on a batch of .job files. For more information, see Batch Run.
Note: The TestRun buttons are disabled when TestRun is running.

Display TestRun

  1. In the Palette, click on the TestRun™ tab.

    Note: If the Palette is not visible, from the View menu, select Palette.
  2. Press the [image] Configure... button to launch the TestRun Setup dialog.
  3. Once all of the TestRun Setup dialog steps have been configured, press the [image] Run button in the TestRun tab of the Palette to execute the tests.
Note: After the TestRun Setup dialog has been configured, a right-click menu is available that provides all of the buttons available in the Palette, as well as an ability to execute tests from a specific section of the tests (e.g. beginning with Hardware Tests, for instance, without running the Job Tests).

Configure the Job's Pass/Fail Cell

When using TestRun in the Spreadsheet View, a cell must first be configured with an overall Pass/Fail tag for the job, which indicates the success or failure of the machine vision inspection. While technically it is not necessary to configure a Pass/Fail cell for the job, tagging a cell to record the job's overall Pass/Fail has a couple of advantages:

  • The Pass/Fail cell allows the Cognex VisionView Application to identify passing and failing images, and color code them, accordingly.
  • TestRun combines the job's Pass/Fail cell information with the identification of "failing" images to construct and configure a defect test for the job's Pass/Fail status, and the expected result for each image.
Note: If the Job Pass/Fail Cell Setup Dialog has already been configured, those settings will automatically be populated in this step of the TestRun Setup Dialog. For more information, see Job Pass/Fail Cell Setup Dialog.

  1. Ensure that the Use Job Pass/Fail Cell checkbox is enabled (by default, it is enabled).
  2. Press the Select Cell button to enter cell selection mode and select the cell that will be used as the job's Pass/Fail cell. For more information, see Cell Selection Mode.
  3. Set the three Job Status settings to indicate the proper status of the job, dependent on the state of the Pass/Fail cell (negative, zero or positive).
  4. Press the Next button to continue the TestRun setup.

Create Symbolic Tags

TestRun relies on symbolic tags, instead of cell locations, to reference functions and tools in the job (symbolic tags allow the job developer to move cells without affecting TestRun). Therefore, all values that will be used by TestRun must have a symbolic tag. If the job was developed in the EasyBuilder View, symbolic tags will already exist for all the values that can be tested, and this step is skipped if accessed from the EasyBuilder View. For jobs developed in the Spreadsheet View, symbolic tags must be created.

There are two options for creating symbolic tags in the Spreadsheet View:

  • Manually adding and tagging the desired cells.
  • Using the Auto Tag feature to automatically tag supported cell types.
Note: After adding the symbolic tags, they can be sorted by either their name or cell location, by pressing the Name or Cell Location column heading.

Manually Add Symbolic Tags

  1. Press the Add button to enter cell selection mode and select the cell that will be associated with a symbolic tag. For more information, see Cell Selection Mode.
  2. TestRun will assign the selected cell a symbolic tag in the format of: "_Cell_<loc>", where <loc> is the cell location, e.g. B52.
  3. TestRun will select the new symbolic tag and the tag can now be edited.

  4. If desired, rename the tags to something applicable for the application. Select the desired tag, press the Rename button, type in a new name and press the ENTER key to accept the change.

    Note: Renaming symbolic tags in TestRun will change the name of the symbolic tag in the Spreadsheet.
  5. Repeat steps 1 through 4 until all the desired cells have been added.
  6. Press the Next button to continue the TestRun setup.

Automatically Add Symbolic Tags

By pressing the Auto Tag button, TestRun will automatically examine the job and create symbolic tags for the following types of functions:

  • Button: Inserts a labeled push button control into the spreadsheet. Optionally, a button press can be configured to signal a spreadsheet event trigger. For more information, see Button.
  • CheckBox: Inserts a labeled checkbox control into the spreadsheet. For more information, see Button.
  • ListBox: Inserts a drop-down list control in the spreadsheet. For more information, see ListBox.
  • EditInt: Inserts an integer edit control into the spreadsheet. The control works like all other In-Sight interactive numeric input controls. For more information, see EditInt.
  • EditFloat: Inserts a floating-point edit control into the spreadsheet. The control behaves like other interactive numeric input controls. For more information, see EditFloat.

  • EditString: Inserts a text edit control into the spreadsheet. The EditString control works like other interactive text input boxes. For more information, see EditString.

Note: For Button and CheckBox functions, the Name applied to the function will be used as the name of the symbolic tag, unless it is an empty string.
  1. Press the Auto Tag button.

  2. TestRun will locate and tag cells which contain the above mentioned functions. If a function is within a Dialog function, it will be prefixed with the Dialog function's name (e.g. "DialogName"_EditFloat). If a function is within a Custom View, it will be prefixed with "Custom_View."

    Note: If a desired function was not automatically added, manually add the function using the Add button.
  3. If necessary, unwanted tags may be removed by selecting the tag and then pressing the Delete button.

  4. If desired, rename the tags to something applicable for the application. Select the desired tag, press the Rename button, type in a new name and press the ENTER key to accept the change.

    Note: Renaming symbolic tags in TestRun will change the name of the symbolic tag in the Spreadsheet.
  5. Press the Next button to continue the TestRun setup.

Image Database Folder

Once the job's overall Pass/Fail cell has been set and symbolic tags created, the next step in the TestRun Setup is the Image Database Folder.

During this step, the path to the test image database is established. The directory path must use one of the following formats:

  • C:\TestRun\BracketJob
  • file:///\\TestRun\BracketJob
  • ftp://TestRunServer/BracketJob
  • ftp://10.28.127.73/BracketJob
Note: For vision systems configured for signal-driven TestRun, the Image Database Folder must be configured to use an FTP server, and must have a password of at least 5 characters.

All of the images must be stored in one common root folder; if images are stored in multiple folders, select the folder that contains all of the images and sub-folders with images. While TestRun is able to accommodate different file structures, it is recommended to use the following type of structure:

Using this type of structure, the "Bracket Inspection" folder would be selected.

Finally, set the Unknown Images drop-down menu (Ignore, Assume Pass or Assume Fail; default = Ignore). The Unknown Images drop-down is used to determine how TestRun should process images that have not been explicitly added to TestRun during the Image Selection step.

  • Set the drop-down to Ignore to allow TestRun to simply ignore any images which were not configured.
  • Set the drop-down to Assume Pass to have TestRun assume that the images will cause the job to pass.
  • Set the drop-down to Assume Fail to have TestRun assume that the images will cause the job to fail.

Select the Folder for the TestRun Image Database

  1. Press the Browse button.

  2. Use the Browse for Folder dialog to navigate and select the desired image folder. Press the OK button after selecting the folder.

    Note:
    • If an image folder has already been accessed, it can be selected using the drop-down menu.

    • For vision systems configured for signal-driven TestRun, the Image Database Folder must be configured to use an FTP server, and must have a password of at least 5 characters.

  3. If necessary, enter the User Name and Password required to access the image directory.

    Note: When configuring TestRun's Image Database Folder, if the job developer has accessed (using their own specific User Credentials), the folder to be used by TestRun with another application (e.g. Windows Explorer is being used to view the images in the network folder), and different User Credentials are supplied (e.g. a generic User Name and Password that is to be used by operators on the line), TestRun will be unable to access the folder. To recover from this scenario, close the other application accessing the folder, and close and re-open the TestRun Setup dialog, as well.
  4. If necessary, enter the Domain information.
  5. Press the Next button to continue the setup of TestRun. After leaving this step, TestRun will automatically search the image directory for .jpg and .bmp image files.
Note:
  • If this step has been configured before, TestRun will retain the information about the files stored in the directory. If the location of the images has changed, TestRun will attempt to match images based on their paths, relative to the image location, transferring properties of the images for each match.

  • Once the folder has been established, below the drop-down menu, TestRun displays:

    • A count of the total number of images in the folder.
    • The number of images that have previously been configured in the Job-Image Selection screen.
    • The number of images that are no longer in the folder that were there when previously configured.
    • The number of newly added images to the folder since last being configured.

Variant Configuration

A job may contain one or more inspections. Each of the separate inspections in the job is considered a job variant. For example, to avoid repeatedly changing jobs over time, jobs are created to handle multiple products. Each of those separate inspections may be considered a job variant.

Typically, different variants are selected by an external input (e.g. a command from a PLC). Each variant may have its own set of Vision Tools, different search regions, different exposure settings, etc. TestRun is designed to test all of the variants in a job.

Note: Each job variant is configured individually.

Add a Job Variant

  1. By default, a variant named "Job" has automatically been added.

    Note: The name can be changed by selecting the desired variant, pressing the Rename button and then typing a new name. After the name has been changed, it will automatically be updated in the configuration steps pane.
  2. Press the Add button to create a new variant.
  3. Press the Next button to continue the setup of TestRun.

Reordering job variants

Note: Changing the order of the variants will alter the order of execution of the TestRun tests.
  1. Select a variant.
  2. Press either the Move Up or Move Down button, depending on the desired direction.
  3. Press the Next button to continue the setup of TestRun.

Job/Variant - Setup Actions

Before beginning its tests, TestRun may need to set some of the job's parameters to mimic the behavior that an operator may perform when setting up a particular variant to run. Generally, if a job has multiple variants, some amount of configuration will be necessary to prepare the job for the selected variant. Before TestRun can process images for a particular variant, it must first set the state of the job accordingly. The Setup Actions step is used to configure the parameter settings needed for the selected variant's images.

The Setup Actions screen consists of two columns:

  • The Symbols column that contains a list of all of the symbolically tagged job settings.
  • The Setup Actions column that displays all the job's parameter settings that TestRun will set.

Configure the Job Settings to Test the Current Variant

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.

    Note: Selecting the setting will highlight the parameter in the Spreadsheet.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Setup Actions column with the setting.
  3. Once the setting has been enabled, select it in the Setup Actions column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed.
  5. If there are multiple settings, use the Move Up/Move Down buttons to configure the settings in their desired order of execution. TestRun will perform the setup actions in the order in which they appear in this screen.
  6. Press the Next button to continue the setup of TestRun.

Job/Variant - Limit Tests

Machine vision applications may include many parameters, which are adjustable by machine operators and maintenance technicians, over the course of time. TestRun Limits Tests allow the vision application developer to select adjustable parameters to test, establish the upper and lower limits for those parameters, and quickly determine whether those parameters are still within their established limits. Utilizing TestRun versus hard-coding limits, for instance, allows the developer to provide flexibility to the operators and technicians to make adjustments to keep the system functioning, while still being able to see when parameters are out of range.

The Limits Tests screen is used to setup tests of editable parameters' limits, and consists of two columns:

  • The Symbols column that contains a list of all of the symbolically tagged job settings.
  • The Limit Tests column that displays all of the job's parameter settings that TestRun will test.

Select and Configure the Variables for Testing Limits

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.

    Note: Selecting the setting will highlight the parameter in the Spreadsheet.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Limit Tests column with the setting.
  3. Once the setting has been enabled, select it in the Limit Tests column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed. The type of test available depends on the type of editable parameter:
    • EditInt: Is In Range
    • EditFloat: Is In Range
    • EditString: Is Equal
    • ListBox: Is Equal
    • CheckBox: Is Equal
  5. Press the Next button to continue the setup of TestRun.

Job/Variant - Image Selection

During this screen of the setup, images that will be used during the tests for the particular variant are selected and defined as either "good" or "bad", i.e. a "good" image should result in a Pass condition, whereas a "bad" image will result in a Fail condition.

Note: Images may be shared among variants.

Select the Images for the Variant, and Define the Images as Good or Bad

  1. Using the tree control, expand the directory of images.
  2. If the directory contains a mixture of "good" and "bad" images, select each individual image by enabling it and then defining it as "Good" or "Bad" using the selectors below the directory. If desired, add a comment about the image, as well.
  3. If the directory has been separated into directories containing "Good" and "Bad" images, by enabling the top level, all of the images within that group will be enabled and share the same classification (Good or Bad) as the top level.
  4. Press the Next button to continue the setup of TestRun.

Job/Variant - Defect Tests

In the Defect Tests screen, images and their expected defects are associated together, creating a database of expected results for each image in the database. From this screen, Defect Tests are configured by selecting which defects (if any) are present for each image, and associating the defect with the expected result of a job's parameter(s).

In the initial, default configuration, the Job Fail defect will exist for each image; it will automatically be enabled for all of the images designated as "bad" images. When a defect is checked (enabled), it indicates that the defect is present for that image. Defect tests are helpful in determining why a vision application may be incorrectly passing or failing an image. Many vision applications perform several inspections on an image, and cumulatively they produce an overall Pass/Fail result. TestRun allows the vision designer to not only determine if an individual image passes or fails, but it also ensures that the specific defects that are supposed to be detected, are in fact, detected.

For example, if a part is determined to be "bad" because it is missing a hole, TestRun will help verify that the part results in a Fail because the job determined the part was missing the hole. If the part with the missing hole results in a Fail because the tool that was used as a fixture had a search region that was large enough to identify and capture the missing hole, and it was not the tool programmed to identify the missing hole, the job's logic was not performing correctly, and TestRun can be used to identify that discrepancy.

Note: Upon entering the Defect Tests screen, the Setup Actions for the currently selected variant will be executed to ensure that the job's state is properly configured.

Define the Defects to be Tested

  1. Select an image.
  2. Set the default Job Fail defect.
  3. Add additional defects as needed, and define their expected results.

Select an Image

  1. To begin, first select an image by using the image playback buttons in the Image group box. Press the Next Image button to advance the image.

    Note: TestRun uses the images defined in the Image Selection step.
  2. TestRun will display the image in the Image group box, and in the Spreadsheet View. The folder containing the image and the name of the image will be displayed in the drop-down at the top of the screen.
  3. TestRun will also update the expected results for any previously defined defects.

Set the Job Fail Defect's Expected Result

  1. By default, the Job Fail defect is automatically added and enabled (the checkbox is checked). The Job Fail defect defines the expected results that determine whether or not the overall job returns a failure.
  2. To define the Job Fail defect, in the Defect group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag (by default, "<Job Pass/Fail>" is selected. Job Fail is not a symbolic tag, but tests the cell which is configured as the Job Pass/Fail cell).
  3. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.

Add Additional Defects and Define the Expected Results

  1. Press the Add button.

  2. TestRun will add a defect with the default name, "Defect." By default, the newly added defect will be enabled (the checkbox will be checked).

    Note: If a defect has already been added and the default name was unchanged, TestRun will increment the name (e.g. "Defect01", "Defect02", etc.). Press the Rename button to edit the default name and assign a more descriptive name to the defect.
  3. In the Defect group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag.
  4. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.
  5. Use the enabled edit controls to configure test, if necessary.
  6. Repeat steps 1 through 4, as needed, to add additional defects.

Edit a Defect

  1. Select a defect from the list.
  2. In the Defect group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag.
  3. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.

Hardware Tests - Setup Actions

Before TestRun can test to ensure that the In-Sight vision system is acquiring the correct image, it must first set the state of the job accordingly. This screen is used to enable parameter settings prior to testing, verifying that the vision system is acquiring the correct image.

Configure the Job to Perform the TestRun Hardware Test

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.

    Note: Selecting the setting will highlight the parameter in the Spreadsheet.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Setup Actions column with the setting.
  3. Once the setting has been enabled, select it in the Setup Actions column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed.
  5. If there are multiple settings, use the Move Up/Move Down buttons to configure the settings in their desired order of execution. TestRun will perform the setup actions in the order in which they appear in this screen.
  6. Press the Next button to continue the setup of TestRun.
  7. After performing the programmed Setup Actions, TestRun will automatically trigger the In-Sight vision system to acquire an image.

Hardware Tests - Tests

This step is used to configure tests to ensure that the acquired image is correct. By associating specific job parameters and their expected results with the image, TestRun can determine if the image produces the correct result. For example, a dirty lens may lead to blurry, spotted or darker images; the Field of View (FOV) of an In-Sight vision system may change if the vision system is accidentally bumped; or the focus or aperture on the lens attached to the vision system may change over time due to vibrations. All of these scenarios can be tested by associating a job parameter with an expected result; if the expected result is not returned, there's an issue with the image formation.

To determine if the FOV is correct, features from the part (or the background without the part) can be used. If the features are not present in the image, the FOV has changed. For parts placed in a fixture prior to inspection, features in the four corners of the fixture can be used to establish the proper FOV; if any features are missing, the FOV has changed, or if they're too close or too far apart, the distance between the In-Sight vision system and the FOV may have changed. If the features should form a rectangle, but instead form a non-rectangular quadrilateral, then it's possible that the vision system was knocked off-axis, and is introducing perspective distortion.

Define the TestRun Vision System Image Acquisition Tests

  1. Acquire an image.
  2. Add and configure tests, as needed.

Acquire an Image

  1. Below the Image group box, press the Manual Acquire button to acquire an image from the In-Sight vision system.
  2. TestRun will display the image in the Image group box, and in the Spreadsheet View.
Note: Alternately, press the Load Image button to display the Open dialog and navigate to an image file.

Add and Configure Tests

  1. In the Hardware Tests group box, press the Add button.

  2. TestRun will add a test, with the default name "Test", and place the test in the Test group box, where it is ready to be configured.

    Note: If a test has already been added and the default name was unchanged, TestRun will increment the name (e.g. "Test01", "Test02", etc.). Press the Rename button to edit the default name and assign a more descriptive name to the test.
  3. In the Test group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag.
  4. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.
  5. Repeat steps 1 through 4, as needed, to add additional tests.

Cleanup Actions

Once testing has been completed, it may be necessary to set the state of the job accordingly. This step defines the setup actions necessary to set the job into the desired state once TestRun has completed its tests.

Configure TestRun to set Job Parameters after Testing

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.

    Note: Selecting the setting will highlight the parameter in the Spreadsheet.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Setup Actions column with the setting.
  3. Once the setting has been enabled, select it in the Setup Actions column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed.
  5. If there are multiple settings, use the Move Up/Move Down buttons to configure the settings in their desired order of execution. TestRun will perform the setup actions in the order in which they appear in this screen.
  6. Press the Close button to complete the setup of TestRun.
  7. After closing the TestRun Setup dialog, in the TestRun tab of the Palette, press the [image] Run icon to execute the TestRun test(s).
Note: After the TestRun Setup dialog has been configured, a right-click menu is available that provides all of the buttons available in the Palette, as well as an ability to execute tests from a specific section of the tests (e.g. beginning with Hardware Tests, for instance, without running the Job Tests).


Status Bar

Status Bar: Spreadsheet View

A status bar appears for each Spreadsheet View, and is located at the bottom of the Spreadsheet View. There are three portions of the status bar that relay information about the Spreadsheet View being displayed, depending on the operation that is being performed.

Cell and Image Status

The status bar contains information about an individual cell, pixel value information or reference information about an image, depending upon whether the spreadsheet overlay is active or if you have entered Interactive Graphics Mode. The status bar also displays image acquisition time and Record/Playback image information.

Status Bar Field Description

When the spreadsheet overlay is visible, if the mouse is scrolled over a cell containing a function or data, the function or data is displayed in the left-hand side.

Note: Information will not be displayed when in the Custom View. For more information, see Custom View Settings Dialog.

When the spreadsheet overlay is not visible, if the mouse is scrolled over an image, the left side of the status bar displays pixel value information of the image.

Note:
  • When using a color vision system, RGB value information is displayed. For more information, see Show Pixel Values Mode.
  • In the spreadsheet view, absolute pixel values are displayed only when the image zoom ratio is set to Zoom 1:1from the Image menu, and the status bar displays values as follows: . When the image zoom ratio is not 1:1, "approximate" pixel values are displayed and the status bar displays values as follows: . In the EasyBuilder view, absolute pixel values are always displayed regardless of the image zoom ratio.

When in Interactive Graphics Mode, the left side of the status bar displays information of the associated interactive graphic, such as a region's location, size, rotation and curve.

When the spreadsheet updates due to an image acquisition, the job execution time (in milliseconds) is displayed in the status bar.

Note:
  • The sensor filmstrip execution time is included in the job execution time. For more information, see Sensor Filmstrip Settings Dialog.
  • The status bar and the GetAllTime function calculate time differently than the Profile Job dialog. The Profile Job dialog also accounts for the construction of result graphics, whereas the other two do not. For more information, see Profile Job Dialog.

When recording images, the left side of the status bar displays the Record Folder, Good Folder or Bad Folder directory path and the name of the image that is currently being recorded. For more information, see Record/Playback Options Dialog: Spreadsheet View.

During playback of recorded images, the left side of the status bar displays the name of the image being played back and the Playback Folder directory path. For more information, see Record/Playback Options Dialog: Spreadsheet View.

Indicates the current available job size, as the number of available, allocated cells. Use the Job Size Limit dialog to modify the value. For more information, see Job Size Limit.

Connection Status

In the event a user from a different PC or In-Sight console has logged on to one In-Sight vision system, thereby breaking your connection, In-Sight Explorer will periodically attempt to reconnect to the vision system. The message "User admin from … is already logged on” indicates that another user or application has logged on to the vision system. Each vision system permits only one connection at a time, so this message may be caused by a connection to the vision system from another PC or from another application running on your PC. The status bar may display other error messages, such as a network error, if the vision system is no longer connected to your network.

I/O Status

The I/O status bar displays the EtherNet/IP connection status between the vision system and CIO-MICRO, CIO-MICRO-CC or CIO-WENET Ethernet I/O module.

Status Bar Field | Description
 | When "I/O OK" is displayed, the connection to the module is functioning properly.
 | When "I/O Not Responding" is displayed, the connection to the module has been lost. For detailed diagnostic information, see Sensor Status View.

Online/Offline Status

The right side of the status bar always contains information relating to the Online or Offline status of the In-Sight vision system.

Status Bar Field | Description
 | When "Offline" is displayed, the In-Sight vision system is currently Offline.
 | When "Live" is displayed, the In-Sight vision system is set to Live Video in the In-Sight Explorer user interface (either from the Job Display toolbar or from the Image menu). The In-Sight vision system is displaying a live image to use when making adjustments to the vision system's lens and the field of view. Press any key to exit Live Video and return to the spreadsheet.
 | When "Online" is displayed, the In-Sight vision system is currently in Online mode of operation.
 | When "Comms Online?" is displayed, the In-Sight vision system was placed in Online mode from the In-Sight Explorer user interface, but a communication protocol (such as ProfiNET, EtherNet/IP or Native Mode) is holding the vision system Offline. For example, a Native Mode Set Online command, SO0, has been issued telling the In-Sight vision system to go Offline. The Set Online command, SO1, must be sent to the In-Sight vision system to allow it to go Online.
 | When "Discrete Online?" is displayed, the In-Sight vision system was placed in Online mode from the In-Sight Explorer user interface, but a Discrete Input line, configured as an Online/Offline Type, is set low (0). The In-Sight vision system will wait for the Discrete Input signal to change states before proceeding to Online mode. For detailed diagnostic information, see Configure Discrete I/O Lines.

Warnings

The right side of the status bar may display warnings.

Status Bar Field | Description
 | When this exclamation mark is displayed, In-Sight Explorer version does not match the firmware version of the connected In-Sight vision system. In-Sight Explorer version 5.1.0 or later is released with two firmware versions: the 5.x.x version (current version) and the latest 4.x.x version. For example, In-Sight Explorer 5.1.0 is released with In-Sight firmware 5.1.0 and 4.9.3. Therefore, when a vision system running firmware 4.9.3 is connected to In-Sight Explorer 5.1.0, no indicator will be displayed in the status bar; however, when a vision system running firmware 4.9.1 is connected to In-Sight Explorer 5.1.0, this exclamation mark is displayed on the status bar. Note: For more information on firmware versions, see Firmware Versions.


Keyboard Shortcuts

EasyBuilder View

This section describes both keyboard and mouse shortcuts that can perform actions throughout the EasyBuilder GUI.

Explorer Shortcuts

Actions that affect multiple EasyBuilder Views, GUI components and the EasyBuilder application as a whole.

Action | Keyboard | Mouse
Open the In-Sight Explorer Online Help | F1 | On the Help menu, click In-Sight Explorer Help. Alternately, on the Explorer toolbar, click the In-Sight Explorer Help [image] button.
Refresh the In-Sight Network and In-Sight Files panes. For more information, see In-Sight Network and In-Sight Files. | N/A | In the Get Connected settings pane, click Refresh. Alternately, on the View menu, click Refresh.
Copy Note: These actions work on tools in both the Locate Part and Inspect Part steps and on files within the In-Sight Files pane. For more information, see In-Sight Files. | CTRL+C | On the Standard toolbar, click the Copy [image] button.
Paste Note: These actions work on tools in both the Locate Part and Inspect Part steps and on files within the In-Sight Files pane. For more information, see In-Sight Files. | CTRL+V | On the Standard toolbar, click the Paste [image] button.
Display the Program Icon menu. The Program Icon menu allows you to control the position and size of the application window with the arrow keys. You can also restore, maximize, minimize and close In-Sight Explorer from this menu. | ALT+SPACEBAR | Click the Program Icon [image] in the upper-left corner of the application window.
Access the menu bar | ALT or F10 | Click any menu item.
Navigate the menu bar | ARROW KEYS | Click the menu.
Menu bar selection | ENTER | Click the item.
Save View Layout | SHIFT+F7 | On the System menu, click Save View Layout
Go to the first image stored in the Playback folder. For more information, see Record/Playback Options Dialog: EasyBuilder View. | N/A | On the EasyBuilder toolbar, click the Play First [image] button.
Go to the previous image stored in the Playback folder. | N/A | On the EasyBuilder toolbar, click the Play Previous [image] button.
Toggle between playing back and pausing playback of images stored in the Playback folder. | N/A | On the EasyBuilder toolbar, click the Play [image] button or the Pause [image] button.
Go to the next image stored in the Playback folder. | N/A | On the EasyBuilder toolbar, click the Play Next [image] button.
Go to the last image stored in the Playback folder. | N/A | On the EasyBuilder toolbar, click the Play Last [image] button.
Toggle between recording acquired images and stopping the recording of acquired images to the Record folder. | N/A | On the EasyBuilder toolbar, click the Record [image] button or the Stop Recording [image] button.
Open the Record/Playback Options dialog to configure the Record and Playback settings. | N/A | On the EasyBuilder toolbar, click the Record/Playback Options [image] button.

OCV/OCR Segment Editing Shortcuts

Actions that can be performed while modifying a character segment during the Font Training process. For more information, see OCV/OCR Font Training Dialog.

Action | Keyboard | Mouse
Highlight the next segment (Modify) | CTRL+RIGHT ARROW or CTRL+LEFT ARROW | Click the desired segment.
Highlight the next segment (Relabel, Delete) | ARROW KEYS | Click the desired segment.
Accept a segment (Modify, Relabel, Delete) | ENTER | Double-click the desired segment.
Toggle interactive graphic edit mode (Modify) | F9 | N/A

Spreadsheet View

This section describes both keyboard and mouse shortcuts that can perform actions throughout the In-Sight Explorer Interface.

Spreadsheet Shortcuts

Actions that can be performed inside any active spreadsheet.

Action | Keyboard | Mouse
Help | F1 | On the Help menu, click In-Sight Explorer Help. Alternately, on the Explorer toolbar, click the In-Sight Explorer Help [image] button.
Acquire a new image | F5 | On the Job Display toolbar, click the Trigger [image] button.
New Job | CTRL+N | On the Standard toolbar, click the New Job [image] button.
Start a new expression in the active cell Note: The active cell must be empty. | EQUALS (=) | Double-click an empty cell.
Edit the expression in the active cell | F2 | Click inside the Formula Bar.
Insert a text label into the active cell Note: The active cell must be empty. | APOSTROPHE (') | N/A
Accept a new or modified formula | ENTER | On the Job Edit toolbar, click the OK [image] button.
Cancel a new or modified formula | ESC | On the Job Edit toolbar, click the Cancel [image] button.
Open Job | CTRL+O or CTRL+F12 | On the Standard toolbar, click the Open Job [image] button.
Save Job Note: If the job has not been saved at least once, this action will display the Save Job As dialog. | CTRL+S or SHIFT+F12 | On the Standard toolbar, click the Save Job [image] button.
Save Job As | F12 | On the File menu, click Save Job As.
Open Image | CTRL+SHIFT + O | On the File menu, click the Open Image.
Save Image As | CTRL + SHIFT + S | On the File menu, click Save Image As.
Open the Page Setup dialog | CTRL+ALT+P | On the File menu, click Page Setup….
Open the Print Preview window | CTRL+SHIFT+P | On the Standard toolbar, click the Print Preview [image] button.
Open the Print dialog | CTRL+P | On the Standard toolbar, click the Print Sheet [image] button.
Open the Insert Function dialog. For more information, see Insert Function Dialog. Note: If the active cell contains a function that has a property sheet, then the property sheet will be opened instead of the Insert Function dialog. | CTRL+SHIFT+F or SHIFT+F3 | On the Job Edit toolbar, click the Function [image] button.
Navigate the spreadsheet | ARROW KEYS | Click the desired cell.
Insert a relative cell reference | CTRL+SHIFT+R | On the Job Edit toolbar, click the Relative Reference [image] button.
Insert an absolute cell reference | CTRL+SHIFT+A | On the Job Edit toolbar, click the Absolute Reference [image] button.
Cycles through the four cell reference types when the cursor is placed in a cell text box. | F4 | N/A
Jump to cell A0 | CTRL+HOME | N/A
Jump to cell Z399 | CTRL+END | N/A
Jump to beginning of current row (Column A) | HOME | N/A
Jump to end of current row (Column Z) | END | N/A
Jump one page upward | PAGE UP | Click the vertical scroll bar between the slider and the up-arrow.
Jump one page downward | PAGE DOWN | Click the vertical scroll bar between the slider and the down-arrow.
Mark cells within a row | SHIFT+RIGHT ARROW SHIFT+LEFT ARROW | Click and drag the mouse pointer rightward or leftward.
Mark cells within a column | SHIFT+UP ARROW SHIFT+DOWN ARROW | Click and drag the mouse pointer upward or downward.
Mark an entire row | SHIFT+SPACEBAR Tip: Once a row is highlighted, you can press SHIFT+UP ARROW or SHIFT+DOWN ARROW to mark multiple rows. | Click the row header. Drag to select multiple rows.
Mark an entire column | CTRL+SPACEBAR Tip: Once a column is highlighted, you can press SHIFT+RIGHT ARROW or SHIFT+LEFT ARROW to mark multiple columns. | Click the column header. Drag to select multiple columns.
Copy | CTRL+C or CTRL+INSERT | On the Standard toolbar, click the Copy [image] button.
Copy an image of the displayed portion of the spreadsheet to the clipboard | CTRL+SHIFT+C | N/A
Cut | CTRL+X or SHIFT+DELETE | On the Standard toolbar, click the Cut [image] button.
Paste | CTRL+V or SHIFT+INSERT | On the Standard toolbar, click the Paste [image] button.
Clear Contents | CTRL+D or DELETE | On the Edit menu, click Clear > Contents.
Clear All | CTRL+SHIFT+D | On the Edit menu, click Clear > All.
Find text | CTRL+F | On the Standard toolbar, click the Find [image] button.
Go to a cell | CTRL+G | On the Edit menu, click Go To.
Undo an action | CTRL+Z | On the Standard toolbar, click the Undo [image] button.
Redo an action | CTRL+Y | On the Standard toolbar, click the Redo [image] button.
Format a cell | CTRL+1 | On the Formatting toolbar, click the Format Cells [image] button.
Apply Bold formatting to the selected cells | CTRL+B | On the Formatting toolbar, click the Bold [image] button.
Apply Italic formatting to the selected cells | CTRL+I | On the Formatting toolbar, click the Italicize [image] button.
Accept changes | ENTER | Click OK.
Cancel changes | ESC | Click Cancel.
Toggle Online/Offline mode | CTRL+F8 | On the Job Display toolbar, click the Online/Offline [image] button.
Edit an Interactive Graphic Region | F9 | On the Job Display toolbar, click the Edit Cell Graphic [image] button.
Change the color of all Interactive Graphics in the spreadsheet | SHIFT+F9 | N/A
Resize the default region cell graphic equal to the image region in the referenced Image data structure. | CTRL+SHIFT+M | On the Job Edit toolbar, click the Maximize Cell Region [image] button.
Zoom the image in | SHIFT+PLUS (+ on the numeric keypad) or CTRL+Left-click the mouse (this option is only available when the spreadsheet overlay is not visible) | On the Job Display toolbar, click the Zoom In [image] button.
Zoom the image out | SHIFT+MINUS (- on the numeric keypad) | On the Job Display toolbar, click the Zoom Out [image] button.
Zoom the image to one image pixel per one PC display pixel | SHIFT+MULTIPLY (* on the numeric keypad) | On the Job Display toolbar, click the Zoom 1:1 [image] button.
Pan the zoomed image. The zoomed image must extend beyond the Spreadsheet View window for panning to be enabled. Note: This feature is available when the spreadsheet overlay is not visible. | SHIFT+CTRL+Left-click the mouse and drag the [image] cursor | N/A
Zoom-to-Region: Create a dotted rectangle around an image region and zoom in; the user-defined rectangle zooms to fill the entire Spreadsheet View. When creating the rectangle, the initial location of the cursor will be the center of the rectangle. Once the maximum zoom is reached, Zoom-to-Region is disabled. Note: This feature is available when the spreadsheet overlay is not visible. | CTRL+Left-click the mouse and drag the [image] cursor To exit Zoom-to-Region mode, release the Control key; the cursor should return to a standard [image] cursor. | N/A
Zoom the sheet in | CTRL+PLUS (+ on the numeric keypad) | On the Job Display toolbar, increase the Sheet Zoom percentage [image] .
Zoom the sheet out | CTRL+MINUS (- on the numeric keypad) | On the Job Display toolbar, decrease the Sheet Zoom percentage [image] .
Zoom the sheet to fit the selected range of cells, or to 100% scale if a single cell is selected | CTRL+MULTIPLY (* on the numeric keypad) | On the Job Display toolbar, change the Sheet Zoom percentage [image] as desired .
Change Image Orientation | SHIFT+DIVIDE (/ on numeric keypad) | On the Job Display toolbar, click the Rotate Image [image] button.
Show/hide overlay graphics associated with spreadsheet functions. | CTRL+SHIFT+G | On the Job Display toolbar, click the Graphics [image] button.
Enables/disables the highlighting of pixels in the image with a gray level less than or equal to the Low Saturation Level (in blue) and greater than or equal to the High Saturation Level (in red). | CTRL+SHIFT+S | On the Job Display toolbar, click the Show Image Saturation [image] button.
Turns on the display of dependency arrows and increases the number of displayed dependency levels. For more information, see Job Auditing. | F11 | On the Job Audit toolbar, press the Show Dependency Levels Increase [image] button.
Decreases the number of displayed dependency levels. | SHIFT+F11 | On the Job Audit toolbar, press the Show Dependency Levels Decrease [image] button.
Sets the number of displayed dependency levels to zero. | CTRL+F11 | On the Job Audit toolbar, press the Show Dependency Levels Reset [image] button.
Displays only dependencies for which the precedent cell is in error (#ERR). | ALT+F11 | On the Job Audit toolbar, press the Show Dependency Errors Only [image] button.
Jumps to the first #ERR precedent of the active cell. | CTRL+SHIFT+F11 | On the Job Audit toolbar, press the Go To First Error [image] button.
Show/Hide the spreadsheet overlay | SHIFT+F6 | On the Job Display toolbar, click the Show Overlay [image] button.
Toggle the Custom View. For more information, see Custom View Settings Dialog. | F6 | On the Job Display toolbar, click the Show Custom View [image] button.
Jump to the next Spreadsheet View or Status View on display Note: At least two views (either Spreadsheet or Status) must be on display for this to be functional. | CTRL+F6 | Click the desired View. Alternately, select the desired view from the Window menu.
Close the active Spreadsheet View or Status View | CTRL+F4 | Click the Close [image] button on the desired View.
Save View Layout | SHIFT+F7 | On the System Menu, click Save View Layout.
Display the right-click menu. For more information, see Right-Click Menu. | SHIFT+F10 | Right-click the selection.

Explorer Shortcuts

Actions that affect multiple Spreadsheet Views, GUI components and the In-Sight Explorer application as a whole.

Action Keyboard Mouse

Help

F1

On the Help menu, click In-Sight Explorer Help.

Refresh the In-Sight Network and In-Sight Files panes.

  1. Press TAB until you land on either pane.
  2. Press F5.

On the View menu, click Refresh.

Copy

Note: These actions work on both spreadsheet cell data and files within the In-Sight Files pane

CTRL+C or CTRL+INSERT

On the Standard toolbar, click the Copy [image] button.

Cut

Note: These actions work on both spreadsheet cell data and files within the In-Sight Files pane

CTRL+X or SHIFT+DELETE

On the Standard toolbar, click the Cut [image] button.

Paste

Note: These actions work on both spreadsheet cell data and files within the In-Sight Files pane

CTRL+V or SHIFT+INSERT

On the Standard toolbar, click the Paste [image] button.

Clear Contents

Note: These actions work on both spreadsheet cell data and files within the In-Sight Files pane

CTRL+D or DELETE

On the Edit menu, click Clear > Contents.

Display the right-click menu. For more information, see Right-Click Menu.

SHIFT+F10

Right-click the selection.

Display the Program Icon menu. The Program Icon menu allows you to control the position and size of the application window with the arrow keys. You can also restore, maximize, minimize and close In-Sight Explorer from this menu.

ALT+SPACEBAR

Click the Program Icon [image] in the upper-left corner of the application window.

Access the menu bar

ALT or F10

Click any menu item.

Navigate the menu bar

ARROW KEYS

Click the menu.

Menu bar selection

ENTER

Click the item.

Save View Layout

SHIFT+F7

On the System menu, click Save View Layout.

Go to the first image stored in the Playback folder.

CTRL+H

On the Record/Playback toolbar, click the Play First [image] button.

Go to the previous image stored in the Playback folder.

CTRL+J

On the Record/Playback toolbar, click the Play Previous [image] button.

Toggle between playing back and pausing playback of images stored in the Playback folder.

CTRL+M

On the Record/Playback toolbar, click the Play [image] button or the Pause [image] button.

Go to the next image stored in the Playback folder.

CTRL+K

On the Record/Playback toolbar, click the Play Next [image] button.

Go to the last image stored in the Playback folder.

CTRL+L

On the Record/Playback toolbar, click the Play Last [image] button.

Toggle between recording acquired images and stopping the recording of acquired images to the Record folder.

CTRL+R

On the Record/Playback toolbar, click the Record [image] button or the Stop Recording [image] button.

Open the Record/Playback Options dialog to configure the Record and Playback settings. For more information, see Record/Playback Options Dialog: Spreadsheet View.

CTRL+T

On the Record/Playback toolbar, click the Record/Playback Options [image] button.

OCV/OCR Segment Editing Shortcuts

Actions that can be performed while modifying a character segment during the Font Training process. For more information, see OCV/OCR Font Training Dialog. For more OCV/OCR segment editing commands, including image zoom and image panning, see Interactive Graphics Mode.

Action | Keyboard | Mouse
Highlight the next segment (Modify) | CTRL+RIGHT ARROW or CTRL+LEFT ARROW | Click the desired segment.
Highlight the next segment (Relabel, Delete) | ARROW KEYS | Click the desired segment.
Accept a segment (Modify, Relabel, Delete) | ENTER | Double-click the desired segment.
Toggle interactive graphic edit mode (Modify) | F9 | N/A


Mouse Actions

The following table lists general mouse actions used within the In-Sight Explorer interface.

Action

In-Sight Network

In-Sight Files

Spreadsheet

Left-click

If In-Sight Sensors is selected, then the In-Sight Files pane, if shown, will revert to its top level. All In-Sight sensors (including Explorer Host Table entries) appear in the Files list ,indicated with a folder [image] icon.

If an In-Sight sensor [image] or emulator [image] is selected, then the In-Sight Files pane displays all files on that sensor.

Selects a file or sensor from the list.
  • Selects a spreadsheet cell and makes it the active cell.
  • Selects and opens items.
  • Accepts changes made to values.
  • Adjusts interactive graphics.

Right-click

If In-Sight Sensors is selected, a shortcut menu appears:

If an In-Sight sensor [image] or emulator [image] is selected, a sensor-specific shortcut menu appears:

If In-Sight Sensors is selected in the In-Sight Network pane, then the In-Sight Files pane reverts to its top level. If an In-Sight sensor (indicated with a folder [image] icon) is selected, an Open menu appears that allows you to view all files on the selected sensor.

If no sensor (indicated with a folder [image] icon) is selected, a View menu appears that allows you to arrange files in a Thumbnails, Tiles, List or Details view.

If an In-Sight sensor [image] or emulator [image] is selected in the In-Sight Network pane, the In-Sight Files pane displays all files on that sensor. If no files are selected, a sensor-specific shortcut menu appears:

If a file is selected, a file-specific shortcut menu appears that allows you to copy, delete or rename the file.

Display the right-click menu. For more information, see Right-Click Menu.

Left double-click

If an In-Sight sensor [image] or emulator [image] is double-clicked, the EasyBuilder View opens for that sensor or emulator.

If In-Sight Sensors is selected in the In-Sight Network pane, then the In-Sight Files pane reverts to its top level. If an In-Sight sensor (indicated with a folder [image] icon) is selected, the In-Sight Files pane displays all files on that sensor.

Selects a spreadsheet cell and edits the expression for that cell either in place or using the property sheet, unless the cell contains a button or edit control. If the cell contains a button, the first click will activate the button. If the cell contains an edit control, the first click will begin editing the cell's value.

If a row or column divider line is double-clicked, the row or column automatically resizes to fit its contents.

Left-click and drag

N/A

Copies files between In-Sight sensors. Files can be dragged from the Files pane to any In-Sight sensor listed under the In-Sight Network.

Job files and Image files can be dragged to open Spreadsheet Views; this loads the job or image as the active job/image on the destination sensor.

Selects a range of cells, rows, or columns for block editing operations. If a row or column divider is dragged, the row or column resizes.

Right-click and drag

N/A

Copies files between In-Sight sensors. Files can be dragged from the Files pane to any In-Sight sensor listed under the In-Sight Network.

Job files and Image files can be dragged to open Spreadsheet Views. This loads the job or image as the active job/image on the destination sensor.

Selects a range of cells, rows, or columns for block editing operations. The right-click shortcut menu is displayed immediately afterward. For more information, see Right-Click Menu.


Customizing Window Panes

The Application Steps (EasyBuilder view only), In-Sight Network, In-Sight Files, Palette, Spreadsheet Navigator, Script Console Output panes are dockable window panes, and can be customized by dragging or by right-clicking the title bar of the pane.

By Dragging

Click the title of the window pane and drag to the desired location.

Docking Window Panes

To attach a window pane to a particular part of the user interface, drag the window pane to the edge where you want to dock it, and drop it onto one of the small squares that appear in the user interface. When hovering over the small square, the preview of the docked location will be displayed in blue.

Dock on left side of the user interface.
Dock on right side of the user interface.
Dock on top side of the user interface.
Dock on bottom side of the user interface.
Tab dock the window pane.

By Right-Clicking

The following menus are displayed when right-clicking the title of the window pane:

  • Dockable (default): Attaches the window pane to the user interface.
  • Auto Hide: "Pins" the window pane to the side of the user interface. To show the window pane, hover over the thin bar on the side of the user interface. This menu is disabled when Floating is selected.
  • Hide: Close the window pane. To unhide, select the window pane from the View menu. This menu is not available for the EasyBuilder Application Steps window pane.
Note: If double-clicking the floating window pane, it will return to the most recent docked location. If double-clicking the docked window pane, it will be detached from the user interface.


Spreadsheet Cell Execution and Editing Reference

The Spreadsheet is analogous to other spreadsheet applications in terms of its standard operations and functionality, such as manipulating blocks of cells, editing cells, referencing cells and inserting functions. Organized into a table of cells arranged in 400 rows (numbered 0 to 399) and 26 columns (labeled A to Z), each cell is identified by its column letter and row number; for example, cell A2 is located at the intersection of column A and row 2.

The spreadsheet is configured one cell at a time. The contents of each cell are defined as a formula, and any piece of information inserted into a cell (whether a single numeric value or a complex vision processing function) is considered a part of the formula. When you highlight a cell, it becomes outlined in black and the information in the cell is displayed in the Formula Bar of the Job Edit toolbar.

Clicking on a cell automatically makes it the active cell. The active cell is the cell that is currently highlighted within the spreadsheet. For example, in the following spreadsheet, B2 is the active cell and is outlined in black. The headers of both the active column (B) and the active row (2) are highlighted in orange to indicate the address of the active cell.

Tip: Right-clicking within the spreadsheet displays a shortcut menu that allows various spreadsheet operations to be performed. For more information, see Right-Click Menu.

Cell Execution Order

As with other conventional spreadsheets, the execution order of the cells in the In-Sight spreadsheet is dynamically determined by the relationship and dependencies between cell functions. The In-Sight spreadsheet determines the order of cell execution primarily by evaluating cells according to their dependencies, and secondarily by their locations within the spreadsheet.

Cell Dependencies

In the following example, the value of cells B2 and A3 directly depend on the value of A2. Cell A4 indirectly depends on A2 because it references A3. Whenever the value in A2 changes, then the values of B2 and A3 must be re-evaluated, followed by A4. An internal execution tree is automatically created to track cell dependencies; this tree is rebuilt whenever the spreadsheet is modified while the system is Offline.

For example:

A2 = 1

A3 = A2+1

A4 = A3+1

B2 = A2+2

From the Profile Job dialog, we can observe the execution tree for this example:

When a cell's value or expression changes, the In-Sight spreadsheet locates the cell in the tree and determines which cells need to be reevaluated. In this example, if the value in A2 changes, then all dependent cells (B2, A3, and A4) must be reevaluated; however, if the expression in cell B2 changes, then no other cells need to be updated because no cell is dependent upon B2. For more information, see Profile Job Dialog.

Order of Cell Execution

After dependencies have been evaluated, the cells are evaluated by their location within the spreadsheet. Cells are sorted by their row-coordinate (from left to right), and then by their column-coordinate (from top to bottom.) In the preceding example cell A2 is executed first, followed by cells B2, A3, and then A4. If two cells exist in the same row, then the left-most cell is executed first.

From the Profile Job dialog, we can observe that cell A2 is executed first, followed by cells B2, A3, and finally A4.

The following are exceptions to normal cell execution order:

  • ReadResult and WriteResult functions: The ReadResult and WriteResult functions are placed near the bottom of the execution tree regardless of their location in the spreadsheet. Since ReadResult waits for data coming back from the Slave's WriteResult, the function is executed at the end of job so that time is not wasted waiting for the data. WriteResult is also executed near the end of job to make sure that the system is ready to get the next trigger. For more information, see ReadResult and WriteResult.
  • Clocked functions: In the execution tree, clocked functions are always placed at the top of the tree because they need to access the old data in the other cells. For more information, see Clocked Data Storage Functions.
  • Functions with non-dependency cell-references: Several functions take cell references as arguments but do not establish any dependencies. The Row function, which returns the row coordinate of the referenced cell, is one of these functions. For example, Row(A4) always returns 4, even if the value in A4 changes.

For example, the following ReadResult function has been added to the spreadsheet: A1 = ReadResult($A$0,"SYSTEM1",1000).

From the Profiler, we see that cell A1 is at the bottom of the execution tree even though it is near the top of the spreadsheet:

Next, a Clocked Data Storage function is added: A5 = Accumulate($A$0,0,0,0)

Note that even though cell A5 is below the other cells containing data, it is at the top of the execution tree:

What Triggers the Execution?

Cells are executed when:

  • A cell which has dependents has been modified.
  • External events occur, such as AcquireImage triggers, serial data, and incoming packets to TCPDevice. For more information, see AcquireImage and TCPDevice.
  • Graphics Controls (such as Button, Checkbox, EditInt) signal a spreadsheet Event trigger. For more information, see Graphics Functions and Event.

Most Vision Tool functions depend either directly or indirectly on the AcquireImage function in Cell A0. When a new image is acquired, these functions execute and return new values. Also, the spreadsheet updates when an image acquisition or other spreadsheet Event is triggered.

Enter Information into the Spreadsheet

Machine vision applications are configured by assembling formulas and inserting them into the cells of the spreadsheet. A formula can contain four types of data:

  • A number
  • Text
  • A reference to another cell, either absolute or relative. For more information, see Cell References - Relative/Absolute.
  • A function, with specific parameters. For more information, see Function Reference.
Note: An In-Sight spreadsheet can contain a maximum of 4,096 active cells. Inserting a function (such as FindBlobs) that, in turn, inserts multiple Vision Data Access functions into the spreadsheet can cause the spreadsheet to attempt to exceed the limit. In this case, no warning dialog is issued; the cells over the 4,096 limit are simply not inserted.
How To... Description
Insert Numbers into a Cell

Select a blank cell and enter the numeric value (for example, 26).
Insert Text into a Cell

Select a blank cell and press the apostrophe (') key. Any text following the apostrophe is inserted into the active cell as a text label rather than a formula.
Insert a Cell Reference into a Cell

There are four main methods for inserting cell references into cells:

  • Double-click on a blank cell, and then click on the cell you want to reference (this creates a relative reference; to create an absolute reference, hold down the SHIFT key).

  • Select a blank cell, and then manually type the cell name to reference (this creates a relative reference; to create an absolute reference, type the $ symbol before the letter and the number [for example, $C$3]).

  • Select a blank cell, and then press CTRL+SHIFT+A or CTRL+SHIFT+R to insert an absolute or relative cell reference, respectively, and enter cell selection mode.
  • Select a blank cell, and then click the Absolute Reference [image] or Relative Reference [image] button on the Job Edit toolbar and enter cell selection mode.
Insert a Function into a Cell

There are six main methods for inserting functions into cells:

  • Drag a function from the Palette to a blank cell. If the function has an associated property sheet, it is automatically displayed.
  • Select a blank cell, and double-click on a function in the Palette. If the function has an associated property sheet, it is automatically displayed.
  • Select a blank cell, and then press the Function [image] button on the Job Edit toolbar. This launches the Insert Function dialog.

  • Select a blank cell, and then press either the ENTER or EQUALS key. Next, press either the UP or DOWN ARROW key. This displays a function box, where you can type or select a function. Press either the TAB or ENTER key to close the function box.

  • Select a blank cell, manually type the name of the function and then either press the ENTER key or manually type an open parenthesis. If the function has an associated property sheet, it is automatically displayed.

  • Select a blank cell, manually type the name of the function into the formula bar and then either press the ENTER key or manually type an open parenthesis. If the function has an associated property sheet, it is automatically displayed.

Note: Functions with a variable-length list of arguments (such as Wizard and WriteEIP) do not have property sheets.
Accept or Reject the Formula

To accept the new formula/value, do one of the following:

  • Press the ENTER key.
  • Click the OK [image] button on the Job Edit toolbar.

To cancel the new formula/value and restore the previous expression, do one of the following:

  • Press the ESC key.
  • Click the Cancel [image] button on the Job Edit toolbar.

Any text highlighted in red indicates an error in your formula that must be corrected before the formula can be accepted.
Use the Formula Bar

The formula bar is located on the Job Edit toolbar. It contains three pieces of information:

  • The active cell (E4)
  • Any formula or value contained in the active cell (442)
  • Cell state information for the active cell (if $A$4)

You can directly edit the formula, value or label in the active cell by simply clicking inside the formula bar and making any desired changes. Click inside a function's parentheses to display a tooltip that assists with syntax.
View Tooltips and Help Information

Tooltips are available in both the spreadsheet and the formula bar. Click inside the function's parentheses to see the syntax.

Tip: When the cursor is positioned inside a function's parentheses, you can press F1 to load the external help topic for the function.

Edit a Spreadsheet Cell

In addition to editing the formulas contained in individual cells, you can cut, copy, paste or delete cells or adjust cell formatting.

Note: During a cut-and-paste operation, the contents of the cut cell may be lost if an error occurs, even if the Cancel button is pressed to stop the operation. In this scenario, use Undo (CTRL+Z) to restore the contents of the cut cell.
How To... | Description

Edit Numbers and Text

To edit a numeric value or text in the active cell, press the ENTER or EQUALS key. You can also simply type over the number or text, but this erases the previous number or text.
Edit Cell References | To change a cell reference, simply follow the steps for inserting a cell reference.
Edit Functions

Functions can be edited in the property sheet (if available) or in the spreadsheet.

  • If the function has an associated property sheet, press the ENTER or EQUALS key on the active cell to automatically launch it.

  • To edit the function in the active cell, rather than in a property sheet, press F2.

    Press the UP or DOWN ARROW key to display the function box below the formula. Press the RIGHT or LEFT ARROW key to move the cursor within the formula.

    Note: Based on the location of the cursor, only the functions that are valid for that particular expression in the formula are listed in the function box.

    To choose a different function, either type or select the desired function. Press either the TAB or ENTER key to close the function box.


Cell Selection Mode

The most convenient method for inserting relative and absolute cell references is to use cell selection mode. For more information, see Cell References - Relative/Absolute.

In cell selection mode, cell references are created by clicking cells directly in the spreadsheet; providing a means to visually select a cell, rather than having to remember if the Blob count was contained in cell G67 or cell D25, for example.

Invoke Cell Selection Mode

By clicking either the Relative Reference [image] button or the Absolute Reference [image] button, cell selection mode can be invoked from any of the following:

  • A property sheet. For more information, see Property Sheet.
  • The Custom View Settings dialog. For more information, see Custom View Settings Dialog.
  • The Cell State dialog. For more information, see Cell State Dialog.
  • User dialogs. For more information, see Dialog.

When in cell selection mode, the display temporarily switches into a unique view of the In-Sight spreadsheet where the image is not visible beneath the spreadsheet and an expandable rectangle with a red outline represents the cell(s) to be referenced.

Establish a Cell Reference

  1. Choose the cell(s) to reference. One or more cells may be selected with either the mouse or the keyboard. To select multiple cells with the mouse, click and drag across any cells to reference. Using the keyboard, hold down SHIFT and press the ARROW KEYS to select a group of cells.
  2. Accept the reference. References may be accepted either by double-clicking the desired cell (for a single-cell reference) or by pressing ENTER (for referencing either single or multiple cells). Once the reference has been accepted, the display switches back to the property sheet, dialog, or spreadsheet cell from which cell selection mode was initiated.

Single-Cell Reference Example

Assume we are performing blob analysis on the image. An ExtractBlobs function, located in cell A2, produces an output in cell B2 (using the GetNFound function) that represents the number of blobs located within the image. Our goal is to display a "linked copy" of this GetNFound result inside cell A6. This new value is updated whenever the original number of blobs in cell B2 changes. By creating an absolute cell reference to cell B2 within cell A6, the two cells are synchronized.

Consider the following spreadsheet:

To create a synchronized copy of the number of located blobs (4.000) in cell A6:

  1. Highlight cell A6.
  2. From the Job Edit toolbar, click the Absolute Reference [image] button; this invokes cell selection mode.

  3. Double-click cell B2.

    Note: In the preceding graphic, the Show parameter for the ExtractBlobs function in cell A2 was set to display both input and result graphics (for illustration purposes).

    The formula placed into cell A6 is an absolute reference to cell A2 ($A$2). Whenever the value in cell B2 changes, A6 updates accordingly.

Multiple-Cell Reference Example

Multiple-cell references can be useful on property sheets when defining parameters that have more than one value, such as fixtures and regions.

Consider the following spreadsheet:

Assume we want to be able to control the interactive graphic region (in red) during run-time operation. We can define an EditFloat control for each property of the region (X, Y, height, width, angle, and curve), as follows:

A10 = 'X

B10 = 'Y

C10 = 'Wide

D10 = 'High

E10 = 'Angle

F10 = 'Curve

A11 = EditFloat(0,480)

B11 = EditFloat(0,640)

C11 = EditFloat($B$7,$B$8)

D11 = EditFloat($B$7,$B$8)

E11 = EditFloat(0,360)

F11 = EditFloat(0,400)

The limits on the EditFloat functions (MinValue and MaxValue) were chosen arbitrarily, yet reasonably, to ensure that no errors would result from out-of-range input values to the region. Cell B7 contains 10.000, which defines the lower limit on the Wide and High values through the absolute reference $B$7 as the first argument to the EditFloat control. Similarly, cell B8 sets the upper limit of 500.000 on these controls.

  1. Highlight cell A2.

  2. Click the Function [image] button from the Job Edit toolbar, to open the property sheet for the ExtractBlobs function:

  3. Select the Region parameter.

  4. Click the Absolute Reference [image] button (from the Job Edit toolbar) to invoke cell selection mode. Using either the mouse or keyboard (SHIFT+ARROW KEYS), highlight cells A11 through F11 as shown:

  5. Press ENTER to accept the range.
  6. Click OK to close the property sheet. The interactive graphic region may now be adjusted through the Edit controls on the spreadsheet.


Show Pixel Values Mode

In the Show Pixel Values Mode, the cursor is used to reference a single pixel on the image when the spreadsheet overlay is not displayed. In this mode, as you move the cursor over the image, it registers:

  • The 8-bit greyscale value for monochrome In-Sight vision systems, for the pixel at that coordinate position.
  • The 8-bit RGB values for color In-Sight sensors, for the pixel at that coordinate position. For more information, see Color Components of a Pixel.

The values are displayed in the status bar of the active Spreadsheet View. For more information, see Status Bar.

Invoke Show Pixel Values Mode

From the View menu, click Overlay to hide the spreadsheet overlay. Alternately, from the Job Display toolbar, click the Overlay [image] button. Then simply scroll the cursor over the image to register values in the status bar.

In the first example, the cursor is located at (x,y) = (238,272) and has an 8-bit grayscale value of 33. The second example is from an In-Sight color sensor; the cursor is located at (x,y) = (251,347), and has Red, Green and Blue color components of (R,G,B) = (105,26,32).

Absolute Pixel Value and Approximate Pixel Value

In the spreadsheet view, absolute pixel values are displayed only when the image zoom ratio is set to Zoom 1:1from the Image menu, and the status bar displays values as follows: . When the image zoom ratio is not 1:1, "approximate" pixel values are displayed and the status bar displays values as follows: . In the EasyBuilder view, absolute pixel values are always displayed regardless of the image zoom ratio.


In-Sight Coordinate System

For images acquired by an In-Sight vision system, the image origin, at coordinate (0,0) is located at the center of the pixel. The coordinates 0,0 refer to the center of the pixel (pixels are assumed to be rectangles). Integer coordinate values specify a point midway between pixel centers.

The X axis extends vertically down from the origin, and the Y axis extends horizontally right from the origin. Height refers to the X axis, Width refers to the Y axis, and Angle increases in a counter-clockwise rotation (i.e. right-handed).


Define a Custom View of the Spreadsheet

  1. On the Edit menu, click Custom View Settings.

  2. Click Select Cells. Cell Selection Mode allows you to highlight the Cell Range to be visible in the Custom View. If this range is too large to fit within the defined Position & Size (next step), then the Custom View permits scrolling to access all cells in the range. For more information, see Cell Selection Mode.

    Note: A custom view cell range can quickly be defined by highlighting a group of cells in the spreadsheet, right-clicking within the range, and selecting Custom View Settings.
  3. Configure the Position & Size of the Custom View with the following buttons:

    • Move/Resize: Allows you to define the location, height and width of the Custom View by adjusting an interactive graphic region. For more information, see Interactive Graphics Mode.

      Note: The size of the Custom View cannot exceed the size of the Cell Range in the preceding step.
    • Center: Positions the Custom View in the center of the display; this overrides any location set by Move/Resize.
    • Size To Fit: Resizes the Custom View to fit the range specified in Select Cells; this overrides any size set by Move/Resize.
  4. Choose which Display Elements will appear in the Custom View:
    • Image: When selected, the image will be displayed beneath the Custom View overlay. Clear the Image checkbox to hide the image display.
    • Overlay: When selected, the Custom View overlay will always be displayed. Clear the Overlay checkbox to hide the Custom View overlay.

    • Graphics: When selected, graphics generated by functions in the spreadsheet will be displayed on top of the image at all times. Clear the Graphics checkbox to hide all graphics.

      Note: Limiting the display to those elements which are necessary will decrease the amount of time it takes for In-Sight Explorer to refresh the display and can reduce the total cycle time of inspections.
  5. (Optional) Specify the condition on which to refresh the selected Display Elements:

    • Refresh Conditionally: Refreshes Display Elements conditionally based upon the value of a reference cell.

      If this checkbox is selected, the chosen Display Elements will refresh only when 'Reference' contains a non-zero value. When 'Reference' evaluates to zero, the Image, Graphics and Overlay will not be refreshed, regardless of the state of their respective checkboxes. Clear this checkbox to always refresh the selected Display Elements after an acquisition.

    • Reference: Establishes the cell reference that determines when the Display Elements refresh.

      Conditional Refresh Example: Assume that Refresh Conditionally is selected and that Reference points to cell $A$1, which evaluates to 1.000 whenever a failure condition occurs. In this case, the Image, Graphics and Custom View overlay will only be refreshed after an acquisition when the value in cell $A$1 is non-zero. Otherwise, the Image, Graphics and Custom View overlay will remain static in the display until a failure condition occurs.

  6. (Optional) Specify the sheet zoom level for the Custom View by entering a sheet zoom percentage on the Job Display toolbar. This can be done while the Custom View Settings dialog is open or any time the Custom View is displayed. For more information, see Sheet Zoom Dialog .

    Note:
    • When the sheet zoom percentage is modified for the Custom View, the view is automatically resized to fit the range specified when you click the Select Cells button.
    • Separate sheet zoom values are maintained for the Spreadsheet View and the Custom View.
  7. Click OK to accept the changes to the Custom View, or press Cancel to discard the changes.


Load a Custom View at Startup

You can customize In-Sight Explorer to automatically load a job file with a Custom View and log on a specific user when the application is launched. To automatically load a Custom View at start up, complete the following steps:

Note: The Custom View of the spreadsheet is always displayed when a user with a Protected or Locked access level logs on to the sensor.
  1. Specify a job file to load.
    1. Create a job file with a Custom View and save the job file.
    2. From the Sensor menu, select Startup to open the Startup dialog.
    3. From the Job drop-down menu, select the job file that should automatically load at start up.
    4. Click OK to close the Startup dialog.
  2. Set up a user that defaults to the Custom View.
    1. From the Sensor menu, select User List to open the User List dialog.
    2. Highlight a user from the list.
    3. Click Edit to open the User dialog.
    4. Enable the Show Custom View at Logon checkbox.
    5. Click OK to close the User dialog. Click OK again to close the User List dialog.

  3. Set up your default logon user.

    Note: The default logon user should be the same user specified in the User List dialog above.
    1. From the System menu, open the Options dialog.
    2. Highlight Startup to display the Startup panel.
    3. Enter the User Name that should automatically log on when In-Sight Explorer is launched.
    4. Enter the Password for the Startup User Name. If no password is assigned for the user, leave the Password field blank.


Menu Bar

The following menus are available from the EasyBuilder view:

File Menu

Edit Menu

View Menu

Image Menu

Sensor Menu

System Menu

Window Menu

Help Menu


File Menu: EasyBuilder View

The File menu allows you to load and save job files and image files, and print a copy of the Results Table of the active job. You can also close EasyBuilder from this menu.

Note: The following options of the File menu are available only when an EasyBuilder View is the active window.
  • New Job: Closes the current job and opens a blank job file. You are prompted to save the active job before the new job is created.
  • Open Job: Loads a job file from an In-Sight sensor or emulator using the Open dialog. After the job is opened, it becomes the active job. For more information, see Save & Open Dialogs.
  • Save Job: Writes the active job to a file using the Save As dialog. If the active job has already been saved, this option will overwrite the existing file with any changes that have been made since the last save; you will not be prompted with a Save dialog. Jobs can be saved to In-Sight sensors or emulators. For more information, see Save & Open Dialogs.
  • Save Job As: Writes the active job to a new file. This option displays the Save As dialog, which prompts you for a filename before saving. Jobs can be saved to In-Sight sensors or emulators. For more information, see Save & Open Dialogs.
  • Open Image: Loads an image from an In-Sight sensor or emulator using the Open dialog. Once the image has been opened, it is placed in the display area. For more information, see Save & Open Dialogs.

  • Save Image As: Writes the current image to a file. This option displays the Save As dialog, which prompts you for a filename before saving. Images can be saved to In-Sight sensors or emulators. For more information, see Save & Open Dialogs.

    Note: When an image is saved to an In-Sight sensor, it becomes the current image (image.bmp), irrespective of the chosen filename; In-Sight sensors do not support image files with arbitrary names.
  • Page Setup: Displays the Page Setup dialog, which allows you to set the paper size, orientation and margins. For more information, see Page Setup Dialog.
  • Print Preview: Displays the Print Preview window, which allows you to preview the page(s) before printing. For more information, see Print Preview.
  • Print: Prints the Results Table of the active job to a local or network printer. The Print option displays the Print dialog. For more information, see Results Table and Print Dialog.
  • Exit: Closes EasyBuilder. If running, the local In-Sight emulator will be shut down with the application.

New Job

Open Job

Save Job

Save Job As

Open Image

Save Image As

Page Setup

Print Preview

Print

Exit


Edit Menu: EasyBuilder View

The Edit menu contains functionality to manipulate job data, files and images.

Note: When an EasyBuilder View is the active window, the commands in the Edit menu are available only in the Locate Part and Inspect Part steps. When the In-Sight Files pane is the active window, some of the editing commands are available for file management (for example, copying and pasting files from one vision system to another). For more information, see In-Sight Files.
  • Undo: Reverses the last action of an edit to an EasyBuilder job (such as copying, pasting or deleting).
  • Redo: Reverses the last action of the Undo command.
  • Cut: Not available in EasyBuilder View.
  • Copy: Stores contents from a selected Location or Inspect Part Tool into memory for duplication into the Locate Part or Inspect Part step in an EasyBuilder job. The original content remains intact. From the In-Sight Files pane, clicking Copy places any highlighted file(s) onto the Windows clipboard for pasting to a destination vision system.

  • Paste: Writes copied data from memory to the Locate Part or Inspect Part step in an EasyBuilder job. Writes files to a destination vision system or any Microsoft Windows Explorer folder (including the Desktop).

    Note: When an image file is pasted toa vision system, that file becomes the active image and is represented by image.bmp. vision systems do not store images other than the active image. However, In-Sight emulators can store any number of image files (limited only by the PC's hard disk capacity).
  • Delete: Depending on which window is active, Delete can be used to remove tools from an EasyBuilder job. When the In-Sight Files pane is the active window, Delete can remove selected files except for certain files.
  • Maximize Region: Resizes a selected tool graphic so that it equals the size of the display area.
  • HMI View Selection: Opens the HMI View Selection dialog to specify the Run Mode views that are visible to the user from the HMI application and the order of the views when you click the Switch View button in the HMI application. For more information, see HMI Settings Dialog.

Undo

Redo

Cut

Copy

Paste

Delete

Maximize Region

HMI View Selection


View Menu: EasyBuilder View

The View menu allows you to customize EasyBuilder's user interface.

Note: The following options of the View menu are available only when an EasyBuilder View is the active window.
  • In-Sight Network: Shows/hides the In-Sight Network pane, which displays all vision systems detected on your local subnet in addition to any vision systems defined within the Explorer Host Table. For more information, see In-Sight Network.
  • In-Sight Files: Shows/hides the In-Sight Files pane, which allows you view the files contained ona vision system or emulator. Drag-and-drop can be used to copy job files, images and vision system settings among the vision systems on your network via FTP. For more information, see In-Sight Files.
  • Palette: Shows/hides the Palette, which displays the Help, Results and I/O tabs. For more information, see Palette: EasyBuilder View.
  • Toolbars: Shows/hides the Standard toolbar, Job Display toolbar and Explorer toolbar (by default this toolbar is hidden). For more information, see Toolbars: EasyBuilder View.
  • Refresh: Repopulates the file list in the In-Sight Files pane and the vision system/emulator list in the Get Connected settings pane and the In-Sight Network pane to account for any of the following:
    • Files or folders that have been remotely saved, renamed or deleted.
    • Vision systems or emulators that have been disconnected from the network.
  • Show Selected Tool Graphics Only: Shows/hides overlay graphics associated with the selected tool.
  • Show Immediate Feedback: Shows/hides immediate feedback for Location and Inspection Tools when their region is moved or re-sized. When enabled, graphics will be updated immediately as a region is moved or re-sized. When disabled, graphics will not be updated until after the region is moved or re-sized.
  • Text Scale Mode: Defines the scale for graphic overlay text. This setting is applied to all graphic overlay text and is not saved to the job file. (default = Scale With Image)
    • Scale With Image: As the image is zoomed in or out, the graphic overlay text is scaled proportionally with the image.
    • Shrink Only: As the image is zoomed out, the scale of the graphic overlay text is decreased. As the image is zoomed in, if the graphic overlay text is smaller than the default font size (9 point), the scale of the graphic overlay text is increased until it reaches the default font size.
    • Fixed: The graphic overlay text is a fixed size, regardless of the image zoom level.
  • Filmstrip: Shows/hides the filmstrip, which can display images stored to the PC or to the vision system. For more information, see Filmstrip: EasyBuilder.

  • Focus Metric: Shows/hides the Focus Metric, which is used to help determine an image focus score to indicate the degree to which the image, or a Region of the image, includes the smallest resolvable features in a "scene" (i.e., the object and its background, as captured in the image).

    Note: When connected to the In-Sight 2000 series vision sensor, Focus Metric's Minimum, Maximum and Focus values are hidden.
  • Application Steps: Allows you to navigate to any available EasyBuilder application step. For more information, see Application Steps.
  • Spreadsheet: Displays the current job in the Spreadsheet View. For more information, see Spreadsheet View.

In-Sight Network

In-Sight Files

Palette

Toolbars

Refresh

Show Selected Tool Graphics Only

Show Immediate Feedback

Text Scale Mode

Filmstrip

Focus Metric

Application Steps

Spreadsheet


Palette

Palette: EasyBuilder View

The Palette is a reference pane that provides user guidance through its tabs. To display the Palette, select Palette from the View menu.

Note: Customize EasyBuilder by docking or floating, moving and resizing the Palette.
Tab | Description
Help Tab

The Help tab displays the EasyBuilder Help file and updates to reflect the current application step and provides detailed instructions on how to complete the step. Controls and parameters are described and guidelines are provided, where necessary. Links to other Help topics may also be included for more in-depth explanations.

Note: The EasyBuilder Help file can also viewed in the Online Help format. To launch the EasyBuilder Online Help file, press the F1 keyboard, click the Help [image] button on the Help tab, or select EasyBuilder Help from the Help menu.
Results Tab

The Results tab displays the performance of each tool, allowing you to troubleshoot or optimize job settings. In this tab, you can:

  • Determine at a glance which tools are [image] passing or [image] failing by monitoring the results, which are also displayed in either the Settings or Range Limits tab in the Locate Part or Inspect Part settings pane.
  • Click on a tool and view the dependent relationships among the selected tool (highlighted in orange) and other tools in the job to determine if a tool failure is related to the failure of another tool. A dependency exists when a tool references another tool. Each dependency consists of two parts: a precedent and a dependent, which are connected by a line. The precedent refers to the source of the data (that is, the tool providing the input) and is represented by a circle; the dependent is the destination of the data (that is, the tool receiving the output) and is represented by an arrow. Blue dependency graphics indicate that the selected tool is the destination; green indicates that the selected tool is the source.
  • Visually identify the type of tool by its tool icon (for example, Presence/Absence Edge, Identification Read Text, Counting Blobs).
  • Identify the tool by name and by type.

  • Double-click on a tool if you want to modify it; the Applications Step pane reverts to the Inspect Part step, which displays the selected tool's parameters in the settings pane and its overlay graphics in the display area. Edit the parameters or graphics as needed. You can also right-click a tool in the Results tab to access a short editing menu, whose contents depend on the current Application Step:

    • In Locate Part or Inspect Part, the right-click menu allows you to copy, paste or delete the selected tool or edit it in the Spreadsheet View.
    • In the other Application Steps, the menu allows you to revert to the Inspect Part step to edit the selected tool (by clicking Go to this tool and edit) or edit it in the Spreadsheet View.
Links Tab

After Location and/or Inspection Tools have been added to the job, their properties (their input parameters and output results) can be intertwined using the Links tab. The Links tab allows a tool's output result to be used as an input parameter to another tool. The Links tab displays a tree view of all the Location and/or Inspection Tools currently loaded in the job.

Note: The Links tab is not supported on the In-Sight 2000 series vision sensor.
  • The tools' properties (input parameters and output results) are referenced with a Symbolic Tag, which is a symbolic reference to the values contained in them. The value has an associated Data Type (either Action, Floating Point, Integer or String). Tool properties are divided into Input and Output properties, and links can only be established from Output properties to Input properties. Output properties can be linked to multiple, separate Input properties, while an Input property only accepts one Output property linked into it.
  • To select which tool properties are displayed and can be configured in the Links tab, right-click on a tool property and open the Select Properties dialog. The Select Properties dialog contains a tree view list of all the tools in the job, with all of their associated tool properties, both Input and Output. You can customize which tool properties are displayed in the Links tab by selecting which tool properties you want to appear (use the Add/Remove buttons to add or remove multiple selections after highlighting them).
I/O Tab | The I/O tab shows the [image] active or [image] inactive status of each of the job's input and output lines, allowing you to monitor the I/O lines.
TestRun Tab | The TestRun tab is used to construct machine vision validation tests. Vision validation is the process of confirming that a machine vision application is operating within expected parameters. Validation works by performing tests on the vision system and comparing the results of those tests against expected values.

TestRun™


Toolbars: EasyBuilder View

EasyBuilder provides three toolbars that allow single-click access to common tasks. The Standard and Explorer toolbars can be hidden or shown using the View menu.

Note:
  • Customize EasyBuilder by moving and resizing the toolbars.
  • Icons appear grayed-out when their corresponding functions are not available in the current context.
  • Icons can be added and removed from individual toolbars. Click the right edge of the toolbar and select the Add or Remove Buttons menu, then enable or disable your desired icons.
  • You can enable large icons in the Options Dialog.
Standard Toolbar

Load a blank, new job onto the active In-Sight sensor. Ensure that any desired changes have been saved in the previous job before creating a new job.

Display the Open dialog. This allows you to load a local or remote job file as the active job onto an In-Sight sensor.

Save the active job. If the job has not previously been saved, this button opens the Save As dialog. Otherwise, EasyBuilder will write the job contents to the current file name. For more information, see Save & Open Dialogs.

Open the Print dialog to print the Results Table of the current job to a local or networked printer. For more information, see Print Dialog and Results Table.

Open the Print Preview window to display a print preview of the Results Table of the current job. For more information, see Print Preview.

Not available in EasyBuilder.

Copy the selected tool or file(s) to the clipboard. Often used in conjunction with Paste.

Paste the tool or file(s) that were copied.

Delete the selected tool or file(s).

Undo the last action.

Redo the last action.
Job DisplayToolbar
Go to the first image stored in the Playback folder.
Go to the previous image stored in the Playback folder.
Play back all images stored in the Playback folder.
Pause playback of images stored in the Playback folder.
Go to the next image stored in the Playback folder.
Go to the last image stored in the Playback folder.
Record acquired images to the Record folder.
Stop the recording of acquired images to the Record folder.
Open the Record/Playback Options dialog to configure the Record/Playback settings. For more information, see Record/Playback Options Dialog: EasyBuilder View.
Note:
  • If the Record button is clicked during playback, the images being played back are recorded to the Record folder, Good folder or Bad folder, depending on the sorting parameters specified in the Record/Playback Options dialog. The images are recorded with the same name as the images stored in the Playback folder.
  • To allow the playback of images when a sensor is in Online mode, the Trigger parameter in the Set Up Image step must be set to External, Manual or Network.

Acquire one image from an In-Sight sensor (manual trigger).

Enter Repeating Trigger mode, where images are continuously acquired in the display area to help you verify that your application is working as expected against live images.

Enter Live Video mode, where images are continuously acquired from the In-Sight sensor and displayed in the display area.

Increase the level of magnification on the image.

Decrease the level of magnification on the image.

Fit the image to the display area. The image will automatically scale to be maximally displayed in the display area, with the entire image visible. The image's original aspect ratio is maintained; some empty (grey) space may exist around the image.

Rotate the image 90° clockwise.

Enable/disable the highlighting of pixels in the image with a grey level less than or equal to the Low Saturation Level (in blue) and greater than or equal to the High Saturation Level (in red). For more information, see Image Display Panel.

Open the HMI View Selection dialog to specify the Run Mode views that are visible to the user from the HMI application and the order of the views when you click the Switch View button in the HMI application. For more information, see HMI View Selection Dialog.

Resize the image region graphic so that it equals the size of the display area. This button is enabled only when the job contains a tool that has an associated region graphic and the Locate Part or Inspect Part step is selected.
Show/hide selected tool graphics only.

As the image is zoomed in or out, the graphic overlay text is scaled proportionally with the image. (default) This setting is applied to all graphic overlay text and is not saved to the job file.

As the image is zoomed out, the scale of the graphic overlay text is decreased. As the image is zoomed in, if the graphic overlay text is smaller than the default font size (9 point), the scale of the graphic overlay text is increased until it reaches the default font size.

The graphic overlay text is a fixed size, regardless of the image zoom level. This setting is applied to all graphic overlay text and is not saved to the job file.

Show/hide the filmstrip.
Show/hide the Focus Metric.

Toggle the Online/Offline state of the active In-Sight sensor.
Explorer Toolbar

View the In-Sight Network pane. For more information, see In-Sight Network.

View the In-Sight Files pane. For more information, see In-Sight Files.

View the Palette. For more information, see Palette: EasyBuilder View.

Set the user name and password to use when logging on to In-Sight sensors. For more information, see Log On/Off Dialog.

Generate an HTML or XML report containing job and network details for one or more In-Sight sensors. For more information, see Create Report Dialog.

Back up jobs and sensor settings for one or more In-Sight sensors. For more information, see Backup Dialog.

Restore jobs and sensor settings for one or more In-Sight sensors. For more information, see Restore Dialog.

Open the Add Sensor/Device to Network dialog. For more information, see Add Sensor/Device to Network Dialog.

Access In-Sight Explorer Help.

Access Online Support at cognex.com/support/insight.


Filmstrip: EasyBuilder

The filmstrip can be used to play back images recorded to the PC or review images and results stored to the vision system.

  • PC Filmstrip: EasyBuilder View
  • Sensor Filmstrip: EasyBuilder View


Application Steps

The Application Steps pane allows for single-click access to any of the EasyBuilder steps. The application steps are presented in the order typically used to build a job. Once a job is built, the steps can be revisited in any order, so that job parameters can be corrected or fine-tuned until the desired result is achieved.

An application step can be greyed-out, depending on your access level, the task that is currently being performed, whether you are connected to a sensor or an emulator or if an In-Sight sensor is Online.

Note: Customize EasyBuilder by moving or resizing the Application Steps pane.

Using the Application Steps

Click on any step to access its settings pane for configuring job parameters. For more information, see Settings Pane. Following are brief descriptions of each step:

  • Get Connected: Connect to an In-Sight sensor or emulator, and open an existing EasyBuilder job or start a new job.
  • Set Up Image: Acquire or load an image, adjust acquisition settings and calibrate the image to real-world units.
  • Locate Part: Add a Location Tool to the job and configure it to create a fixture, which is a vision inspection tool that defines an origin reference point for the other vision inspection tools.
  • Inspect Part: Add an Inspect Part Tool to the job and configure it to examine a part and qualify or quantify it, based on your image analysis criteria.
  • Inputs/Outputs: Define the settings of the discrete input and output lines of supported Cognex I/O Modules by customizing the name of the input Line, setting the signal type, selecting the edge transition of the signal and forcing inputs and outputs to test your application.
  • Communication: Define inspection results for open data access and exchange (OPC), to configure an EasyView for VisionView and to define the network and serial communication settings of In-Sight vision systems, enabling them to communicate data to and from other devices, such as a robot or PLC.
  • Filmstrip: Configure the filmstrip settings for reviewing stored images from the sensor or the PC.

  • Save Job: Perform various file-management and sensor-maintenance tasks, while the sensor is Offline.

    Note: If the Allow Online Job Save checkbox on the User dialog is selected, only users with Full or Protected access are allowed to save jobs while Online. For more information, see User Access Settings Dialog.
  • Run Job: Run the job, review the results and modify or troubleshoot settings, if necessary.
Note: EasyBuilder does not provide an "auto-save" feature; pressing CTRL+S to regularly save your job during development is recommended.


Spreadsheet Graphical User Interface

The Spreadsheet graphical user interface (GUI) consists of six major components:

  • Menu Bar
  • Toolbars: Spreadsheet View
  • In-Sight Network
  • In-Sight Files
  • Spreadsheet View
  • Sensor Status View
  • Palette: Spreadsheet View
Note:
  • The Insert, Format, Image and Sensor menus are available only when a Spreadsheet View is the active window.
  • The Record/Playback, Job Display, Formatting, Job Audit and Job Edit toolbars are available only when a Spreadsheet View is the active window.


Image Menu: EasyBuilder View

The Image menu allows you to perform operations that relate to the image shown in the display area.

Note: The following options of the Image menu are available only when an EasyBuilder View is the active window.
  • Trigger: Acquires one new image from the active In-Sight sensor.

  • Repeating Trigger: Images are continuously acquired to help you verify that your application is working as expected against live images.

    Note:
    • Repeating Trigger is not available on vision systems running In-Sight 4.x.x firmware.
    • This functionality is available in all Application Steps.
    • To exit this mode, click the Repeating Trigger button in the Job Display toolbar, or select Repeating Trigger from the Image menu again.

  • Live Video: Displays a live video image to use when making adjustments to the sensor's lens and the field of view. It also launches the Focus Metric, which is used to help determine an image focus score, indicating the degree to which the image, or a Region of the image, includes the smallest resolvable features in a "scene" (i.e., the object and its background, as captured in the image). To exit this mode, click the Live Video button in the context pane in the Set Up Image step, click the Live Video button in the Job Display toolbar, or click on the image.

    Note:
    • This functionality is available in all Application Steps.
    • To provide relevant data, the Focus Metric score should be compared against another Focus Metric score from the same, exact scene (the scenes being identical).
    • The Focus Metric can be turned off by pressing the Focus Metric icon in the Job Display toolbar when the image is in Live Video mode, or selecting the Focus Metric option in the View menu.

  • Record: Records acquired images to the user-specified Record Folder. Recording works in Online and Offline modes. For more information, see Record/Playback Options Dialog: EasyBuilder View.

    Note:
    • Images cannot be recorded in Live Video mode.
    • If Record is selected during playback, the images being played back are recorded to the Record folder, Good folder or Bad folder, depending on the sorting parameters specified in the Record/Playback Options dialog. The images are recorded with the same name as the images stored in the Playback folder.
  • Playback: Selects an image for playback. For more information, see Record/Playback Options Dialog: EasyBuilder View.
    • First Image: Go to the first image stored in the Playback Folder.
    • Previous Image: Go to the previous image stored in the Playback Folder.

    • Play: Play all images stored in the Playback Folder.

      Note: To allow the playback of images when a sensor is in Online mode, the Trigger parameter in the Set Up Image step must be set to External,Manual or Network.
    • Next Image: Go to the next image stored in the Playback Folder.
    • Last Image: Go to the last image stored in the Playback Folder.
  • Record/Playback Options: Accesses the Record/Playback Options dialog, which allows you to designate a folder to store recorded images, designate a folder of recorded images to play back, specify the maximum number of images stored, view the current number of images stored, sort images to different folders based on the quality of the image, set the image resolution of recorded images, select the filename format of recorded images and set the Playback mode and delay for playback of recorded images. For more information, see Record/Playback Options Dialog: EasyBuilder View.
  • Zoom: Changes the magnification level of the background image.
    • Zoom In: Increase zoom magnification by one level on the image.
    • Zoom Out: Decrease zoom magnification by one level on the image.
    • Zoom 1:1: Maps one image pixel per one PC display pixel.
    • Zoom to Max: Increases zoom to the maximum magnification.
    • Zoom to Fill: Fills the window with the image. No visible border will appear.

    • Zoom to Fit: Fits the entire image inside the window.

      Note:
      • Zoom 1:1, Zoom to Max, Zoom to Fit and Zoom to Fill are mutually exclusive.
      • The zoom ratio for Zoom to Fit and Zoom to Fill adjusts automatically when the window is resized.
  • Orientation: Selects the orientation at which the acquired image will be displayed. The highlighted image orientation icon indicates the current selection. This setting is for display purposes only and does not affect how the image is acquired from the sensor, how the vision tools process the image or how images are stored to and loaded from files on the PC. Consequently, the displayed orientation can be changed at any time without affecting the results produced by the job. This setting is stored in the job file, so each job may be configured to display images in a particular orientation.
    • Normal
    • Rotate Clockwise 90°
    • Rotate 180°

    • Rotate Clockwise 270°

    Note: When an image is saved to a file, it is saved in its original acquired orientation.
  • Show Brightness Feedback: Enables/disables the highlighting of pixels in the image with a grey level less than or equal to the Low Saturation Level (in blue) and greater than or equal to the High Saturation Level (in red). For more information, see Options Dialog.

Trigger

Live Video

Record

Playback

Record/Playback Options

Zoom

Orientation

Show Brightness Feedback


Sensor Menu: EasyBuilder View

The Sensor menu allows you to configure settings and perform operations on the active vision system.

Note: The following options of the Sensor menu are available only when an EasyBuilder View is the active window.
  • Online: Toggles the Online/Offline state of the active vision system.
  • Network Settings: Opens the Network Settings dialog to configure the vision system to communicate on a TCP/IP network. For more information, see Network Settings Dialog.
  • Date/Time Settings: Opens the Date/Time Settings dialog, allowing you to adjust the current date or time, establish a time zone and configure SNTP servers for automatic time synchronization. For more information, see Date/Time Settings Dialog.
  • Host Table: Opens the Host Table dialog to specify a local mapping of network host names to IP addresses. This provides access to vision systems on a different subnet, as well as third-party FTP servers. For more information, see Host Table Dialog.
  • FTP Settings: Opens the FTP Settings dialog to configure the File Transfer Protocol (FTP) settings for communication with other devices. For more information, see FTP Settings Dialog.
  • Job Server Settings: Opens the Job Server Settings dialog to configure the vision system to access to an FTP server from which to load and save job files. For more information, see Job Server Settings Dialog.
    Note: The Job Server dialog is not supported on the In-Sight 2000 series vision sensor.
  • Light Settings: Opens the Light Settings dialog to configure lighting devices connected to the In-Sight 7000 series vision system. For more information, see Light Settings.
  • Startup: Configures the boot-time startup parameters, including Online/Offline status and which job to load on startup. For more information, see Startup Dialog.
  • User Access Settings: View or modify the access level permissions for users. For more information, see User Access Settings Dialog.
  • HMI Settings: Opens the HMI Settings dialog to configure the number of the human machine interface (HMI) applications allowed to be connected, the HMI server and the HMI display options. For more information, see HMI Settings Dialog.
  • Image Settings: Opens the Image Settings dialog to configure the resolution and frame rate of Live and Online images and the default resolution of the vision system. For more information, see Image Settings Dialog.

  • Image Buffers: Opens the Image Buffers dialog to configure the number of image buffers allocated to the vision system at startup. For more information, see Image Buffers Dialog.

  • TestRun: Opens the TestRun Setup dialog to configure TestRun tests, and also allows a TestRun test to be initiated, repairing a broken value or test, importing and exporting tests and launching a new test. For more information, see TestRun™.
    • New: Clears the previously created TestRun test.
    • Configure: Launches the TestRun Setup dialog to configure and edit TestRun tests.
    • Run: Initiates a TestRun test execution.
    • Batch Run: Launches the Batch Run dialog, which is used to configure TestRun to execute on a batch of .job files. For more information, see Batch Run.
    • Repair: Initiates the repair of a TestRun value or test.
    • Import: Launches the Open dialog to import a previously created TestRun test. For more information, see Save & Open Dialogs.
    • Export: Launches the Save As dialog to save and export a TestRun test. For more information, see Save & Open Dialogs.
  • Job Size Limit: Opens the Job Size Limit dialog to configure the memory allocation of the selected vision system. For more information, see Job Size Limit.
  • Licensing: Opens the Licensing dialog allowing you to manage cell protection licenses. For more information, see Licensing.
  • Restart: Opens the Restart Sensor confirmation dialog, which verifies that you intend to power cycle the vision system.

Online

Network Settings

Date/Time Settings

Host Table

FTP Settings

Light Settings

User Access Settings

HMI Settings Dialog

Image Settings

Image Buffers

TestRun

Job Size Limit

Licensing

Reset


Job Size Limit

The Job Size Limit dialog is used to configure the job size memory allocation for a vision system, for use in the EasyBuilder development environment.

Note: Job size depends on whether the job was created in EasyBuilder or the Spreadsheet. For jobs created in EasyBuilder, space is calculated as the number of rows left available in each of the three columns. For jobs developed in the Spreadsheet, space is calculated on the basis of the number of unused cells still available in the allocated job space, and the Active Cells Limit Dialog is used to configure the number of cells.

  1. On the Sensor menu, click Job Size Limit. Alternately, the dialog may be accessed by pressing the Adjust Job Size button if the job memory error prompt ("There is not enough room in the job for the tool.") is encountered while adding tools to a job.

    Note:

    The Job Size Limit menu option is disabled for any of the following:

    • The vision system is online or is playing back images.
    • The vision system is in Live Video.
    • The user is in either the Locate Part or Inspect Part Application Steps.
    • The user does not have sufficient administrative privileges.
    • The vision system does not support adjusting its job size.

  2. Adjust the slider to set the job's memory size allocation. The Min and Max percentages depend on the type of vision system.

    Note: Do not power cycle the vision system while the Job Size Limit is being updated.
  3. Click OK.
  4. Adjusting the Job Size Limit requires the vision system be rebooted for the changes to take effect, and erases all job and settings files from non-volatile flash memory. Save or backup your job before continuing.
  5. Reboot the vision system.


System Menu: EasyBuilder View

The System menu contains file operations that can be performed on multiple In-Sight sensors, as well as functions and options related to In-Sight Explorer. New or existing sensors can be configured to operate on a network or to communicate directly to a PC using the Add Sensor/Device to Network dialog. For more information, see Add Sensor/Device to Network Dialog.

  • Log On/Off: Displays the Log On/Off dialog. Allows you to supply user name and password credentials to In-Sight Explorer, as well as log off from all sensors. For more information, see Log On/Off Dialog.
  • Create Report: Creates an XML file that describes jobs and sensor settings for one or more In-Sight sensors.
  • Backup: Displays the Backup dialog, which allows you to store an archival copy of all jobs, images and sensor settings into a folder on your local PC. The destination folder for these archived backups is defined in the Options dialog. For more information, see Backup Dialog.
  • Restore: Displays the Restore dialog, which permits the restoration of jobs, images and sensor settings to one or more sensors from their most recently archived backup. For more information, see Restore Dialog.
  • Restore From: Displays the Restore From dialog where you are allowed to choose any archived backup (including different sensors) to restore to one In-Sight sensor. For more information, see Restore From Dialog.
  • Clone To: Duplicates jobs, images and sensor settings from a source In-Sight sensor to one or more destination In-Sight sensors. For more information, see Clone Dialog.
  • Update Firmware: Writes firmware files to one or more In-Sight sensors using the Update Firmware dialog. For more information, see Update Firmware Dialog.
  • Add Sensor/Device to Network: Displays the Add Sensor/Device to Network dialog, which allows you to configure new and existing In-Sight sensors for communication on a TCP/IP subnet, or for a direct connection to a PC. For more information, see Add Sensor/Device to Network Dialog.
  • Explorer Host Table: Displays the Explorer Host Table Setup dialog, which allows In-Sight Explorer to communicate with sensors on different subnets. Explorer Host Table entries appear in the In-Sight Network pane just like sensors that are automatically detected. For more information, see Explorer Host Table Setup Dialog.
  • Remote Subnets: Displays the Explorer Remote Subnet List dialog, which allows In-Sight Explorer to add and manage remote subnets. For more information, see Explorer Remote Subnet List.

  • Save View Layout: Takes a "snapshot" of any EasyBuilder Views and Sensor Status Views that you currently have open and remembers how it is arranged on the screen; when EasyBuilder is launched, it will log on to the corresponding sensors/emulators and arrange their views as when you saved the layout.

    Tip: The layout can be saved by pressing SHIFT+F7.
    Note: Toolbars and Panes may not show up properly if undocked when the layout is saved. It is recommend to have all Toolbars and Panes docked before saving the layout.
  • Options: Displays the Options dialog where you can configure startup, GUI and emulator preferences for In-Sight Explorer. For more information, see Options Dialog.

Log On/Off

Create Report

Backup

Restore

Restore From

Clone To

Update Firmware

Add Sensor/Device to Network

Explorer Host Table

Remote Subnets...

Save View Layout

Options Dialog


Firmware Version 4.x.x and Earlier

The following table lists the In-Sight model number, the amount of non-volatile flash memory (if applicable), the part number/product type and the supported firmware versions.

Note:
  • Models that have a Last Supported Firmware version of "4.9.x" cannot be upgraded to firmware version 5.1.0 or higher.
  • Part Numbers/Product Types appended by an "R" suffix indicate RoHS compliance.
In-Sight Model | Part Number/Type | First Supported Firmware | Last Supported Firmware
1000 1010 1000C (4MB non-volatile flash memory) | 800-5740-1 800-5749-1 800-5760-1 | 2.00.00 2.00.00 2.20.00 | 2.71.00 PR1
3000 (4MB non-volatile flash memory) | 800-5747-1 | 2.00.00 | 2.52.03
4000 4100 4001 (8MB non-volatile flash memory) | 800-5762-1 800-5763-1 800-5770-1 | 2.30.00 | 2.71.00 PR1
3400 (16MB non-volatile flash memory) | 800-5809-1 | 2.51.00 | 4.2.0
5100 5110 (16MB non-volatile flash memory) | 800-5834-1/2/3 800-5854-1 | 2.53.00 | 4.2.0
5400 5410 (16MB non-volatile flash memory) | 800-5828-1/2/3 | 2.53.00 | 4.2.0
5101 5111 (16MB non-volatile flash memory) | 800-5838-1/2/3 | 2.65.00 | 4.2.0
5100C (16MB non-volatile flash memory) | 800-5837-1/2/3 | 2.65.00 | 4.2.0
5000 (16MB non-volatile flash memory) | 800-5840-1/2/3 | 2.70.00 | 4.2.0
5400C 5400CS (16 MB non-volatile flash memory) | 800-5837-1/2/3 | 2.80.00 | 4.2.0
5401 5411 (16MB non-volatile flash memory) | 800-5838-1/2/3 | 2.80.00 | 4.2.0
5403 5403S (16MB non-volatile flash memory) | 800-5830-1/2/3 | 2.80.00 | 4.2.0
5000 (32MB non-volatile flash memory) | 800-5840-4/5/6 | 2.80.01 PR1 | 4.2.0
5400R (32MB non-volatile flash memory) | 800-5829-1/1R | 2.80.01 PR1 | 4.5.0
5100 5110 (32MB non-volatile flash memory) | 800-5870-1/1R/2/2R/3/3R | 2.80.01 PR1 | 4.7.3
5400 5410 5400S 5410S (32MB non-volatile flash memory) | 800-5855-1/1R/2/2R/3/3R | 2.80.01 PR1 | 4.7.3
5400C 5400CS (32MB non-volatile flash memory) | 800-5837-4/4R/5/5R/6/6R | 2.80.01 PR1 | 4.7.3
5401 5411 (32MB non-volatile flash memory) | 800-5838-4/4R/5/5R/6/6R | 2.80.01 PR1 | 4.7.3
5403 5413 5403S (32MB non-volatile flash memory) | 800-5830-4/4R/5/5R/6/6R | 2.80.01 PR1 | 4.7.3
5100C (32MB non-volatile flash memory) | 800-5837-4/4R/5/5R/6/6R | 3.4.0 | 4.7.3
5600 5610 (64MB non-volatile flash memory. 33.5MB maximum file size available.) | 800-5871-1/1R/2/2R/3/3R | 3.4.0 | 4.10.x
5603 5613 (64MB non-volatile flash memory. 33.5MB maximum file size available.) | 800-5873-1/1R | 3.4.0 | 4.10.x
In-Sight Micro 1020 1050 1100 1110 1400 1410 (64MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0002-1R Type 821-0002-5R | 4.1.0 | 4.10.x
In-Sight Micro 1403 1413 (64MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0003-1R Type 821-0003-5R | 4.1.0 | 4.10.x
CIO-MICRO I/O Module | Type 821-0016-1R Type 821-0016-2R | 4.2.0 | 4.9.3
CIO-MICRO-CC I/O Module | Type 821-0017-1R Type 821-0017-2R | 4.3.0 | 4.9.3
In-Sight Micro 1100C 1400C (64MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0002-2R Type 821-0002-6R | 4.3.0 | 4.10.x
In-Sight Micro 1403C (64MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0003-2R Type 821-0003-6R | 4.3.0 | 4.10.x
5604 (64MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 800-5874-1R Type 800-5874-2R | 4.3.1 | 4.10.x
5605 5615 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0032-1R Type 821-0032-2R | 4.4.1 | 4.10.x
5100 5110 5400 5410 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0034-1R | 4.4.3 | 4.10.x
5100C 5400C (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0036-1R | 4.4.3 | 4.10.x
5400S 5410S (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0038-1R | 4.4.3 | 4.10.x
5400CS (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0039-1R | 4.4.3 | 4.10.x
5401 5411 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0035-1R | 4.4.3 | 4.10.x
5403 5413 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0037-1R | 4.4.3 | 4.10.x
5403S (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0040-1R | 4.4.3 | 4.10.x
5600 5610 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0041-1R | 4.4.3 | 4.10.x
5603 5613 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0042-1R | 4.4.3 | 4.10.x
5604 5614 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0051-1R | 4.4.3 | 4.10.x
In-Sight Micro 1020 1050 1100 1110 1400 1410 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0043-1R | 4.4.3 | 4.10.x
In-Sight Micro 1100C 1400C (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0044-1R | 4.4.3 | 4.10.x
In-Sight Micro 1403 1413 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0047-1R | 4.4.3 | 4.10.x
In-Sight Micro 1403C (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0048-1R | 4.4.3 | 4.10.x
In-Sight Micro 1402 1412 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Type 821-0078-1R | 4.6.0 | 4.10.x
C-Mount Lens Configuration: 7010 7020 7050 7200 7210 7230 7400 7410 7430 7402 7412 7432 (512MB non-volatile flash memory. 134.2MB maximum file size available.) | Type 821-0084-1R Type 821-0084-3R Type 821-0084-5R Type 821-0084-9R | 4.9.0 | 4.10.x
M12 Lens Configuration: 7010 7020 7050 7200 7210 7230 7400 7410 7430 7402 7412 7432 (512MB non-volatile flash memory. 134.2MB maximum file size available.) | Type 821-0084-2R Type 821-0084-4R Type 821-0084-6R | 4.9.0 | 4.10.x
C-Mount Lens Configuration: 7010C 7200C 7400C 7402C (512MB non-volatile flash memory. 134.2MB maximum file size available.) | Type 821-0100-1R Type 821-0100-3R | 4.9.0 | 4.10.x
M12 Lens Configuration: 7010C 7200C 7400C 7402C (512MB non-volatile flash memory. 134.2MB maximum file size available.) | Type 821-0100-2R Type 821-0100-4R | 4.9.0 | 4.10.x
In-Sight Micro 1500 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Regulatory Model 1AAN | 4.9.1 | 4.10.x


Firmware Version 5.x.x and Later

The following table lists the In-Sight model number, the amount of non-volatile flash memory (if applicable), the regulatory model and the supported firmware versions.

In-Sight Model | Regulatory Model | Supported Firmware Versions
In-Sight 2000-110 2000-120 2000-130 (32MB non-volatile flash memory. 15.9MB maximum file size available.) Note: If you purchased an In-Sight 2000-110/120/130 vision sensor shipped with firmware version 5.7.3 or later, the firmware cannot be downgraded to 5.5.0 or earlier. | Regulatory Model R00039 | 5.2.1 5.2.3 5.3.0 5.4.0 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 2000-120C 2000-130C (32MB non-volatile flash memory. 15.9MB maximum file size available.) Note: If you purchased an In-Sight 2000-120C/130C vision sensor shipped with firmware version 5.7.3 or later, the firmware cannot be downgraded to 5.5.0 or earlier. | Regulatory Model R00039 | 5.3.0 5.4.0 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 2000-110 Mini 2000-120 Mini 2000-130 Mini 2000-120C Mini 2000-130C Mini (32MB non-volatile flash memory. 15.9MB maximum file size available.) Note: If you purchased an In-Sight 2000-110 Mini/120 Mini/130 Mini/120C Mini/130C Mini vision sensor shipped with firmware version 5.7.3 or later, the firmware cannot be downgraded to 5.5.0 or earlier. | Regulatory Model 1ABD | 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 2000-23M (32MB non-volatile flash memory. 15.9MB maximum file size available.) Note: If you purchased an In-Sight 2000-23M vision sensor shipped with firmware version 5.7.3 or later, the firmware cannot be downgraded to 5.5.0 or earlier. | Regulatory Model R00039 | 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 2000-23M Mini (32MB non-volatile flash memory. 15.9MB maximum file size available.) Note: If you purchased an In-Sight 2000-23M Mini vision sensor shipped with firmware version 5.7.3 or later, the firmware cannot be downgraded to 5.5.0 or earlier. | Regulatory Model 1ABD | 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 2000-230/230C 2001-230/230C (32MB non-volatile flash memory. 15.9MB maximum file size available.) | Regulatory Model R00039 | 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 2000-230 Mini/230C Mini 2001-230 Mini/230C Mini (32MB non-volatile flash memory. 15.9MB maximum file size available.) | Regulatory Model 1ABD | 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight Mini PoE Models 2000-110 Mini 2000-120 Mini/120C Mini 2000-130 Mini/130C Mini 2000-23M Mini 2000-230 Mini/230C Mini 2001-230 Mini/230C Mini (32MB non-volatile flash memory. 15.9MB maximum file size available.) | Regulatory Model 1ABF | 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 5705 & 5715 (128MB non-volatile flash memory. 33.5MB maximum file size available.) | Regulatory Model 1AAF | 5.1.0 5.2.0 5.3.0 5.4.0 5.5.0 5.6.0 5.6.1 5.7.1 5.7.2 5.7.3
In-Sight 7500 7600 7800 7801 7802 (7.2GB non-volatile flash memory. 1.0GB maximum file size available.) Note: If an In-Sight 7000 Gen2 series vision system that shipped with 5.5.0 or later firmware is then downgraded to 5.4.1 firmware or earlier, it may take approximately four minutes for the vision system to reboot when power-cycled. | Regulatory Model 1AAB | 5.4.0 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 7501 7600C 7800C 7801C 7802C 7900 7902 (7.2GB non-volatile flash memory. 1.0GB maximum file size available.) Note: If an In-Sight 7000 Gen2 series series vision system that shipped with 5.5.0 or later firmware is then downgraded to 5.4.1 firmware or earlier, it may take approximately four minutes for the vision system to reboot when power-cycled. | Regulatory Model 1AAB | 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 7900C 7901 7901C 7902C (7.2GB non-volatile flash memory. 1.0GB maximum file size available.) | Regulatory Model 1AAB | 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 7905 7905C (7.2GB non-volatile flash memory. 1.0GB maximum file size available.) | Regulatory Model R00063 | 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 8200 8400 8401 8402 (512MB non-volatile flash memory. 234MB maximum file size available.) | Regulatory Model 1AAW | 5.2.0 5.3.0 5.4.0 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 8200C 8400C 8401C 8402C (512MB non-volatile flash memory. 234MB maximum file size available.) | Regulatory Model 1AAW | 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 8405 (512MB non-volatile flash memory. 234MB maximum file size available.) | Regulatory Model 1AAU | 5.1.1 5.2.0 5.3.0 5.4.0 5.5.0 5.6.0 5.6.1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 9902L (7.2GB non-volatile flash memory. 1.0GB maximum file size available.) | Regulatory Model 1AA9 | 5.6.1 PR1 5.7.0 5.7.1 5.7.2 5.7.3
In-Sight 9912 9912C (7.2GB non-volatile flash memory. 1.0GB maximum file size available.) | Regulatory Model R00064 | 5.7.0 5.7.1 5.7.2 5.7.3


Help Menu: EasyBuilder View

The Help menu provides access to help and support services for In-Sight Explorer, as well as version build information and In-Sight sensor hardware details.

  • In-Sight Explorer Help: Opens this Help file.

  • EasyBuilder Help: Opens the EasyBuilder Help file.

    Note:
    • The EasyBuilder Palette Help is displayed in the Help tab of the Palette, and the EasyBuilder Online Help is in a Help System in CHM format with searching capabilities.
    • The EasyBuilder Help file includes links to the In-Sight Explorer Online Help file. When these links are clicked in the EasyBuilder Palette Help file, the In-Sight Explorer Online Help file is launched and the appropriate topic is opened. However, when these links are clicked in the EasyBuilder Online Help file, instead of launching the In-Sight Explorer Online Help file, the appropriate topic from the In-Sight Explorer Online Help file is opened within the EasyBuilder Online Help file. To go back to the EasyBuilder Help topics from the , click the Back button.
    • When you search the EasyBuilder Online Help file using the Search tab, the results from the In-Sight Explorer Help file are also returned.
  • In-Sight Release Notes: Displays the Release Notes for In-Sight Explorer and In-Sight firmware.
  • Online Support: Launches the Cognex In-Sight sensor support home page (requires Internet access): cognex.com/support/insight.
  • About In-Sight Explorer: Displays version and build information for In-Sight Explorer, as well as hardware and network details about each In-Sight sensor detected on your network (including Explorer Host Table entries.) For more information, see About In-Sight Explorer Dialog.

In-Sight Explorer Help

EasyBuilder Help

In-Sight Release Notes

Online Support

About In-Sight Explorer


Settings Pane

The settings pane automatically updates to display the parameters for the selected application step. Most of the steps require that the parameters be configured in a specific order.

Note: A control in the settings pane can be grayed-out, depending on your access level, the task that is currently being performed, whether you are connected to a vision system or an emulator or if an In-Sight sensor is Online. For more information, see User Access Settings Dialog.

The settings pane is designed to guide you through the step by presenting general parameters on the left side, and increasingly more specific parameters as you proceed to the right.

When possible, the pane displays only the controls available at that time. For example, in the Communication step, the Manufacturer and Protocol drop-down lists are hidden until a selection is made from the Device drop-down list. Likewise, the parameters of a Location or Inspect Part Tool are hidden until the tool is added to the job.

In addition, depending on the tool added, the pane for the Locate Part and Inspect Part steps might also display visual aids, such as a feedback table or graph (to help configure the parameters for the application) and a Range Limits tab (for setting pass/fail criteria).

Once a job is built, the steps can be revisited in any order, so that job parameters can be corrected and fine-tuned until the desired result is achieved.


TestRun™ - EasyBuilder View

After connecting to the desired In-Sight vision system and loading the appropriate .job file to the vision system, TestRun configuration may begin. TestRun is configured using the TestRun Setup dialog, which offers a step-by-step series of screens to program TestRun. A navigational pane is provided on the left side of the dialog, from which any of the setup screens can be selected.

Note: After the initial configuration of TestRun, any of the steps can be revisited by simply selecting the step in the step in the navigational pane.
  • Image Database Folder
  • Variant Configuration
  • Job/Variant - Setup Actions
  • Job/Variant - Limit Tests
  • Job/Variant - Image Selection
  • Job/Variant - Defect Tests
  • Hardware Tests - Setup Actions
  • Hardware Tests - Tests
  • Cleanup Actions

Once the TestRun Setup dialog has been configured, return to the Palette and use the buttons to:

  • New: Create a new TestRun test.
  • Configure: Launches the TestRun Setup dialog.

  • Run: Execute an existing TestRun test.

    Note: For In-Sight vision systems running In-Sight firmware 4.10.x, or In-Sight firmware 5.6.0 and greater, TestRun can also be initiated by an external device, such as a PLC via EtherNet/IP Communications or PROFINET Communications. For more information, see EtherNet/IP Communications and PROFINET Communications.
  • Repair: Repair a broken test or value.
  • Import: Import a previously created test.
  • Export: Export a test.
  • Batch Run: Launches the Batch Run dialog, which is used to configure TestRun to execute on a batch of .job files. For more information, see Batch Run.

Display TestRun

  1. In the Palette, click on the TestRun™ tab.

    Note: If the Palette is not visible, from the View menu, select Palette.
  2. Press the [image] Configure... button to launch the TestRun Setup dialog.
  3. Once all of the TestRun Setup dialog steps have been configured, press the [image] Run button in the TestRun tab of the Palette to execute the tests.
Note: After the TestRun Setup dialog has been configured, a right-click menu is available that provides all of the buttons available in the Palette, as well as an ability to execute tests from a specific section of the tests (e.g. beginning with Hardware Tests, for instance, without running the Job Tests).

Image Database Folder

When using TestRun in the EasyBuilder View, the first step of the TestRun Setup dialog is the Image Database Folder screen. The Image Database Folder step will establish a link to the stored images that will be used to construct the tests.

During this step, the path to the test image database is established. The directory path must use one of the following formats:

  • C:\TestRun\BracketJob
  • file:///\\TestRun\BracketJob
  • ftp://TestRunServer/BracketJob
  • ftp://10.28.127.73/BracketJob
Note: For vision systems configured for signal-driven TestRun, the Image Database Folder must be configured to use an FTP server, and must have a password of at least 5 characters.

All of the images must be stored in one common root folder; if images are stored in multiple folders, select the folder that contains all of the images and sub-folders with images. While TestRun is able to accommodate different file structures, it is recommended to use the following type of structure:

Using this type of structure, the "Bracket Inspection" folder would be selected.

Finally, set the Unknown Images drop-down menu (Ignore, Assume Pass or Assume Fail; default = Ignore). The Unknown Images drop-down is used to determine how TestRun should process images that have not been explicitly added to TestRun during the Image Selection step.

  • Set the drop-down to Ignore to allow TestRun to simply ignore any images which were not configured.
  • Set the drop-down to Assume Pass to have TestRun assume that the images will cause the job to pass.
  • Set the drop-down to Assume Fail to have TestRun assume that the images will cause the job to fail.

Select the Folder for the TestRun Image Database

  1. Press the Browse button.

  2. Use the Browse for Folder dialog to navigate and select the desired image folder. Press the OK button after selecting the folder.

    Note:
    • If an image folder has already been accessed, it can be selected using the drop-down menu.

    • For vision systems configured for signal-driven TestRun, the Image Database Folder must be configured to use an FTP server, and must have a password of at least 5 characters.

  3. If necessary, enter the User Name and Password required to access the image directory.

    Note: When configuring TestRun's Image Database Folder, if the job developer has accessed (using their own specific User Credentials), the folder to be used by TestRun with another application (e.g. Windows Explorer is being used to view the images in the network folder), and different User Credentials are supplied (e.g. a generic User Name and Password that is to be used by operators on the line), TestRun will be unable to access the folder. To recover from this scenario, close the other application accessing the folder, and close and re-open the TestRun Setup dialog, as well.
  4. If necessary, enter the Domain information.
  5. Press the Next button to continue the setup of TestRun. After leaving this step, TestRun will automatically search the image directory for .jpg and .bmp image files.
Note:
  • If this step has been configured before, TestRun will retain the information about the files stored in the directory. If the location of the images has changed, TestRun will attempt to match images based on their paths, relative to the image location, transferring properties of the images for each match.

  • Once the folder has been established, below the drop-down menu, TestRun displays:

    • A count of the total number of images in the folder.
    • The number of images that have previously been configured in the Job-Image Selection screen.
    • The number of images that are no longer in the folder that were there when previously configured.
    • The number of newly added images to the folder since last being configured.

Variant Configuration

A job may contain one or more inspections. Each of the separate inspections in the job is considered a job variant. For example, to avoid repeatedly changing jobs over time, jobs are created to handle multiple products. Each of those separate inspections may be considered a job variant.

Typically, different variants are selected by an external input (e.g. a command from a PLC). Each variant may have its own set of Vision Tools, different search regions, different exposure settings, etc. TestRun is designed to test all of the variants in a job.

Note: Each job variant is configured individually.

Add a Job Variant

  1. By default, a variant named "Job" has automatically been added.

    Note: The name can be changed by selecting the desired variant, pressing the Rename button and then typing a new name. After the name has been changed, it will automatically be updated in the configuration steps pane.
  2. Press the Add button to create a new variant.
  3. Press the Next button to continue the setup of TestRun.

Reorder Job Variants

Note: Changing the order of the variants will alter the order of execution of the TestRun tests.
  1. Select a variant.
  2. Press either the Move Up or Move Down button, depending on the desired direction.
  3. Press the Next button to continue the setup of TestRun.

Job/Variant - Setup Actions

Before beginning its tests, TestRun may need to set some of the job's parameters to mimic the behavior that an operator may perform when setting up a particular variant to run. Generally, if a job has multiple variants, some amount of configuration will be necessary to prepare the job for the selected variant. Before TestRun can process images for a particular variant, it must first set the state of the job accordingly. The Setup Actions step is used to configure the parameter settings needed for the selected variant's images.

The Setup Actions screen consists of two columns:

  • The Symbols column that contains a list of all of the symbolically tagged job settings.
  • The Setup Actions column that displays all the job's parameter settings that TestRun will set.

Configure the Job Settings to Test the Current Variant

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Setup Actions column with the setting.
  3. Once the setting has been enabled, select it in the Setup Actions column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed.
  5. If there are multiple settings, use the Move Up/Move Down buttons to configure the settings in their desired order of execution. TestRun will perform the setup actions in the order in which they appear in this screen.
  6. Press the Next button to continue the setup of TestRun.

Job/Variant - Limit Tests

Machine vision applications may include many parameters, which are adjustable by machine operators and maintenance technicians, over the course of time. TestRun Limits Tests allow the vision application developer to select adjustable parameters to test, establish the upper and lower limits for those parameters, and quickly determine whether those parameters are still within their established limits. Utilizing TestRun versus hard-coding limits, for instance, allows the developer to provide flexibility to the operators and technicians to make adjustments to keep the system functioning, while still being able to see when parameters are out of range.

The Limits Tests screen is used to setup tests of editable parameters' limits, and consists of two columns:

  • The Symbols column that contains a list of all of the symbolically tagged job settings.
  • The Limit Tests column that displays all of the job's parameter settings that TestRun will test.

Select and Configure the Variables for Testing Limits

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Limit Tests column with the setting.
  3. Once the setting has been enabled, select it in the Limit Tests column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed. The type of test available depends on the type of editable parameter:
    • EditInt: Is In Range
    • EditFloat: Is In Range
    • EditString: Is Equal
    • ListBox: Is Equal
    • CheckBox: Is Equal
  5. Press the Next button to continue the setup of TestRun.

Job/Variant - Image Selection

During this screen of the setup, images that will be used during the tests for the particular variant are selected and defined as either "good" or "bad", i.e. a "good" image should result in a Pass condition, whereas a "bad" image will result in a Fail condition.

Note: Images may be shared among variants.

Select the Images for the Variant, and Define the Images as Good or Bad

  1. Using the tree control, expand the directory of images.
  2. If the directory contains a mixture of "good" and "bad" images, select each individual image by enabling it and then defining it as "Good" or "Bad" using the selectors below the directory. If desired, add a comment about the image, as well.
  3. If the directory has been separated into directories containing "Good" and "Bad" images, by enabling the top level, all of the images within that group will be enabled and share the same classification (Good or Bad) as the top level.
  4. Press the Next button to continue the setup of TestRun.

Job/Variant - Defect Tests

In the Defect Tests screen, images and their expected defects are associated together, creating a database of expected results for each image in the database. From this screen, Defect Tests are configured by selecting which defects (if any) are present for each image, and associating the defect with the expected result of a job's parameter(s).

In the initial, default configuration, the Job Fail defect will exist for each image; it will automatically be enabled for all of the images designated as "bad" images. When a defect is checked (enabled), it indicates that the defect is present for that image. Defect tests are helpful in determining why a vision application may be incorrectly passing or failing an image. Many vision applications perform several inspections on an image, and cumulatively they produce an overall Pass/Fail result. TestRun allows the vision designer to not only determine if an individual image passes or fails, but it also ensures that the specific defects that are supposed to be detected, are in fact, detected.

For example, if a part is determined to be "bad" because it is missing a hole, TestRun will help verify that the part results in a Fail because the job determined the part was missing the hole. If the part with the missing hole results in a Fail because the tool that was used as a fixture had a search region that was large enough to identify and capture the missing hole, and it was not the tool programmed to identify the missing hole, the job's logic was not performing correctly, and TestRun can be used to identify that discrepancy.

Note: Upon entering the Defect Tests screen, the Setup Actions for the currently selected variant will be executed to ensure that the job's state is properly configured.

Define the Defects to be Tested

  1. Select an image.
  2. Set the default Job Fail defect.
  3. Add additional defects as needed, and define their expected results.

Select an Image

  1. To begin, first select an image by using the image playback buttons in the Image group box. Press the Next Image button to advance the image.

    Note: TestRun uses the images defined in the Image Selection step.
  2. TestRun will display the image in the Image group box, and in the EasyBuilder View. The folder containing the image and the name of the image will be displayed in the drop-down at the top of the screen.
  3. TestRun will also update the expected results for any previously defined defects.

Set the Job Fail Defect's Expected Result

  1. By default, the Job Fail defect is automatically added and enabled (the checkbox is checked). The Job Fail defect defines the expected results that determine whether or not the overall job returns a failure.
  2. To define the Job Fail defect, in the Defect group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag (by default, "<Job Pass/Fail>" is selected. Job Fail is not a symbolic tag, but tests the cell which is configured as the Job Pass/Fail cell).
  3. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.

Add Additional Defects and Define the Expected Results

  1. Press the Add button.

  2. TestRun will add a defect with the default name, "Defect." By default, the newly added defect will be enabled (the checkbox will be checked).

    Note: If a defect has already been added and the default name was unchanged, TestRun will increment the name (e.g. "Defect01", "Defect02", etc.). Press the Rename button to edit the default name and assign a more descriptive name to the defect.
  3. In the Defect group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag.
  4. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.
  5. Use the enabled edit controls to configure test, if necessary.
  6. Repeat steps 1 through 4, as needed, to add additional defects.

Edit a Defect

  1. Select a defect from the list.
  2. In the Defect group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag.
  3. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.

Hardware Tests - Setup Actions

Before TestRun can test to ensure that the In-Sight vision system is acquiring the correct image, it must first set the state of the job accordingly. This screen is used to enable parameter settings prior to testing, verifying that the vision system is acquiring the correct image.

Configure the Job to Perform the TestRun Hardware Test

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Setup Actions column with the setting.
  3. Once the setting has been enabled, select it in the Setup Actions column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed.
  5. If there are multiple settings, use the Move Up/Move Down buttons to configure the settings in their desired order of execution. TestRun will perform the setup actions in the order in which they appear in this screen.
  6. Press the Next button to continue the setup of TestRun.
  7. After performing the programmed Setup Actions, TestRun will automatically trigger the In-Sight vision system to acquire an image.

Hardware Tests - Tests

This step is used to configure tests to ensure that the acquired image is correct. By associating specific job parameters and their expected results with the image, TestRun can determine if the image produces the correct result. For example, a dirty lens may lead to blurry, spotted or darker images; the Field of View (FOV) of an In-Sight vision system may change if the vision system is accidentally bumped; or the focus or aperture on the lens attached to the vision system may change over time due to vibrations. All of these scenarios can be tested by associating a job parameter with an expected result; if the expected result is not returned, there's an issue with the image formation.

To determine if the FOV is correct, features from the part (or the background without the part) can be used. If the features are not present in the image, the FOV has changed. For parts placed in a fixture prior to inspection, features in the four corners of the fixture can be used to establish the proper FOV; if any features are missing, the FOV has changed, or if they're too close or too far apart, the distance between the In-Sight vision system and the FOV may have changed. If the features should form a rectangle, but instead form a non-rectangular quadrilateral, then it's possible that the vision system was knocked off-axis, and is introducing perspective distortion.

Define the TestRun Vision System Image Acquisition Tests

  1. Acquire an image.
  2. Add and configure tests, as needed.

Acquire an Image

  1. Below the Image group box, press the Manual Acquire button to acquire an image from the In-Sight vision system.
  2. TestRun will display the image in the Image group box, and in the EasyBuilder View.
Note: Alternately, press the Load Image button to display the Open dialog and navigate to an image file.

Add and Configure Tests

  1. In the Hardware Tests group box, press the Add button.

  2. TestRun will add a test, with the default name "Test", and place the test in the Test group box, where it is ready to be configured.

    Note: If a test has already been added and the default name was unchanged, TestRun will increment the name (e.g. "Test01", "Test02", etc.). Press the Rename button to edit the default name and assign a more descriptive name to the test.
  3. In the Test group box, use the drop-down menu below the "The defect named "xxx" exists when:" text to select the desired symbolic tag.
  4. Set the Test Type drop-down menu to the appropriate setting for the selected symbolic tag.
  5. Repeat steps 1 through 4, as needed, to add additional tests.

Cleanup Actions

Once testing has been completed, it may be necessary to set the state of the job accordingly. This step defines the setup actions necessary to set the job into the desired state once TestRun has completed its tests.

Configure TestRun to set Job Parameters after Testing

  1. Select a parameter setting from the list in the Symbols column. If necessary, expand the list to display all parameter settings for the selected category.
  2. Enable the setting by checking the checkbox beside the setting. TestRun will auto-populate the Setup Actions column with the setting.
  3. Once the setting has been enabled, select it in the Setup Actions column and the setting's edit control will appear below the two columns.
  4. Adjust the setting as needed.
  5. If there are multiple settings, use the Move Up/Move Down buttons to configure the settings in their desired order of execution. TestRun will perform the setup actions in the order in which they appear in this screen.
  6. Press the Close button to complete the setup of TestRun.
  7. After closing the TestRun Setup dialog, in the TestRun tab of the Palette, press the [image] Run icon to execute the TestRun test(s).
Note: After the TestRun Setup dialog has been configured, a right-click menu is available that provides all of the buttons available in the Palette, as well as an ability to execute tests from a specific section of the tests (e.g. beginning with Hardware Tests, for instance, without running the Job Tests).


Status Bar

Status Bar: EasyBuilder View

A status bar appears below the display area of each EasyBuilder View. Depending on the task that is currently being performed, the status bar can display pixel value information about the current image and messages about the vision system's connection status, job size, I/O status or Online/Offline status.

Image Status

The status bar can display pixel value information as well as Record/Playback image information.

Status Bar Field

 Description

If the mouse is scrolled over an image, the left side of the status bar displays pixel value information about the image.

Note: When using a color vision system, RGB value information is displayed. For more information, see Show Pixel Values Mode.

When recording images, the left side of the status bar displays the Record folder, Good folder or Bad folder directory path and the name of the image that is currently being recorded. For more information, see Record/Playback Options Dialog: EasyBuilder View.

During playback of recorded images, the left side of the status bar displays the name of the image being played back and the Playback folder directory path. For more information, see Record/Playback Options Dialog: EasyBuilder View.

Indicates the current available job size, as a percentage of allocated size. Use the Job Size Limit dialog to modify the value. For more information, see Job Size Limit.

Connection Status

Each In-Sight vision system permits only one connection at a time. Another application on your PC or another user logging onto your vision system can break your connection, which is indicated in the status bar by the message "User admin from … is already logged on." EasyBuilder will periodically attempt to reconnect to the vision system, and display its progress in the status bar (for example, "Waiting to reconnect…" or "Connecting to…"). The status bar can display other error messages, such as a network error, if the vision system is no longer connected to your network.

I/O Status

The I/O status bar displays the EtherNet/IP connection status between the vision system and the CIO-MICRO, CIO-MICRO-CC or CIO-WENET Ethernet I/O module.

Status Bar Field | Description
 | When "I/O OK" is displayed, the connection to the module is functioning properly.
 | When "I/O Not Responding" is displayed, the connection to the module has been lost. For detailed diagnostic information, see Sensor Status View.

Online/Offline Status

The right side of the status bar always contains information relating to the Online or Offline status of the In-Sight vision system.

Status Bar Field | Description
 | When "Offline" is displayed, the In-Sight vision system is currently Offline.
 | When "Live" is displayed, the In-Sight vision system is set to Live Video in the EasyBuilder user interface (from the Set Up Image settings pane, EasyBuilder toolbar or Image menu). The In-Sight vision system is displaying a live image to use when making adjustments to the vision system's lens and the field of view.
 | When "Online" is displayed, the In-Sight vision system is currently in Online mode of operation. For more information, see Online/Offline.
 | When "Comms Online?" is displayed, the In-Sight vision system was placed in Online mode from the EasyBuilder user interface, but a communication protocol (such as ProfiNET, EtherNet/IP or Native Mode) is holding the vision system Offline. For example, a Native Mode Set Online command, SO0, has been issued telling the In-Sight vision system to go Offline. The Set Online command, SO1, must be sent to the In-Sight vision system to allow it to go Online.
 | When "Discrete Online?" is displayed, the In-Sight vision system was placed in Online mode from the EasyBuilder user interface, but a Discrete Input line, configured as an Online/Offline Type, is set low (0). The In-Sight vision system will wait for the Discrete Input signal to change states before proceeding to Online mode.
Tip: Clicking the Online/Offline button [image] either on the EasyBuilder toolbar or in the Run Job settings pane allows you to toggle between Online and Offline states.

Warnings

The right side of the status bar may display warnings.

Status Bar Field | Description
 | When this exclamation mark is displayed, In-Sight Explorer version does not match the firmware version of the connected In-Sight vision system. In-Sight Explorer version 5.1.0 or later is released with two firmware versions: the 5.x.x version (current version) and the latest 4.x.x version. For example, In-Sight Explorer 5.1.0 is released with In-Sight firmware 5.1.0 and 4.9.3. Therefore, when a vision system running firmware 4.9.3 is connected to In-Sight Explorer 5.1.0, no indicator will be displayed in the status bar; however, when a vision system running firmware 4.9.1 is connected to In-Sight Explorer 5.1.0, this exclamation mark is displayed on the status bar. Note: For more information on firmware versions, see Firmware Versions.


EasyBuilder Jobs and the Spreadsheet

Round Trip application development is the process of creating a machine vision application in both the EasyBuilder and Spreadsheet development environments of In-Sight Explorer. A job started in the EasyBuilder can be edited in the Spreadsheet, allowing for customization of exposed parameters in the EasyBuilder interface. For example, the parameters for Location and Inspection Tools may be added, removed or renamed, and additional logic and functionality that is only available in the Spreadsheet environment may be added to enhance EasyBuilder jobs, as well. For more information, see Add, Remove and Rename EasyBuilder Tool Parameters.

Note: Not all In-Sight vision systems may access the Spreadsheet, or load EasyBuilder jobs that have been modified in the Spreadsheet. If a job developed in the EasyBuilder is edited in the Spreadsheet, this job cannot be deployed on an EasyBuilder-only model.

When a job is created and developed in EasyBuilder, an EasyBuilder-specific Spreadsheet is created and programmed with EasyBuilder snippets, which are groups of pre-configured, spatially defined and logically integrated In-Sight functions and EasyBuilder Tags and Labels that perform specific tasks, saved as a Cell Data (.CXD) files. For more information, see EasyBuilder Tags and Tag Labels.

The EasyBuilder snippets correspond to the functionality in the EasyBuilder application steps. The EasyBuilder-compatible Spreadsheet conforms to a specific format, consisting of three vertical sections of EasyBuilder Snippets:

  • Cell columns A-H contain the EasyBuilder snippets for the acquisition settings in the Set Up Image step, and the EasyBuilder snippets for Location and Inspection Tools added in EasyBuilder.
  • Cell columns J-Q are typically empty, unless the first column has been filled, at which point this column is used for EasyBuilder Location and Inspection Tool snippets.
  • Cell columns S-Z contain the EasyBuilder snippets for the overall job pass/fail results, the Input/Output step, the calibration in Set Up Image and the Communication step.

All EasyBuilder snippets are formatted to occupy 8 or fewer columns, and are inserted into one of the three vertical sections. When a Location or Inspection Tool is added to a job in the EasyBuilder environment, the corresponding EasyBuilder snippet is automatically added to the EasyBuilder-specific Spreadsheet, based on the available space in the Spreadsheet.

For example, if a Blobs Counting Tool is added to a job in the EasyBuilder development environment, the EasyBuilder Snippet file BlobCount.cxd is automatically added to the Spreadsheet, in either the first (Columns A-H) or second (Columns J-Q) section, depending upon the available space in the Spreadsheet.

The EasyBuilder Snippets also maintain absolute cell references between both individual cells within a snippet, and the cells of other EasyBuilder Snippets. This spatial relationship between the cells acts as a mechanism to both relate cell execution order, while also providing the display order of text labels and exposed parameters in the EasyBuilder environment. The EasyBuilder Snippets are scanned from the left-to-right, row-by-row, and the individual execution of cells is based upon their placement in the snippet. For more information, see Cell References - Relative/Absolute.

For example, the EasyBuilder snippet file BlobCount.cxd relies on the spatial relationship between the text labels in the row above the Graphics Controls functions in the row below to create the parameter names and controls exposed in the EasyBuilder environment.

EasyBuilder Tool Snippet Structure

Add, Remove and Rename EasyBuilder Tool Parameters


EasyBuilder Tool Snippet Structure

The EasyBuilder Tool Snippets are used to build the Location and Inspection Tools in the EasyBuilder environment. From the Spreadsheet environment, the EasyBuilder Tool snippets expose parameters of In-Sight Vision Tool functions, allowing them to be easily configured in the EasyBuilder environment. For more information, see Vision Tools.

The EasyBuilder Tool Snippets are formatted to fit within 8 columns, with a variable number of rows, depending upon the complexity of the tool. The In-Sight functions and EasyBuilder Tags and Labels within the Snippet are conditionally enabled and rely on a specific spatial relationship between the cells in the Snippet.

Example - EasyBuilder Edge Location Tool - EdgeLocation Snippet:

Example - EdgeLocation Snippet EnabledStatus Cell Dependencies:

EasyBuilder Tags and Tag Labels

In-Sight Vision Tool Functions

Tool Parameters

Displayed Graphics and Regions of Interest


EasyBuilder Tags and Tag Labels

EasyBuilder Tags provide GUI formatting and cell reference data to the EasyBuilder environment. EasyBuilder Tag Labels provide the displayed text in EasyBuilder, or indicate the EasyBuilder Tag in the Spreadsheet. EasyBuilder Tags are denoted by a green triangular Comment indicator in the lower left-hand corner of the cell, and contain a mouse-activated tooltip. For more information, see Comment Dialog.

EasyBuilder Tag cells conform to a specific syntax, and denote a cell or a group of cells that must maintain a pre-defined spatial relationship to one another. For example, the EasyBuilder Tag, Input:Fixture, must always consist of a row of three consecutive cells (below the row of EasyBuilder Tag Labels Row, Column and Theta), which relate the X,Y and Angle data in EasyBuilder. Altering the spatial relationship of the cells, or deleting certain cells, may cause the job to behave unexpectedly.

When a Location or Inspection Tool is added to an EasyBuilder job, the EasyBuilder application parses the EasyBuilder Spreadsheet for the EasyBuilder Tag and Text Label cells, which defines the behavior of the tool and what is displayed in EasyBuilder. The EasyBuilder Tag cells also denote cell references between other EasyBuilder Tag cells within the tool's snippet, as well as links to the other EasyBuilder snippets in the job. For example, the EasyBuilder Tool snippets manage fixture, calibration and overall pass/fail status data through EasyBuilder Tag cells.


In-Sight Vision Tool Functions

In-Sight Vision Tool functions provide the vision processing algorithms, which are the core functionality of the Location and Inspection Tools in EasyBuilder. Most In-Sight Vision Tool functions rely on complex, dynamic arguments within the parameters of the function, and it is advised that these formulas not be edited.

Example - EdgeLocation Snippet FindLine Cell Dependencies and FindLine Property Sheet:


Tool Parameters

Graphics Controls functions are linked to the property sheet parameters of the In-Sight Vision Tool functions or other In-Sight functions, providing the control parameters of the Location and Inspection Tools in EasyBuilder. The parameters exposed in EasyBuilder are denoted by a tool parameter label directly above one of six Graphics Controls functions:

  • Button: Exposes a button control in the EasyBuilder environment. For more information, see Button.
  • CheckBox: Exposes a check box control in the EasyBuilder environment. For more information, see CheckBox.
  • EditFloat: Exposes an integer edit control in the EasyBuilder environment. For more information, see EditFloat.
  • EditInt: Exposes a floating-point edit control in the EasyBuilder environment. For more information, see EditInt.
  • EditString: Exposes a text edit control in the EasyBuilder environment. For more information, see EditString.
  • ListBox: Exposes a drop-down list box control in the EasyBuilder environment. For more information, see ListBox.

The Graphics Controls functions correlate to the property sheet parameters of In-Sight Vision Tool functions or other In-Sight functions. They are typically linked to another function's input parameters using absolute cell references in the Spreadsheet. In other situations, the Graphics Controls functions can be linked to the parameters of several functions, or one may be included to provide additional logic to an EasyBuilder Location or Inspection Tool. In order to be displayed correctly in the EasyBuilder development environment, the tool parameter label must be entered in the cell directly above the Graphics Controls function (enter an apostrophe (') before typing the text).

For example, the Edge Contrast control of an Edge Location Tool has a tool parameter label of "Edge Contrast" directly above an EditInt function, which is set as an absolute cell reference to a FindLine function's AcceptThresh parameter.


Displayed Graphics and Regions of Interest

Graphics Controls functions define the region of interest graphics and the display of found features in EasyBuilder. Each EasyBuilder Location and Inspection Tool has a Region (either circular or rectangular), utilizing either an EditAnnulus or EditRegion function to define the shape of the Region. Each circular Region consists of an EditAnnulus function, followed by cells that define its Row, Column, Inner Radius and Outer Radius (these cells must always appear in this order to function correctly). Each rectangular Region consists of an EditRegion function, followed by cells that define its Row, Column, High, Wide, Angle and Curve data (these cells must always appear in this order to function correctly).


Add, Remove and Rename EasyBuilder Tool Parameters

The EasyBuilder Tool snippets are constructed from various In-Sight functions, and some of these functions contain additional functionality not exposed in the EasyBuilder development environment. These additional parameters may be enabled and displayed in the EasyBuilder environment by configuring them within the Spreadsheet environment.

Note: Property Sheet parameters support drag-and-drop placement of their controls into the Spreadsheet. By selecting a parameter from a Property Sheet and then dragging that parameter to the Spreadsheet, the parameter's label and an edit control are automatically created and referenced in the Spreadsheet. For example, if the Property Sheet of an ExtractBlobs function is open, you may drag-and-drop the Threshold parameter into the Spreadsheet in cell A2, with cell A2 populated with the text, "'Threshold" and A3 populated with an EditInt function. The Threshold parameter in the ExtractBlobs function's Property Sheet is automatically set as an absolute reference to cell A3. For more information, see Cell References - Relative/Absolute.

Important Guidelines for Editing EasyBuilder Jobs in the Spreadsheet

You can use the Insert Cells or Delete Cells dialogs to add or remove rows. Always choose one of the two "Shift cells" options in these dialogs. For more information, see Insert Cells Dialog and Delete Cells Dialog.

  • Do NOT insert columns into the EasyBuilder Snippets.
  • Do NOT delete the EasyBuilder Tags from the Snippets.
  • Do NOT insert functions or formulas into Column I or R.

Any of these actions, improperly executed, may break dependencies and the EasyBuilder job may not function properly.

Editing jobs in the Spreadsheet environment requires that the user have the Access level set to Full. For more information, see User Access Settings Dialog. By default, the EasyBuilder job is locked to prevent inadvertent editing of jobs in the Spreadsheet environment. Before beginning, unprotect the job by selecting Unprotect Job… from the File menu.

Add Parameters to EasyBuilder Tool Snippets

Remove Parameters from EasyBuilder Tool Snippets

Rename Parameters of EasyBuilder Tool Snippets


Add Parameters to EasyBuilder Tool Snippets

Most of the EasyBuilder Location and Inspection Tools have the ability to display additional parameters by adding Graphics Controls functions and linking the newly created controls to existing property sheet parameters and/or logic in the Spreadsheet. The placement of the Graphics Controls functions in the spreadsheet determines its order of appearance in EasyBuilder.

Note: By default, the EasyBuilder job is locked to prevent inadvertent editing of jobs in the Spreadsheet environment. Before beginning, unprotect the job by selecting Unprotect Job… from the File menu.

To add additional parameters to an EasyBuilder Location or Inspection Tool in the Spreadsheet:

  1. To navigate to the tool in the Spreadsheet, right-click the tool in the Results tab of the EasyBuilder Palette and select Go to this tool in the Spreadsheet or select Spreadsheet from the View menu.

    Note: If a tool is highlighted in the Results tab of the EasyBuilder Palette, the tool's snippet is highlighted in the Spreadsheet.

  2. Identify the Spreadsheet function's parameter that will be exposed, and add a text label and Graphics Controls function based upon the type of parameter. Each Graphics Controls function must have a text label in the cell above it. The label tells EasyBuilder the name of the parameter being exposed, and what to display in the EasyBuilder settings pane and Configure Results Application Steps (Inputs/Outputs and Communication). For example, an Edge Location Tool could be modified to display the Edge Width parameter of the FindLine function by adding a text label called "Edge Width" above an EditInt function.

    Note: If there are not enough empty cells in the Snippet to insert a new label and control, cut the existing label and controls, insert additional rows and then paste the label and controls into the newly created area. Do NOT insert columns. When entering the text for the label, remember to type an apostrophe (') before the text.
  3. Create an absolute cell reference between the desired function's parameter and the newly created Graphics Controls function. Open the function's property sheet, select the parameter and press the Insert Absolute Reference button from the property sheet's toolbar. This launches Cell Selection Mode. Select the newly created Graphics Controls function and press OK to confirm the selection. For more information, see Cell Selection Mode.
  4. Conditionally enable the control by setting the Cell State of the Graphics Controls function to the EnabledStatus EasyBuilder Tag cell. The controls must be conditionally enabled and set as an absolute reference to this specific cell to function correctly and be displayed in the EasyBuilder environment. For more information, see Cell State Dialog.
  5. Highlight the cell that contains the Graphics Controls function.
  6. From the Edit menu, select Cell State to launch the Cell State dialog.
  7. Select the Conditionally Enabled option, set the Conditional Reference to Absolute and then press the Select Cell button to launch Cell Selection Mode.
  8. Select the EnabledStatus EasyBuilder Tag cell, located directly below the cell with the "Enabled Status" label. Press OK to confirm the selection.
  9. Now when returning to the EasyBuilder development environment, the newly added control is enabled and visible.

Example: Add Parameters to EasyBuilder Tool


Example: Add Parameters to EasyBuilder Tool

In this example, an Edge Location Tool is modified to display the Edge Width parameter of the FindLine function by adding a text label called "Edge Width" above an EditInt function.

  1. Within the Locate Part application step in EasyBuilder, add an Edge Location Tool.

  2. From the Results tab of the Palette, right-click the Edge Location Tool and select Go to this tool in the Spreadsheet.

  3. The Edge Location Tool contains two rows of Graphics Controls functions and tool parameter labels, beginning with the "Tool Enabled" label and a ListBox function beneath it. For this example, we want the Edge Width parameter exposed in EasyBuilder to be displayed between the Edge Contrast and Edge Transition parameters. Therefore, highlight the two rows of cells to the right of the "Edge Contrast" label and the ListBox function, and cut and paste the 8 cells one column to the right.

  4. Enter a tool parameter label in the cell to the right of the "Edge Contrast" tool parameter label cell. Use an apostrophe (') before typing the text named "Edge Width".

  5. In the cell below the tool parameter label, launch the Insert Function dialog and insert an EditInt function. For more information, see Insert Function Dialog.

  6. After inserting the EditInt function, its property sheet automatically opens. Set the EditInt function's Min and Max parameters to 0 and 10, and then press the OK button to confirm your changes.

  7. Locate the FindLine function within the snippet (denoted by the Edges data structure), and double-click the cell to open the function's property sheet.

  8. In the FindLine property sheet, select the EdgeWidth parameter, and then press the Insert Absolute Reference button in the property sheet toolbar.

    This initiates cell selection mode. Select the cell containing the EditInt function. Either double-click the cell or press the OK button in the Job Edit toolbar to confirm the selection.

  9. The FindLine property sheet reappears, and the EdgeWidth parameter now displays the absolute cell reference to the EditInt function. Press the OK button to confirm the changes.

  10. Finally, the EditInt function controlling the EdgeWidth parameter of the FindLine function needs to be conditionally enabled to execute with the tool. Right-click the EditInt function and select Cell State from the right-click menu to launch the Cell State dialog.

  11. Set the Cell State to Conditionally Enabled, and then press the Select Cell button to launch cell selection mode.

  12. Select the EasyBuilder Tag cell "EnabledStatus." Either double-click the cell or press the OK button in the Job Edit toolbar to confirm the selection.

  13. The Cell State dialog reappears. Press the OK button to confirm the selection.

  14. Go back to the EasyBuilder development environment, and the Edge Width parameter should be displayed in the tool's Settings tab.


Remove Parameters from EasyBuilder Tool Snippets

Certain applications may only require a limited sub-set of the controls enabled in EasyBuilder Location or Inspection Tools. In these circumstances, specific controls may be removed to simplify the tool.

To remove a parameter from an EasyBuilder Location or Inspection Tool in the Spreadsheet environment:

  1. Navigate to the tool in the Spreadsheet, by either right-clicking the tool in the Results tab of the Palette and selecting Go to this tool in the Spreadsheet or selecting Spreadsheet from the View menu.

  2. Select the cells that contain the label and Graphics Controls functions of the parameters that you want to remove. Right-click the highlighted cells and select the Clear Contents option.

    Note: Do not delete the cells. Shifting the cells may break dependencies and the job may not function correctly.
  3. The cells should now be empty. Now, when returning to the EasyBuilder development environment, the control should not be visible.


Rename Parameters of EasyBuilder Tool Snippets

The EasyBuilder Location and Inspection Tool parameter names may be customized for applications and jobs, by renaming the parameters. To remove a parameter from an EasyBuilder Location or Inspection Tool in the Spreadsheet:

  1. Navigate to the tool in the Spreadsheet, by either right-clicking the tool in the Results tab of the Palette and selecting Go to this tool in the Spreadsheet or selecting Spreadsheet from the View menu.
  2. Select the text label cell to be modified and enter the new name in the formula editor in the Job Edit toolbar. Do not delete the apostrophe (') in front of the text, otherwise the text label will not be recognized by EasyBuilder.
  3. Now, when returning to the EasyBuilder, the control's new name should be visible.


EasyBuilder Sample Jobs and Sample Images

EasyBuilder includes a collection of sample jobs and images that demonstrate how Location and Inspection Tools are used in certain situations, and illustrate ways to position region graphics to optimize searches and strategies for fixturing tools.

The EasyBuilder sample jobs also provide a powerful demonstration of the Record/Playback options. The Record/Playback options enable a series of previously acquired images to be cycled through, providing instant feedback of tool results, allowing for quick configuration of thresholds and limits. Ideally, when designing a machine vision application, a collection of images are acquired which demonstrate a wide range of "good" and "bad" images of your inspection. The application is then designed around the "good" image, and the other images provide a means for establishing the range of acceptable values. For more information, see Record/Playback Options Dialog: EasyBuilder View.

Load an EasyBuilder Sample Job

To use the EasyBuilder sample jobs, you need to load a sample job and its accompanying images.

  1. From the Get Connected step, connect to your local emulator or In-Sight vision system. Press the Open Job button in the Load Job section.
  2. From the Open dialog, navigate to your In-Sight Explorer EasyBuilder Sample Jobs directory. The default location is C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Explorer x.x.x.
  3. Choose a sample job to load.
  4. Once the sample job is loaded, you need to load the corresponding sample images.

Load EasyBuilder Sample Images

  1. Launch the Record/Playback Options dialog. There are two options for launching this dialog:
    • Option 1: From the EasyBuilder toolbar, click the [image] icon.
    • Option 2: Click the Set Up Image application step and press the Load Images from PC button in the Acquire/Load Image section.
  2. The Record/Playback Options dialog should automatically open with the Playback tab presented. If not, click on the Playback tab.
  3. From the Playback Folder section, press the Browse button to launch the Browse for Folder dialog. Navigate to the Sample Jobs > EasyBuilder directory, and select the same folder that you specified when loading the sample job. Press the OK button to continue.
  4. The Playback Folder should now display the directory that you specified, and the Image Count indicates the number of images in the directory. Press the OK button in the Record/Playback Options dialog to continue.
  5. Now that the sample job and sample images are aligned, you can go to the Run Job step and press the [image] button in the EasyBuilder toolbar to watch the inspection tools perform, or go to the Locate Part or Inspect Part steps to see how the tools were modified for the application.


Function Reference

Applications are configured within In-Sight Explorer by inserting formulas into spreadsheet cells. These formulas are constructed using the functions available in the Insert Function dialog. For more information, see Insert Function Dialog.

In-Sight functions are divided into the following categories. In addition to the functions in the categories listed below, the AcquireImage function is a requirement of every spreadsheet job and is automatically inserted into the spreadsheet in cell A0.

  • Vision Tools: Extract and process image features.
  • Geometry: Compute the distance between standard geometric constructs, including circles, points, and line segments.
  • Graphics: Customize the spreadsheet and the image display with interactive controls and graphical data displays.
  • Mathematics: Construct formulas using standard math operators, logic, statistics, and trigonometry.
  • Text: Format alphanumeric data strings for display and for communications.
  • Coordinate Transforms: Convert feature locations and distances between image, fixture, and real world coordinate systems.
  • Input/Output: Control how In-Sight communicates with remote devices.
  • Clocked Data Storage: Keep running totals of values on specified events over time.
  • Vision Data Access: Extract individual values from data structures.
  • Structures: Create graphics, regions, and fixtures that can be used by other functions.
  • Scripting: Create custom-designed JavaScript source code to perform job-related tasks.

AcquireImage

Vision Tools Functions

Geometry Functions

Graphics Functions

Mathematics Functions

Text Functions

Coordinate Transforms Functions

Input/Output Functions

Clocked Data Storage Functions

Vision Data Access Functions

Structures Functions

Scripting Functions

Focus Functions


Blob

In machine vision terminology, any two-dimensional, variably shaped and similarly shaded group of connected pixels can be referred to as a “blob.” The process of extracting these blobs from an image, finding them in a region of interest (ROI) and sorting them based on specific criteria is called blob analysis.

In-Sight vision systems perform blob analysis using the Blob Tool's functions:

  • DetectBlobs: Locates blobs within an image and extracts data on located blobs.
  • ExtractBlobs: Locates blobs within an image and extracts data on located blobs. This function is the first step in blob analysis.
  • FindBlobs: Filters and sorts a list of extracted blobs based upon specific criteria and how closely the found blobs match that criteria.
  • SortBlobs: Sorts a set of blobs based upon the blobs' positions relative to a fixture.
Note: Both FindBlobs and SortBlobs must reference a Blobs data structure. This data structure can be created by a DetectBlobs, ExtractBlobs, FindBlobs or SortBlobs function.

What is Blob Analysis?

When is Blob Analysis Used?

Why is Blob Analysis Used?

How to Perform Blob Analysis

DetectBlobs

ExtractBlobs

FindBlobs

SortBlobs


What is Blob Analysis?

The In-Sight Blob Tool performs a type of blob analysis that is referred to as connectivity analysis, and this step is accomplished by using the DetectBlobs or ExtractBlobs function. When the DetectBlobs or ExtractBlobs function is inserted into the spreadsheet and its parameters configured, the function will begin performing the analysis by first segmenting the ROI.

During this process, the pixels in the ROI are divided into two categories, Blob and Background, based upon the greyscale threshold value. This threshold value separates the pixels so that those pixels below the threshold value are categorized as Black, and those values over the threshold are categorized as White.

Note: The threshold can be determined by using the DetectBlobs or ExtractBlobs function's Threshold parameter automatic setting, manual configuration through trial and error, or as a reference to a Histogram function's calculated results.

As this process is being performed, the pixels are examined to determine whether or not they are connected to their neighboring pixels. A Blob pixel is said to be connected to neighboring pixels if the Blob pixel touches another pixel of similar value to either side, above it, below it or diagonally to it. A Background pixel is said to be connected to neighboring pixels if the Background pixel touches another pixel of similar value to either side, above it or below it.

The figure below demonstrates how the In-Sight Blob Tool analyzes an image. In this example, a greyscale threshold value of 150 is used to segment the image into Blob and Background pixels. All pixels with greyscale values greater than or equal to 150 are categorized as White, or Background, pixels; while all pixels with values less than 150 are categorized as Black, or Blob, pixels:

Once the blob has been extracted from the image, DetectBlobs or ExtractBlobs will automatically create a Blobs data structure and a result table that contains the data about the extracted blob. The information returned can be utilized by the FindBlobs and SortBlobs functions to filter and sort through other found blobs, based upon their physical characteristics and location, respectively.

The FindBlobs function analyzes the blobs within a ROI and determines whether or not the found blobs match the specified requirements; those blobs that meet the requirements will be returned, and scored in terms of how closely they match the requirements, in descending order.

The SortBlobs function analyzes the blobs within a ROI and determines where the blob is located in relation to a fixture; this is helpful in determining a blob's position relative to another blob, and a single DetectBlobs or ExtractBlobs function can be used to find many blobs in a ROI at once.


When is Blob Analysis Used?

It's best to use the In-Sight Blob Tools when the following conditions apply:

  • The image is of a two-dimensional object.
  • The image provides high contrast between light and dark pixels.
Note: The In-Sight Blob Tool only analyzes greyscale images; all color images are automatically converted to a greyscale value.


Why is Blob Analysis Used?

When these conditions are met, blob analysis can be extremely useful in the following applications:

  • Coarse gauging applications, such as measuring diameters or dimensions of squares to determine a part's width in a particular orientation.
  • First-pass positioning applications, where the Blob Tools are used to quickly locate and place a rough fixture for another tool.
  • Presence/absence applications where the Blob Tools are used to determine whether or not a blob is present or absent in the image.
  • Counting applications, where the Blob Tools can be set up to count and sort blobs based upon characteristics such as their area or perimeter.


How to Perform Blob Analysis

With the In-Sight Blob Tools, the process of blob analysis can be broken down into three steps:

  1. Examine the image and determine whether or not the image and its conditions meet the requirements for blob analysis.
  2. Insert a DetectBlobs or ExtractBlobs function into the spreadsheet and set the parameters accordingly to locate and identify the blobs in the image.
  3. Insert a FindBlobs or SortBlobs function into the spreadsheet to filter the list of found blobs based on physical characteristics or the location of the blob, respectively.


DetectBlobs

The DetectBlobs function performs a form of blob analysis known as "connectivity analysis" on a Region of Interest (ROI). For more information on ROI, see ROI.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 5.2.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

During "connectivity analysis," the pixels within the ROI are divided into two categories, Blob or Background, based upon a greyscale Threshold value that separates all of the pixels below the threshold into a black category, and all of the pixels above the threshold into a white category. For more information on threshold, see Threshold.

In this way, pixels with similar values are grouped together based upon their “color” and whether or not they “touch” their neighboring pixels. The Background pixels can be connected to their neighbors if the pixels touch on either side, above and below; while the Blob pixels can be connected to their neighbors if the pixels touch on either side, above, below or diagonally.

Once the image has been processed, it will have been segmented into Blob and Background pixel values. The Blobs found in the ROI will be identified based upon their physical characteristics and assigned values, such as the blob's location in the image (it's Row, Column coordinates), its area, perimeter, spread and elongation. The data from the extracted blobs is stored and reported in a Blobs data structure.

This function is the first step in blob analysis, and both FindBlobs and SortBlobs ultimately reference a DetectBlobs function's Blobs data structure, either directly or in a chain of cell dependencies. For more information, see FindBlobs and SortBlobs

DetectBlobs Inputs

Syntax: DetectBlobs(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region,Number to Sort,Threshold,Fill Holes,Boundary Blobs,Color Blob,Color Background,Area Limit:Min,Area Limit:Max,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

 Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.
External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Number to Sort

Specifies the number of blobs to return.

0 | Returns all blobs that meet the color and size settings specified in the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters. For more information, see ExtractBlobs.
1 to 4096 (default = 1) | Returns up to the specified number of blobs that meet the color and size settings specified in the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters. If more blobs are found, the blobs with the largest area will be selected.
Note: If the value of the Number to Sort parameter is greater than zero, DetectBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

Threshold

Specifies the greyscale value that will be used to separate blobs from the background. This value can be determined by utilizing the DetectBlobs function's automatic setting (the default setting), manually configured through trial and error, or set as a reference to a Histogram function's calculated results. For more information, see Cell References - Relative/Absolute and Histogram.

-1 (default) | The function automatically evaluates and computes a threshold value based on the image's greyscale statistics.
0 to 255 | Specifies a greyscale threshold value, from 0 to 255.

Fill Holes

Specifies one of two methods for processing statistics accumulated in holes.

0 = OFF (default)

Enables the contribution of holes in the overall blob statistics. For example, adding holes to a blob would decrease its area.

Note:

When set to OFF, blobs that are holes within another blob are reported. In the example below, Blob 1, which is a hole within Blob 0, is reported. In the blob statistics, the value for Blob 0 Area (top row) does not contain Blob 1 Area (bottom row).
1 = ON

Disables the contribution of holes in the overall blob statistics. For example, adding holes to a blob would not affect its area.

Note:

When set to ON, blobs that are holes within another blob are ignored. In the example below, a hole within Blob 0 is ignored, and only one blob (Blob 0) is reported. In the blob statistics, the value for Blob 0 Area contains the entire blob area, including the hole.

Note: Fill Holes for DetectBlobs is different than Fill Holes for ExtractBlobs, which reports holes within another blob when the Fill Hole checkbox is checked.

Boundary Blobs

Specifies one of two ways for managing blobs that intersect the ROI boundary.

0 = OFF | Excludes blobs that intersect the ROI boundary; any blobs that intersect the ROI boundary will not be included in the final Blobs data structure.
1 = ON (default) | Includes blobs that intersect the ROI boundary; any blobs that intersect the ROI boundary will be included in the final Blobs data structure (provided that they also meet the specified settings of the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters).

Color: Blob

Specifies the blob's color.

0 = black | Only returns blobs that are below the specified greyscale Threshold value.
1 = white | Only returns blobs that are above the specified greyscale Threshold value.
2 = either (default) | There is no blob color requirement.
Note:

  • When Color: Blob and Color: Background are set to the same color, blobs are not reported. For example, when Color: Blob is set to black and Color: Background is also set to black, blobs are not reported.

    Color: Blob = Black

    Color: Background = Black

    Color: Blob = Either or White

    Color: Background = Black

    However, even if Color: Blob and Color: Background are set to the same color, blobs will be reported when it is contained by an area of the opposite color (see the examples below). If any part of the blob is not contained by the opposite color, the blob will not be reported.

    Color: Blob = Black

    Color: Background = Black

    Color: Blob = White

    Color: Background = White

  • Color: Blob for DetectBlobs are different than Color: Blob for ExtractBlobs, which reports the selected color of blobs even if Color: Blob and Color: Background are set to the same color.

    Closed DetectBlobs and ExtractBlobs Examples
    DetectBlobs ExtractBlobs

    Color: Blob = Black

    Color: Background = Black

    Color: Blob = Either or White

    Color: Background = Black

Color: Background

Specifies the background color in the acquired image. 8-way connectivity analysis is performed on the foreground, and 4-way connectivity is performed on the background.

0 = black

1 = white (default)

Area Limit: Min

 Specifies a minimum area restriction, in number of pixels, (0 to 900000; default = 100) for all returned blobs; only blobs whose area is greater than the Area Limit: Min value will be returned.

Area Limit: Max

 Specifies a maximum area restriction, in number of pixels, (0 to 900000; default = 100000) for all returned blobs; only blobs whose area is less than the Area Limit: Max will be returned.

Show

Specifies the display mode for DetectBlobs graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the DetectBlobs function is highlighted in the spreadsheet.
1 = result graphics only | Blob outlines will be displayed at all times.
2 = input and result graphics | Both the input image region and the outlines of extracted blobs will be displayed at all times.

DetectBlobs Outputs

Returns

A Blobs data structure containing the blobs extracted from the image, or #ERR if any of the input parameters are invalid.

Results

When DetectBlobs is initially inserted into a cell, a result table is created in the spreadsheet. If Number to Sort is equal to 0, the table is comprised solely of the GetNFound function. If Number to Sort is greater than zero, multiple functions will be inserted to create a table of blob results with a maximum of Number to Sort rows.

Note: If the value of the Number to Sort parameter is greater than zero, DetectBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

DetectBlobs Vision Data Access Functions

These functions provide important statistical information about the blobs found in the image.

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the DetectBlobs Blobs data structure result table:

Spreadsheet Function | Function Name | Description
Index | N/A | Returns the indexed blobs, sorted from largest to smallest in area.
Row | GetRow(Blobs, Blob Index) | Returns the y-coordinate (Row) of a blob's center of mass (centroid). Closed EXAMPLE
Col | GetCol(Blobs, Blob Index) | Returns the x-coordinate (Column) of a blob's center of mass (centroid). Closed EXAMPLE
Angle | GetAngle(Blobs, Blob Index) | Returns the angle of a blob’s principal (major) axis with respect to the Y-axis. Note: The Angle value on rectangles may be reported 180 degrees different from that of ExtractBlobs. Closed EXAMPLE
Color | GetColor(Blobs, Blob Index) | Returns the color value (0 = black, 1 = white) of a blob.
Score | GetScore(Blobs, Blob Index) | A measure of how closely the blob matches the criteria of a FindBlobs function.
Area | GetArea(Blobs, Blob Index) | Returns the area of the blob (measured in pixels). Closed EXAMPLE Note: If there are holes in the blob, the Area value will vary depending on whether or not the Fill Holes checkbox is enabled or disabled.
Elongation | GetElongation(Blobs, Blob Index) | Returns a value that represents how a blob's pixels are stretched out from the blob's center of mass (centroid). For instance, a circle would report 0 Elongation, while a nail would have a high Elongation value. Closed EXAMPLE
Holes | GetHoles(Blobs, Blob Index) | Returns the number of holes contained within the blob. Note: Only holes whose area is greater than the Area Limit: Min value will be returned.
Perimeter | GetPerimeter(Blobs, Blob Index) | Returns the length of the boundary around the blob; the perimeter is calculated by counting the external edges of the pixels that form the boundary of the blob. Closed EXAMPLE
Spread | GetSpread(Blobs, Blob Index) | Returns a value that represents how a blob's pixels are distributed away from the blob's center of mass (centroid). For instance, a circular shaped object would have a lower Spread value than an oval shaped object. Closed EXAMPLE

For more information on Vision Data Access functions, see Blobs.

DetectBlobs Example

The DetectBlobs function is used to identify and locate blobs of connected pixels, which can be comprised of various shapes and sizes. This example illustrates how the information returned in the DetectBlobs data structure result table relates to the found blobs, and how that information can be used to later sort and filter the blobs based upon their characteristics.

For this example, the following image has been used to help illustrate the meaning of the values that are returned in the DetectBlobs function's result table:

An DetectBlobs function was inserted into a blank cell in the spreadsheet. Based upon the shapes, the Closed DetectBlobs property sheet's parameters were configured as follows:

  • Image: The default setting was used for this example, but this parameter can reference any Image data structure, such as an Image data structure produced by a Filter function, which processes the image to remove excess image noise before inspecting it for blobs.
  • Fixture: The default setting was used because the image is stationary and will not be rotated or moved. However, when using the DetectBlobs function on images that undergo movement, it is advisable to assign the image region to a Fixture.
  • Region: The image region was maximized to include all of the shapes in the analysis. By clicking on the Region parameter and then pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.
  • Number to Sort: The Number to Sort was set to six. This parameter could have also been set to 0, and the tool would have automatically extracted all blobs that meet the color and size settings specified in the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters.
  • Threshold: The default setting was used, which automatically calculates the greyscale Threshold value. In this image, the greyscale value differences are very pronounced and it is very clear which pixels are the dark pixels and which are the light. In applications where there is a more subtle gradation and the automatic threshold setting does not separate the values very well, using Histogram functions, such as the HistHead or HistTail functions, to determine the greyscale intensities in different regions of the image can be very helpful.
  • Fill Holes: The default setting was used, enabling the contribution of the holes found in the blobs, thus decreasing the overall area of those blob shapes with holes in them. Had the Fill Holes checkbox been checked, holes within blobs are reported and the area within the holes would have been added, thus increasing the area of the blobs with holes.
  • Boundary Blobs: The default setting was used, which includes any blobs that intersect the image region's boundary. With this setting, if the image had been moved to the left, and the biggest circle and the smallest square shape intersected the left-most boundary of the image region, the parts of those shapes that still fell within the region's boundary would be extracted as blobs. If the checkbox had been unchecked, though, those blobs would not have been processed.
  • Area Limit: Min/Max: The default settings were used. These settings filter through the blobs in the region during the extraction phase, evaluating the blobs based upon the minimum and maximum area limit settings to determine whether or not the area of the blob allows it to be classified as a blob.
  • Show: The default setting was used, which only allows the result graphics to be displayed when the cell containing the Blobs data structure is selected, as in the example below.

After configuring the DetectBlobs property sheet, a Blobs data structure and Closed result data table are produced.

The values returned in the result table can be used to filter and sort the blobs, using the FindBlobs and SortBlobs functions. For example, a FindBlobs function could be inserted into the spreadsheet and reference the DetectBlobs function. The FindBlobs function would then be used to filter the blobs based upon their Spread. Then a SortBlobs function could be inserted into the spreadsheet and it could reference the recently created FindBlobs function to sort the list of blobs based upon their X,Y position.


ExtractBlobs

The ExtractBlobs function performs a form of blob analysis known as "connectivity analysis" on a Region of Interest (ROI). For more information, see ROI.

During "connectivity analysis," the pixels within the ROI are divided into two categories, Blob or Background, based upon a greyscale Threshold value that separates all of the pixels below the threshold into a black category, and all of the pixels above the threshold into a white category.

In this way, pixels with similar values are grouped together based upon their “color” and whether or not they “touch” their neighboring pixels. The Background pixels can be connected to their neighbors if the pixels touch on either side, above and below; while the Blob pixels can be Closed connected to their neighbors if the pixels touch on either side, above, below or diagonally.

Once the image has been processed, it will have been segmented into Blob and Background pixel values. The Blobs found in the ROI will be identified based upon their physical characteristics and assigned values, such as the blob's location in the image (it's Row, Column coordinates), its area, perimeter, spread and elongation. The data from the extracted blobs is stored and reported in a Blobs data structure.

This function is the first step in blob analysis, and both FindBlobs and SortBlobs ultimately reference an ExtractBlobs function's Blobs data structure, either directly or in a chain of cell dependencies. For more information, see FindBlobs, SortBlobs, Cell References - Relative/Absolute, or Job Auditing.

ExtractBlobs Inputs

Syntax: ExtractBlobs(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region,Number to Sort,Threshold,Fill Holes,Boundary Blobs,Color Blob,Color Background,Area Limit: Min,Area Limit: Max,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Number to Sort

Specifies the number of blobs to return.

0 | Returns all blobs that meet the color and size settings specified in the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters.
1 to 4096 (default = 1) | Returns up to the specified number of blobs that meet the color and size settings specified in the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters. If more blobs are found, the blobs with the largest area will be selected.
Note: If the value of the Number to Sort parameter is greater than zero, ExtractBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

Threshold

Specifies the greyscale value that will be used to separate blobs from the background. This value can be determined by utilizing the ExtractBlobs function's automatic setting (the default setting), manually configured through trial and error, or set as a reference to a Histogram function's calculated results.

-1 (default) | The function automatically evaluates and computes a threshold value based on the image's greyscale statistics.
0 to 255 | Specifies a greyscale threshold value, from 0 to 255.

Fill Holes

Specifies one of two methods for processing statistics accumulated in holes.

Closed EXAMPLE

The following blob shape illustrates the effect of enabling and disabling the contribution of holes in the overall blob statistics:

When the Fill Holes checkbox is left unchecked, as in the top row of blob statistics, below, the area of the blob is smaller than when the Fill Holes checkbox is checked, as in the bottom row of blob statistics:

0 = OFF (default) | Enables the contribution of holes in the overall blob statistics. For example, adding holes to a blob would decrease its area.
1 = ON | Disables the contribution of holes in the overall blob statistics. For example, adding holes to a blob would not affect its area.

Boundary Blobs

Specifies one of two ways for managing blobs that intersect the ROI boundary.

0 = OFF | Excludes blobs that intersect the ROI boundary; any blobs that intersect the ROI boundary will not be included in the final Blobs data structure.
1 = ON (default) | Includes blobs that intersect the ROI boundary; any blobs that intersect the ROI boundary will be included in the final Blobs data structure (provided that they also meet the specified settings of the Color Blob/Color Background and Area Limit: Min/Area Limit: Max parameters).

Color Blob

Specifies the blob's color.

0 = black | Only returns blobs that are below the specified greyscale Threshold value.
1 = white | Only returns blobs that are above the specified greyscale Threshold value.
2 = either (default) | There is no blob color requirement.

Color Background

Specifies the background color in the acquired image. When the background color differs from the blob color, 8-way connectivity analysis is performed; when the background color matches the blob color, 4-way connectivity analysis is performed.

0 = black

1 = white (default)

Area Limit: Min

Specifies a minimum area restriction, in number of pixels, (0 to 900000; default = 100) for all returned blobs; only blobs whose area is greater than the Area Limit: Min value will be returned.

Area Limit: Max

Specifies a maximum area restriction, in number of pixels, (0 to 900000; default = 100000) for all returned blobs; only blobs whose area is less than the Area Limit: Max will be returned.

Show

Specifies the display mode for ExtractBlobs graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the ExtractBlobs function is highlighted in the spreadsheet.
1 = result graphics only | Blob outlines will be displayed at all times.
2 = input and result graphics | Both the input image region and the outlines of extracted blobs will be displayed at all times.

ExtractBlobs Outputs

Returns

A Blobs data structure containing the blobs extracted from the image, or #ERR if any of the input parameters are invalid.

Results

When ExtractBlobs is initially inserted into a cell, a result table is created in the spreadsheet. If Number to Sort is equal to 0, the table is comprised solely of the GetNFound function. If Number to Sort is greater than zero, multiple functions will be inserted to create a table of blob results with a maximum of Number to Sort rows.

Note: If the value of the Number to Sort parameter is greater than zero, ExtractBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

ExtractBlobs Vision Data Access Functions

These functions provide important statistical information about the blobs found in the image. The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Blobs.

Spreadsheet Name | Function Name | Description
Index | N/A | Returns the indexed blobs, sorted from largest to smallest in area.
Row | GetRow(Blobs, Blob Index) | Returns the y-coordinate (Row) of a blob's center of mass (centroid). Closed EXAMPLE
Col | GetCol(Blobs, Blob Index) | Returns the x-coordinate (Column) of a blob's center of mass (centroid). Closed EXAMPLE
Angle | GetAngle(Blobs, Blob Index) | Returns the angle of a blob's center of mass, relative to the center of the ROI. Closed EXAMPLE
Color | GetColor(Blobs, Blob Index) | Returns the color value (0 = black, 1 = white) of a blob.
Score | GetScore(Blobs, Blob Index) | A measure of how closely the blob matches the criteria of a FindBlobs function.
Area | GetArea(Blobs, Blob Index) | Returns the area of the blob (measured in pixels). Closed EXAMPLE Note: If there are holes in the blob, the Area value will vary depending on whether or not the Fill Holes checkbox is enabled or disabled.
Elongation | GetElongation(Blobs, Blob Index) | Returns a value that represents how a blob's pixels are stretched out from the blob's center of mass (centroid). For instance, a circle would report 0 Elongation, while a nail would have a high Elongation value. Closed EXAMPLE
Holes | GetHoles(Blobs, Blob Index) | Returns the number of holes contained within the blob.
Perimeter | GetPerimeter(Blobs, Blob Index) | Returns the length of the boundary around the blob; the perimeter is calculated by counting the external edges of the pixels that form the boundary of the blob. Closed EXAMPLE
Spread | GetSpread(Blobs, Blob Index) | Returns a value that represents how a blob's pixels are distributed away from the blob's center of mass (centroid). For instance, a circular shaped object would have a lower Spread value than an oval shaped object. Closed EXAMPLE

Additional data elements can be accessed using the following Vision Data Access functions:

Thresh

GetThresh(Blobs)

Returns the Threshold value that was used to segment the image.

NFound

GetNFound(Blobs)

Returns the number of blobs found.

High

GetHigh(Blobs, Blob Index)

Returns the height of the indexed blob.

Wide

GetWide(Blobs, Blob Index)

Returns the width of the indexed blob.

MinRow

GetMinRow(Blobs, Blob Index)

Returns the topmost row coordinate for a square bounding box around the blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle.

MinCol

GetMinCol(Blobs, Blob Index)

Returns the leftmost column coordinate for a square bounding box around the blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle.

MaxRow

GetMaxRow(Blobs, Blob Index)

Returns the bottommost row coordinate for a square bounding box around the blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle .

MaxCol

GetMaxCol(Blobs, Blob Index)

Returns the leftmost column coordinate for a square bounding box around the blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle.

ExtractBlobs Example

The ExtractBlobs function is used to identify and locate blobs of connected pixels, which can be comprised of various shapes and sizes. This example illustrates how the information returned in the ExtractBlobs data structure result table relates to the found blobs, and how that information can be used to later sort and filter the blobs based upon their characteristics.

For this example, the following image has been used to help illustrate the meaning of the values that are returned in the ExtractBlobs function's result table:

An ExtractBlobs function was inserted into a blank cell in the spreadsheet. Based upon the shapes, the Closed ExtractBlobs property sheet's parameters were configured as follows:

Image: The default setting was used for this example, but this parameter can reference any Image data structure, such as an Image data structure produced by a NeighborFilter function, which processes the image to remove excess image noise before inspecting it for blobs. For more information, see NeighborFilter.

Fixture: The default setting was used because the image is stationary and will not be rotated or moved. However, when using the ExtractBlobs function on images that undergo movement, it is advisable to assign the image region to a Fixture. For more information, see Fixture.

Region: The image region was maximized to include all of the shapes in the analysis. By clicking on the Region parameter and then pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.

Number to Sort: There were six shapes, so the Number to Sort was set to six. This parameter could have also been set to 0, and the tool would have automatically extracted the six shapes.

Threshold: The default setting was used, which automatically calculates the greyscale Threshold value. In this image, the greyscale value differences are very pronounced and it is very clear which pixels are the dark pixels and which are the light. In applications where there is a more subtle gradation and the automatic threshold setting does not separate the values very well, using Histogram functions, such as the HistHead or HistTail functions, to determine the greyscale intensities in different regions of the image can be very helpful. For more information, see Histogram, HistHead, or HistTail.

Fill Holes: The default setting was used, enabling the contribution of the holes found in the blobs, thus decreasing the overall area of those blob shapes with holes in them. Had the Fill Holes checkbox been checked, the area within the holes would have been added, thus increasing the area of the blobs with holes.

Boundary Blobs: The default setting was used, which includes any blobs that intersect the image region's boundary. With this setting, if the image had been moved to the left, and the circle and dumb-bell shape intersected the left-most boundary of the image region, the parts of those shapes that still fell within the region's boundary would be extracted as blobs. If the checkbox had been unchecked, though, those blobs would not have been processed.

Area Limit: Min/Max: The default settings were used. These settings filter through the blobs in the region during the extraction phase, evaluating the blobs based upon the minimum and maximum area limit settings to determine whether or not the area of the blob allows it to be classified as a blob.

Show: The default setting was used, which only allows the result graphics to be displayed when the cell containing the Blobs data structure is selected, as in the example below.

After configuring the ExtractBlobs property sheet, a Blobs data structure and Closed result data table are produced.

Looking at the results, all of the shapes are comprised of nearly the same area, while the other values, such as Angle, Elongation and Perimeter, show a much greater variance. The values returned in the result table can be used to filter and sort the blobs, using the FindBlobs and SortBlobs functions. For example, a FindBlobs function could be inserted into the spreadsheet and reference the ExtractBlobs function. The FindBlobs function would then be used to filter the blobs based upon their Spread. Then a SortBlobs function could be inserted into the spreadsheet and it could reference the recently created FindBlobs function to sort the list of blobs based upon their X,Y position.


FindBlobs

FindBlobs is used to filter and sort the blobs returned in a Blobs data structure.

Using the FindBlobs parameter settings, a formula is created that calculates a score to measure how closely the blobs referenced in the Blobs data structure match an “ideal” blob. Based upon the parameter settings, FindBlobs will in turn return only those blobs that match the specified requirements.

Each blob in the referenced Blobs data structure undergoes a two-step process of analysis: First, each of the individual FindBlobs parameter settings creates a formula that evaluates that particular parameter value. For instance, the Angle score would be computed by dividing the differences of the Range and the Angle parameter's Angle value and the Range and referenced blob's Angle value, multiplied by the Weight value. After the individual scores have been computed, each of the individual parameter scores are added together and divided by the sum of the individual Weight parameter values. This score is then compared against the Accept Thresh value to determine whether or not the blob meets the specified requirements.

Once FindBlobs has filtered and sorted the extracted blobs, a new Blobs data structure and accompanying result table will be automatically inserted into the spreadsheet. The result table is sorted by how closely the found blobs match the configured requirements, in descending order.

FindBlobs can be extremely useful in classifying features for defect detection. For example, if the job were to detect scratches on a surface, FindBlobs could be configured to return only those blobs with higher Elongation values. Or, if the goal was to detect jagged edge defects, FindBlobs could be configured to return only those blobs with higher Perimeter or Spread values.

FindBlobs Inputs

Syntax: FindBlobs(Blobs,NumbertoFind,AcceptThresh,Angle.Angle,Angle.Range,Angle.Weight,Area.Area,Area.Range,Area.Weight,Elongation.Elongation,Elongation.Range,Elongation.Weight,Holes.Number,Holes.Range,Holes.Weight,Perimeter.Perimeter,Perimeter.Range,Perimeter.Weight,Spread.Spread,Spread.Range,Spread.Weight,Show)

Parameter Description

Blobs

This parameter references the spreadsheet cell that contains the Blobs data structure that is to be filtered and sorted. For more information, see Cell References - Relative/Absolute.

Number to Find

This parameter specifies the maximum number (1 to 4096; default = 3) of blobs to return. If there are more blobs in the image whose scores exceed the Accept Thresh setting, the blobs with the highest scores will be selected.

Note: If the value of the Number to Find parameter is greater than zero, FindBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

Accept Thresh

Specifies the minimum acceptable match score (0 to 100; default = 10). FindBlobs will return only those blobs with match scores exceeding the Accept Thresh. The match score is computed with the following formula:

(Angle score + Area score + Elongation score + Holes score + Perimeter score + Spread score) * (100/Sum of the parameters' Weight values)

Angle

This parameter is used to configure the scoring formula that identifies the ideal Angle score of found blobs.

Closed Angle Scoring Formula

The FindBlobs Angle score is computed by using the following formula:

Angle Score = [(Range + Angle) - BlobAngleVal]/Range * WeightVal

BlobAngleVal = the referenced blob's output Angle value

WeightVal = Weight/(sum of all weight values) * 100

Angle | The ideal blob angle (-360 to 360; default = 0).
Range | The blob angle tolerance, in similarity scoring (0 to 360; default = 0).
Weight | The relative importance of blob angle, in similarity scoring (0 to 100; default = 0).

Area

This parameter is used to configure the scoring formula that identifies the ideal Area score of found blobs.

Closed Area Scoring Formula

The FindBlobs Area score is computed by using the following formulas, depending on the BlobAreaVal and the Area value:

  • If the BlobAreaVal is greater than the Area value, this formula is used:

    Area Score = [(Range + Area) - BlobAreaVal]/Range * WeightVal

  • If the BlobAreaVal is less than the Area value, this formula is used:

    Area Score = [BlobAreaVal - (Area - Range)]/Range * WeightVal

    • BlobAreaVal = the referenced blob's output Area value
    • WeightVal = Weight/(sum of all weight values) * 100
Area | The ideal blob area size, in pixels (0 to 900000; default = 1000).
Range | The blob area tolerance, in similarity scoring (0 to 900000; default = 20000).
Weight | The relative importance of blob area, in similarity scoring (0 to 100; default = 50).

Elongation

This parameter is used to configure the scoring formula that identifies the ideal Elongation score of found blobs.

Closed Elongation Scoring Formula

  • The FindBlobs Elongation score is computed by using the following formula:

    Elongation Score = [(Range + Elongation) - BlobElongationVal]/Range * WeightVal

    • BlobElongationVal = the referenced blob's output Elongation value
    • WeightVal = Weight/(sum of all weight values) * 100
Elongation | The ideal blob elongation (0 to 900000; default = 1).
Range | The blob elongation tolerance, in similarity scoring (0 to 900000; default = 2).
Weight | The relative importance of blob elongation, in similarity scoring (0 to 100; default = 50).

Holes

This parameter is used to configure the scoring formula that identifies the ideal Holes score of found blobs.

Closed Holes Scoring Formula

  • The FindBlobs Holes score is computed by using the following formula:

    Holes Score = [(Range + Number) - BlobHolesVal]/Range * WeightVal

    • BlobHolesVal = the referenced blob's output Holes value
    • WeightVal = Weight/(sum of all weight values) * 100
Number | The ideal blob hole count (0 to 10000; default = 0).
Range | The blob hole count tolerance, in similarity scoring (0 to 10000; default = 2).
Weight | The relative importance of blob hole count, in similarity scoring (0 to 100; default = 0).

Perimeter

This parameter is used to configure the scoring formula that identifies the ideal Perimeter score of found blobs.

Closed Perimeter Scoring Formula

  • The FindBlobs Perimeter score is computed by using the following formula:

    Perimeter Score = [(Range + Perimeter) - BlobPerimeterVal]/Range * WeightVal

    • BlobPerimeterVal = the referenced blob's output Perimeter value
    • WeightVal = Weight/(sum of all weight values) * 100
Perimeter | The ideal blob perimeter (0 to 100000; default = 1000).
Range | The blob perimeter tolerance, in similarity scoring (0 to 100000; default = 10000).
Weight | The relative importance of blob perimeter, in similarity scoring (0 to 100; default = 50).

Spread

This parameter is used to configure the scoring formula that identifies the ideal Spread score of found blobs.

Closed Spread Scoring Formula

  • The FindBlobs Spread score is computed by using the following formula:

    Spread Score = [(Range + Spread) - BlobSpreadVal]/Range * WeightVal

    • BlobSpreadVal = the referenced blob's output Spread value
    • WeightVal = Weight/(sum of all weight values) * 100
Spread | The ideal blob spread (0 to 900000; default = 1).
Range | The blob spread tolerance, in similarity scoring (0 to 900000; default = 2).
Weight | The relative importance of blob spread, in similarity scoring (0 to 100; default = 50).

Show

Specifies the display mode for FindBlobs graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindBlobs function is highlighted in the spreadsheet.
1 = result graphics only | Blob outlines will be displayed at all times.

FindBlobs Outputs

Returns | A Blobs data structure containing the matching blobs sorted by score, or #ERR if any of the input parameters are invalid.
Results | When FindBlobs is initially inserted into a cell, a Closed result table is created in the spreadsheet. Note: If the value of the Number to Find parameter is greater than zero, FindBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

FindBlobs Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the FindBlobs Blobs data structure result table:

Spreadsheet Name | Function Name | Description
Row | GetRow(Blobs, Blob Index) | Returns the y-coordinate (Row) of the referenced blob's center of mass (centroid). Closed EXAMPLE
Col | GetCol(Blobs, Blob Index) | Returns the x-coordinate (Column) of the referenced blob's center of mass (centroid). Closed EXAMPLE
Angle | GetAngle(Blobs, Blob Index) | Returns the angle of the referenced blob's center of mass, relative to the center of the ROI. Closed EXAMPLE
Color | GetColor(Blobs, Blob Index) | Returns the color value (0 = black, 1 = white) of the referenced blob.
Score | GetScore(Blobs, Blob Index) | A measure of how closely the blob matches the criteria of a FindBlobs function.
Area | GetArea(Blobs, Blob Index) | Returns the area of the referenced blob (measured in pixels). Closed EXAMPLE Note: If there are holes in the blob, the Area value will vary depending on whether or not the Fill Holes checkbox is enabled or disabled. For more information, see Fill Holes.
Elongation | GetElongation(Blobs, Blob Index) | Returns a value that represents how the referenced blob's pixels are stretched out from the blob's center of mass (centroid). For instance, a circle would report 0 Elongation, while a nail would have a high Elongation value. Closed EXAMPLE
Holes | GetHoles(Blobs, Blob Index) | Returns the number of holes contained within the referenced blob.
Perimeter | GetPerimeter(Blobs, Blob Index) | Returns the length of the boundary around the referenced blob; the perimeter is calculated by counting the external edges of the pixels that form the boundary of the blob. Closed EXAMPLE
Spread | GetSpread(Blobs, Blob Index) | Returns a value that represents how the referenced blob's pixels are distributed away from the blob's center of mass (centroid). For instance, a circular shaped object would have a lower Spread value than an oval shaped object. Closed EXAMPLE

Additional data elements can be accessed using the following Vision Data Access functions:

Thresh

GetThresh(Blobs)

The Threshold value that was used to segment the image.

NFound

GetNFound(Blobs)

The number of blobs found.

MinRow

GetMinRow(Blobs, Blob Index)

Returns the topmost row coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle function. For more information, see BoundingRectangle.

MinCol

GetMinCol(Blobs, Blob Index)

Returns the leftmost column coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle function.

MaxRow

GetMaxRow(Blobs, Blob Index)

Returns the bottommost row coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle function.

MaxCol

GetMaxCol(Blobs, Blob Index)

Returns the leftmost column coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame.

Note: For an alternative bounding box, with a varied orientation, please refer to the BoundingRectangle function.

FindBlobs Example

The FindBlobs function is used to filter and sort the blobs returned in a Blobs data structure. This example will help to illustrate how the FindBlobs parameter settings can be set to examine a list of blobs, and only return those blobs that match a specified ideal.

A FindBlobs function was inserted into the spreadsheet, which will automatically launch the Closed FindBlobs property sheet. For the purposes of this example, the blobs are being examined and the parameters are being set to return only those blobs with 0 holes in them, regardless of any other criteria.

Based upon these requirements, the FindBlobs parameters would be configured as follows:

  • Blobs: This parameter was set as an absolute cell reference to the previously created DetectBlobs Blobs data structure.
  • Number to Find: This parameter was set to 1, because the image contains only one such blob. Had this parameter been set higher, the cells below the one returned blob would have been #ERR.

  • Accept Thresh: The default setting was used. By using this setting in situations where there is less certainty in regards to the blobs, the lower the threshold guarantees that more blobs will be returned, though their similarity to the ideal decreases.

    Because the blobs are being examined to return only blobs with 0 holes in them, the only parameter that will need to be configured is the Holes parameter. All the other blob properties parameters will be left at their default settings, except for their Weight settings, which will be set to 0.

  • Holes: In this instance the Holes Number value is set to 0, while the Range value is reduced to 0 and the Weight is set to 100. This guarantees that only those blobs in the Blobs data structure with 0 will be returned in the resulting FindBlobs Blobs data structure and Closed result data table.

For more information, see Blobs, DetectBlobs, ExtractBlobs, and SortBlobs.


SortBlobs

SortBlobs is used to sort the blobs referenced in a Blobls data structure in relation to a fixture.

By computing the position of the referenced blob's center of mass (centroid) relative to the specified image fixture coordinate system, SortBlobs sorts the referenced blobs based upon one of their measurement characteristics, such as the blob's distance along the x or y-axis, from a fixture origin or a grid, or the blob's angle or angular distance.

Each blob in the referenced Blobs data structure is examined, and depending upon the Sort By parameter setting, the blob is identified and its position is calculated by measuring either the blob's distance or angular relationship to a fixed location.

Once SortBlobs has sorted the referenced blobs, a new Blobs data structure and accompanying result table will be automatically inserted into the spreadsheet. The result table is sorted by how close the blob is to the chosen fixture, in descending order (the closest blob will be listed first, the next closest second, etc.).

SortBlobs is an extremely helpful function in instances where there are multiple blobs and the position of each blob in relation to the other blobs needs to be determined.

SortBlobs Inputs

Syntax: SortBlobs (Blobs,Number to Sort,Sort By,Fixture.Row,Fixture.Column,Fixture.Theta,Show)

Parameter Description

Blobs

This parameter references the spreadsheet cell that contains the Blobs data structure that is to be sorted. For more information, see Cell References - Relative/Absolute.

Number to Sort

Specifies the maximum number of blobs (1 to 4096; default = 3) to return.

Note: If the value of this parameter is greater than zero, SortBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

Sort By

Specifies how the referenced blobs will be measured and sorted.

0 = X (default)

Sort by distance along the x-axis, from closest to furthest, in descending order.

Closed EXAMPLE

1 = Y

Sort by distance along the y-axis, from closest to furthest, in descending order.

Closed EXAMPLE

2 = Angle

Sort by the angle (0 to 360 degrees), as measured from the x-axis of the fixture coordinate system to the line segment defined by the blob's centroid (center of mass) and the fixture origin, from closest to furthest, in descending order.

Closed EXAMPLE

3 = Angular Distance

Sort by the absolute value of the angle (-180 to 180 degrees), as measured from the x-axis of the fixture coordinate system to a line segment defined by the blob centroid and the fixture origin, from closest to furthest, in descending order.

Closed EXAMPLE

4 = Distance

Sort by the distance from the fixture origin to the blob's centroid, from closest to furthest, in descending order.

Closed EXAMPLE

5 = Grid X

Sort by distance along the fixture's x-axis first, and then by distance along the y-axis, from closest to furthest, in descending order.

Note: SortBlobs will return #ERR if Grid X is selected and the function is referencing an image that has been calibrated to world coordinate values, such as a CalibrateImage or TransBlobsToWorld function's output. Grid X sorting can only be applied to pixel coordinates. To use the Grid X sorting method using world coordinates, the ExtractBlobs function being referenced by the SortBlobs function should reference the output of a TransformImage function, with the SortBlobs function sorting in pixel coordinates. The output data can then be transformed to world coordinates using the TransBlobsToWorld function. For more information, see ExtractBlobs and TransformImage.

Closed EXAMPLE

6 = Grid Y

Sort by distance along the fixture's y-axis first, and then by distance along the x-axis, from closest to furthest, in descending order.

Note: SortBlobs will return #ERR if Grid Y is selected and the function is referencing an image that has been calibrated to world coordinate values, such as a CalibrateImage or TransBlobsToWorld function's output. Grid Y sorting can only be applied to pixel coordinates. To use the Grid Y sorting method using world coordinates, the ExtractBlobs function being referenced by the SortBlobs function should reference the output of a TransformImage function, with the SortBlobs function sorting in pixel coordinates. The output data can then be transformed to world coordinates using the TransBlobsToWorld function. For more information, see ExtractBlobs and TransformImage.

Closed EXAMPLE

7 = Width

Sorts by width values, from the largest to the smallest.

Note:
  • The In-Sight 5605 vision system does not support this parameter option.
  • On the In-Sight 5604 vision system, the Width and Height options are swapped, i.e. Width = 8 and Height = 7.

8 = Height

Sorts by height values, from the largest to the smallest.

Note:
  • The In-Sight 5605 vision system does not support this parameter option.
  • On the In-Sight 5604 vision system, the Width and Height options are swapped, i.e. Width = 8 and Height = 7.

Fixture

Defines the referenced blob's center of mass (centroid) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the referenced blob's center of mass relative to a Fixture ensures that if the Fixture is rotated or translated, the referenced blob will be rotated or translated in relation to the Fixture. For more information, see Fixture.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Show

Specifies the display mode for SortBlobs graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the SortBlobs function is highlighted in the spreadsheet.
1 = result graphics only | Blob outlines will be displayed at all times.

SortBlobs Outputs

Returns | A Blobs data structure containing the sorted blobs, or #ERR if any of the input parameters are invalid.
Results | When SortBlobs is initially inserted into a cell, a result table is created in the spreadsheet. Note: If the value of the Number to Sort parameter is greater than zero, SortBlobs will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 blobs in the Blobs data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end; make sure to increment the index number of any newly-pasted row so that the proper blob is indexed.

SortBlobs Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the SortBlobs Blobs data structure result table. For more information, see Blobs.

Spreadsheet Name | Function Name | Description
Row | GetRow(Blobs, Blob Index) | Returns the y-coordinate (Row) of the referenced blob's center of mass (centroid). Closed EXAMPLE
Col | GetCol(Blobs, Blob Index) | Returns the x-coordinate (Column) of the referenced blob's center of mass (centroid). Closed EXAMPLE
Angle | GetAngle(Blobs, Blob Index) | Returns the angle of the referenced blob's center of mass, relative to the center of the ROI. Closed EXAMPLE
Color | GetColor(Blobs, Blob Index) | Returns the color value (0 = black, 1 = white) of the referenced blob.
Score | GetScore(Blobs, Blob Index) | A measure of how closely the blob matches the criteria of a FindBlobs function. For more information, see FindBlobs.
Area | GetArea(Blobs, Blob Index) | Returns the area of the referenced blob (measured in pixels). Closed EXAMPLE Note: If there are holes in the blob, the Area value will vary depending on whether or not the Fill Holes checkbox is enabled or disabled. For more information, see Fill Holes.
Elongation | GetElongation(Blobs, Blob Index) | Returns a value that represents how the referenced blob's pixels are stretched out from the blob's center of mass (centroid). For instance, a circle would report 0 Elongation, while a nail would have a high Elongation value. Closed EXAMPLE
Holes | GetHoles(Blobs, Blob Index) | Returns the number of holes contained within the referenced blob.
Perimeter | GetPerimeter(Blobs, Blob Index) | Returns the length of the boundary around the referenced blob; the perimeter is calculated by counting the external edges of the pixels that form the boundary of the blob. Closed EXAMPLE
Spread | GetSpread(Blobs, Blob Index) | Returns a value that represents how the referenced blob's pixels are distributed away from the blob's center of mass (centroid). For instance, a circular shaped object would have a lower Spread value than an oval shaped object. Closed EXAMPLE

Additional data elements can be accessed using the following Vision Data Access functions:

Thresh | GetThresh(Blobs) | The Threshold value that was used to segment the image.
NFound | GetNFound(Blobs) | The number of blobs found.
MinRow | GetMinRow(Blobs, Blob Index) | Returns the topmost row coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame. Note: For an alternative bounding box, with a varied orientation, see BoundingRectangle.
MinCol | GetMinCol(Blobs, Blob Index) | Returns the leftmost column coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame. Note: For an alternative bounding box, with a varied orientation, see BoundingRectangle.
MaxRow | GetMaxRow(Blobs, Blob Index) | Returns the bottommost row coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame. Note: For an alternative bounding box, with a varied orientation, see BoundingRectangle.
MaxCol | GetMaxCol(Blobs, Blob Index) | Returns the leftmost column coordinate for a square bounding box around the referenced blob, oriented to the image coordinate frame. Note: For an alternative bounding box, with a varied orientation, see BoundingRectangle.

SortBlobs Example

The SortBlobs function is used to sort the blobs referenced in a Blobs data structure based on the referenced blobs' distance from a fixture. This example will help to illustrate how the SortBlobs parameter settings can be used to sort a set of blobs based upon their position relative to a fixture.

A SortBlobs function was inserted into an empty cell in the spreadsheet, automatically launching the SortBlobs property sheet.

In this example, the parameters are being set to sort the blobs identified in the earlier DetectBlobs example, using the blob returned by the FindBlobs example as a fixture. For more information, see FindBlobs.

Based upon these requirements, the SortBlobs parameters would be configured as follows:

  • Blobs: This parameter was set as an absolute cell reference to the previously created DetectBlobs Blobs data structure.
  • Number to Sort: This parameter was set to 6 because there are 6 known blobs that are being sorted.
  • Sort By: This parameter was set to distance - From the Fixture origin. By choosing this parameter setting, the Fixture parameter will need to be set to determine the starting point for the measurements.
  • Fixture: This parameter was set as cell references to the Row and Column coordinates returned in the FindBlobs example's Blobs data structure. By choosing this parameter setting, this ensures that the measurements and sorting will always originate from the specified feature in the image. It's possible to use another feature in the image, such as an edge, a point or another blob. For instance, in this example, the blob that was returned from the FindBlobs example will be used to set the Fixture coordinates.
  • Show: The default setting was used, which only allows the result graphics to be displayed when the cell containing the Blobs data structure is selected, as in the example below.

After configuring the SortBlobs property sheet, a Blobs data structure and result data table are produced:


Color

The In-Sight Color tools are used to identify and match objects based on color data. The Color tools include the following functions:

  • ExtractColor: Determines the number of pixels present in the region of interest (ROI) that match the selected trained Color Models in the TrainExtractColor color Library.
  • MatchColor: Determines which colors present in the ROI match the trained Colors in the TrainMatchColor color Library.
  • TrainExtractColor: Builds a color Library for use with the ExtractColor function.
  • TrainMatchColor: Builds a color Library for use with the MatchColor function.
Note:
  • You must be connected to a color In-Sight vision system or emulator to enable these Vision Tools.
  • The ExtractColor function must reference a TrainExtractColor ExtractColorLib data structure, and the MatchColor function must reference a TrainMatchColor a MatchColorLib data structure. Otherwise, the functions will return #ERR.

What are the Color Tools?

When are the Color Tools Used?

Why are the Color Tools Used?

How are the Color Tools Used?

ExtractColor

MatchColor

TrainExtractColor

TrainMatchColor


What are the Color Tools?

The ExtractColor and MatchColor tools identify and match objects based on color data, such as examining objects that have the same shape but are composed of different colors or shades of colors. The tools internally generate a histogram projection of the color, with the ExtractColor tool calculating the Peak Color present, and the MatchColor tool calculating the Average Color present, to calculate the color data.

ExtractColor and TrainExtractColor

When developing color machine vision applications, it is often necessary to identify an object based on its distinctive color. However, in real-world conditions, sometimes an object's color is not uniform and instead displays a degree of variability, due to such things as lighting and/or the object's topography, for instance.

The ExtractColor tool can be programmed to take this variability into account when performing its inspection. During the training phase, using the TrainExtractColor function, a Library of complex Color Models are created, which define an aggregate 3D distribution of RGB values. Then, during run-time operation, the ExtractColor function determines the number of pixels present within its ROI that match the trained Color Models created and stored in the Library of the TrainExtractColor function. The Color Model with the highest pixel count is ranked as the best match.

MatchColor and TrainMatchColor

For color machine vision applications where speed is important and the colors being examined are largely uniform, the MatchColor tools provide the necessary speed and accuracy. The MatchColor tools determine the average color in the ROI and compare this value against the stored list of previously trained Colors. During the training phase, using the TrainMatchColor function, a Library of Colors is created, which define the average RGB and HSI values within a ROI. Then, during run-time operation, the MatchColor function determines the average RGB or HSI value present within its ROI that match the trained Colors created and stored in the Library of the TrainMatchColor function. The Color with the highest score is ranked as the best match.


When are the Color Tools Used?

The Color Tools are useful in the following circumstances:

ExtractColor and TrainExtractColor

  • The ExtractColor tools are most effective when used on objects that are composed of various shades and colors.
  • The ExtractColor tools are slower than the MatchColor tools, but are more accurate and able to discern more complex colors and subtle variations.
  • The ExtractColor function outputs an image that can be referenced by other In-Sight Vision Tools.

MatchColor and TrainMatchColor

  • The MatchColor tools are most effective when used on objects with a more or less uniform/solid color.
  • The MatchColor tools are faster than the ExtractColor tools, and provide 24-bit resolution.


Why are the Color Tools Used?

The color analysis of the Color Tools can be extremely useful in applications such as the following:

ExtractColor and TrainExtractColor

  • Part Presence/Absence Applications: The ExtractColor tools can be configured to determine if an object is present or absent based on the pixel count of the referenced Color Model with which the object is associated. If the pixel count data does not provide sufficient data, the ExtractColor function can be configured to output a binary image, which can be referenced by an ExtractBlobs function to ensure that the blob of binary pixels output by the ExtractColor function fall within the blob tolerances set for the object.
  • Part Identification: The ExtractColor tools can be configured to identify which object is present by calculating the distinctive color(s) of the part. In this type of application, the Color Model with the highest pixel count is considered to be the Color Model that represents the object present in the image.

MatchColor and TrainMatchColor

  • Color Verification: The MatchColor tools can be configured to quantify how closely the ROI in the current image corresponds to the Library of trained Colors. The goal is to ensure that difference between the color in the ROI and the trained Colors is minor.
  • Part or Color Matching: In this type of application, the MatchColor tool is configured to report the Color that is the best match to the current Color in the image. A match score is used to rank each trained Color, and the Color with the highest match score is determined to be the best match.


How are the Color Tools Used?

The Color Tools are typically used in the following manner:

  1. Examine the object and determine if its color data would be better analyzed by the ExtractColor or MatchColor tools.
  2. Insert a TrainExtractColor or TrainMatchColor function into the spreadsheet and build a Library of trained colors.
  3. Insert an ExtractColor or MatchColor function into the spreadsheet to compare live images against the trained Library.


ExtractColor

The ExtractColor function, referencing a ExtractColorLib data structure returned by a TrainExtractColor function, determines the number of pixels present in the Region of Interest (ROI) that match the selected trained Color Models in the TrainExtractColor color Library. For more information, see TrainExtractColor. The extracted Color Model corresponds to the Color Model with the highest pixel count.

The ExtractColor function outputs a Colors data structure, which contains the pixel count of the extracted Color Model and an output image that can be referenced by other In-Sight Vision Tools. For more information, see Vision Tools.

ExtractColor Inputs

Syntax: ExtractColor(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region,Extract Color Library,Count Pixels,Output Image,Show)

General Tab

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference either a valid color Image data structure output by the AcquireImage function, or a Colors data structure output by another ExtractColor function. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Note: This parameter must reference a color image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.
Note: In order for a pixel to be counted, it must be completely enclosed within the image region; partially enclosed pixels are not included.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Extract Color Library

Specifies a reference to a TrainExtractColor function that contains the desired color Library and Color Models.

Note: This must be a reference to a TrainExtractColor ExtractColorLib data structure. This function cannot reference a MatchColorLib data structure output by a TrainMatchColor function; the ExtractColor function will return #ERR in this condition.

Count Pixels

Specifies if pixel counting is turned on or off.

Note: If pixel counting is not required, turn the parameter off to save processing time. If only pixel counting is required, turn this parameter on and set the Output Image parameter to No Image for the fastest processing time and the least impact to memory.
0 = OFF | Pixel counting is turned off.
1 = ON (default) | Pixel counting is turned on.

Output Image

Indicates the type of image to be output. The output image may be referenced by other In-Sight Vision Tools in the Image parameter.

All graphics will be hidden, except when the cell containing the ExtractColor function is the active cell in the spreadsheet.

0 = Marked Image

Specifies that a marked image will be output. In this output image, any pixel that matches an active Color Model is set to the marked color, which is the color opposite the peak of the first color present in the Color Model.

Note: While providing highly useful user feedback information, this output image requires the largest amount of processing time.

1 = Binary Image (default)

Specifies that a binary, greyscale image will be output. In this output image, any pixel that matches an active Color Model is set to White(255), while all other pixels are set to Black(0). This image may be used by other In-Sight Vision Tools, such as the ExtractBlobs function. For more information, see ExtractBlobs.

Note: This output image is the fastest of the image outputs and presents the least impact to memory.

2 = Color Image

Specifies that a color image will be output. In this output image, any pixel that matches an active Color Model will retain its original value, while all other pixels are set to 0,0,0 (RGB). This image may be used by other In-Sight Vision Tools.

Note: This output image is 4 times the size of the Binary Image, as it contains RGB and Intensity data.

3 = No Image

Specifies that no image will be output.

Note: This setting is applicable in jobs that require the fastest execution time. If only pixel counting is required, turn the Count Pixels parameter On and set the Output Image parameter to No Image for the fastest processing time and the least impact to memory.

Show

Specifies the display mode for ExtractColor graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the ExtractColor function is the active cell in the spreadsheet.
2 = result graphics only | The input image region will be displayed at all times.
3 = input and result graphics | Both the input image region and the outlines of extracted colors will be displayed at all times.

Color Models Tab

Specifies the Color Models to be extracted from the referenced TrainExtractColor ExtractColorLib data structure; by default, all of the trained Color Models in the referenced Library are automatically enabled.

Note: The Color Models can also be enabled from the spreadsheet, using the SetExtClrColorModelState function. For more information, see SetExtClrColorModelState(Colors, Enable, ColorModelName1, [ColorModelName2,...]).

ExtractColor Outputs

Returns | A Colors data structure containing the pixel count and an output image (unless No Image was specified in the Output Image parameter); or #ERR if any of the input parameters are invalid.
Results | When ExtractColor is initially inserted into a cell, a result table is created in the spreadsheet.

ExtractColor Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Hist.

Index | GetExtClrModelByRank(Color, Rank) | The Color Model index by rank.
Extract Model Color | GetActiveExtClrModelName(Color, Index) | The Color Model name by index.
Pixel Count | GetPixelCountByIndex(Color, Index) | The pixel count by index.
Overall Pixel Count | GetOverallPixelCount(Color) | The pixel count for all active Color Models.

Use the ExtractColor Tool


Use the ExtractColor Tool

In this example, the TrainExtractColor and ExtractColor functions will be used to determine whether the object in the image is a red apple or an orange, based on the pixel count. For more information, see TrainExtractColor and ExtractColor.

Open the ExtractColor Training Dialog

  1. Right-click an empty cell in the spreadsheet and select Insert Function to open the Insert Function dialog.
  2. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.
  3. Select the Color tool category.

  4. Select the TrainExtractColor function from the Function List and press the OK button or double-click on the function.

  5. The ExtractColor Training dialog appears.

Add a Color Model

  1. A Color Model is a collection of Colors that are used to define an object and the background in an image. Each Color Model represents a 3D color space in which you add or subtract the RGB values of Colors of the object and background you are acquiring. When more than one Color Model is used, the Color Models are ranked in the results.

  2. Click New Model under Color Models. The new Color Model is added to the Library with the default name Model_1.
  3. If desired, rename the Color Model name when you initially add it. You can rename a Color Model at any time by highlighting it and clicking the rename button [image] above the Library list.

  4. If needed, you can delete a Color Model by highlighting it and clicking the delete [image] button.

Add and Subtract Colors in a Color Model

  1. Select the Color Model to modify by clicking on the Color Model's name.
  2. In the Train section of the dialog, select the shape of the Region of Interest (ROI) that you will use to define the Color: Region, Circle, Annulus, Polygon, or Freehand. For this example, a Circle ROI will be used.

  3. Press the Add New Color button to enter interactive graphics mode and position the Circle ROI within the image so that it includes the RGB values that you want to add. For more information, see Interactive Graphics Mode.

  4. Press the OK button in the Job Edit toolbar once you have configured the ROI. The Color added to the Color Model contains the peak RGB values from within the ROI you defined.
  5. If there are any colors that you do not want included in the Color Model, repeat the above process but click the Subtract New Color button instead. In this example, the shadow and white background are subtracted.

  6. Use the up and down areas to change the order of operations of the colors in your Color Model. The first Color applied to the inspection is listed first.

Adjust Color Tolerance

The Image Marking shows you how much of your object is detected. You can increase or decrease the sensitivity by using the Darker, Lighter, Highlights, and Hues settings in the Color Tolerance section of the dialog.

Darker | Increasing the Darker setting adds space to the color toward Black (0,0,0).
Lighter | Increasing the Lighter setting adds space to the color toward White (255,255,255).
Highlights | Increasing the Highlights setting adds space to the color from the initial color position toward White (255,255,255).
Hues | Increasing the Hues setting increases the 3D "box" of the initial color in 3 dimensions in the color space.

Notice that the changes in the Color Tolerance settings increases the number of pixels detected in the apple image.

Use Multiple Color Models

  1. Add a second Color Model to the Library. The first Color Model counts red pixels that you would find in the image of a red apple. The second Color Model will be set up to detect pixels in the image of an orange.
  2. Select the ROI you will use to define the Color: Region, Circle, Annulus, Polygon, or Freehand. For this example, a Circle ROI will be used.
  3. Press the Add New Color button to enter interactive graphics mode and position the Circle ROI within the image so that it includes the RGB values that you want to add. In this example, the orange's color is fairly uniform and the circle can include most of it.
  4. Press the OK button in the Job Edit toolbar once you have configured the ROI.
  5. Finally, adjust the Color Tolerance settings until most of the orange is highlighted.

Image Marking

The Image Marking buttons at the bottom of the dialog allow you to set what is highlighted in the image when you are adding Colors and Color Models. The setting you choose is applied to the active (highlighted) Color Model in your Library.

Entire Group | All of the Colors in your Color Model are marked in the image.
Up to Selected Color | If you select the second Color in a list of three, the first and second Colors are marked in the image.
Selected Color Only | Only the selected Color is marked in the image.

Add the ExtractColor Function

In this example, the inspection can determine if the fruit in the image is an apple or orange based on the pixel count for the associated model.

  1. Click the OK button in the TrainExtractColor dialog.
  2. Right-click an empty cell in the spreadsheet and select Insert Function to open the Insert Function dialog.
  3. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.
  4. Select the Color tool category.
  5. Select the ExtractColor function from the Function List and press the OK button or double-click on the function.

  6. The ExtractColor property sheet appears.

  7. In the Extract Color Library parameter, insert a cell reference to the ExtractColorLib data structure returned by the TrainExtractColor function. This cell contains the Color Models that will be used by the ExtractColor function.
  8. Once the parameters are configured, press the OK button to close the property sheet.

  9. The results for the apple image are show below.

  10. The results for the orange image are shown below.


MatchColor

The MatchColor function, referencing a MatchColorLib data structure returned by a TrainMatchColor function, determines which Colors present in the Region of Interest (ROI) match the trained Color(s) in the TrainMatchColor color library. The MatchColor function outputs a Colors data structure, which contains the color distance and match score, in addition to an overall confidence score, for each active Color referenced in the MatchColorLib data structure.

MatchColor Inputs

General Tab

MatchColor(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region,Match Color Library,Color Space,Show)

Note:
  • In order for a pixel to be counted, it must be completely enclosed within the image region; partially enclosed pixels are not included.
  • The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies the color image reference. This argument must reference either the valid color Image data structure output by the AcquireImage function, or a Colors data structure output by another MatchColor function. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage.

Note: This parameter must reference a color image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Match Color Library

Specifies a reference to a TrainMatchColor function that contains the required Colors. For more information, see TrainMatchColor.

Note: This must be a reference to a TrainMatchColor MatchColorLib data structure. This function cannot reference an ExtractColorLib data structure output by a TrainExtractColor function. The MatchColor function will return #ERR in this condition.

Color Space

Specifies the color space that the function will use to measure color distance.

0 = RGB (default) | The function will operate in RGB color space.
1 = HSI | The function will operate in HSI color space. Note: The HSI values returned by the ExtractColorHistogram function may differ from the HSI values returned by the MatchColor and TrainMatchColor functions. The MatchColor and TrainMatchColor functions average the pixels before HSI processing while the ExtractColorHistogram function averages the pixels after HSI processing; the divergence will increase with the color randomness found in the image.

Show

Specifies the display mode for MatchColor graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the MatchColor function is the active cell in the spreadsheet.
2 = input graphics only | The input image region will be displayed at all times.

Colors Tab

Specifies the Colors to be extracted from the referenced TrainMatchColor MatchColorLib data structure; by default, all of the trained Colors in the referenced Library are automatically enabled.

Note: The Colors can also be enabled from the spreadsheet, using the SetMatchClrColorState function. For more information, see Color.

MatchColor Outputs

Returns | A Colors data structure containing the RGB and HSI color distances of the active Colors to the average color in the ROI, or #ERR if any of the input parameters are invalid.
Results | When MatchColor is initially inserted into a cell, a result table is created in the spreadsheet.

MatchColor Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Color.

Index | GetMatchClrColorByRank(Colors, Rank) | The color index by rank.
MatchColor Color | GetActiveMatchClrColorName(Colors, Index) | The name by index.
Score | GetMatchClrScoreByIndex(Colors, Index) | The color score by index.
Color Distance | GetMatchClrDistByIndex(Colors, Index) | The color distance by index.
Confidence Score | GetConfidenceScore(Colors) | The confidence score for the inspection.

Use the MatchColor Tool


Use the MatchColor Tool

In this example, the MatchColor tool will be used to determine if colors are present in the image.

Open the MatchColor Training Dialog

  1. Right-click an empty cell in the spreadsheet and select Insert Function to open the Insert Function dialog.
  2. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.
  3. Select the Color tool category.

  4. Select the TrainMatchColor function from the Function List and press the OK button or double-click on the function.

    The MatchColor Training dialog appears.

Add Colors

  1. In the Train section of the dialog, select the shape of the Region of Interest (ROI) that you will use to define the Color: Region, Circle, Annulus, Polygon, or Freehand. For this example, a Circle ROI will be used.

  2. Press the Add New Color button to enter interactive graphics mode and position the Circle ROI within the image so that it includes the colors that you want to add.

  3. Press the OK button in the Job Edit toolbar once you have configured the ROI. The Color added to the Library contains the average of all the colors within the ROI you defined. For this example, the tolerance settings, the darker and lighter limits are set to 1.0 and 1.0, respectively, because the green and the blue that we'll set next are similar.

  4. Repeat the process for any other red and blue colors. The lighter and darker tolerances for blue and red are set to 1.0 and 1.0.

  5. Once the Colors have been finalized, click the OK button in the TrainMatchColor dialog to close it.

Add the MatchColor Function

  1. Right-click an empty cell in the spreadsheet and select Insert Function to open the Insert Function dialog.

  2. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.

  3. Select the Color tool category.

  4. Select the MatchColor function from the Function List and press the OK button or double-click on the function.

  5. The MatchColor property sheet appears.

  6. In the Match Color Library parameter, insert a cell reference to the MatchColorLib structure returned by the TrainMatchColor function. This cell contains the Color Library that will be used by the MatchColor function.

  7. Once the parameters are configured, press the OK button to close the property sheet.

  8. The results for the green image are shown below.

  9. The results for the blue image are shown below.

  10. The results for the red image are shown below.

In this example, the inspection determines the color (green, blue, or red) based on the color distance score.


TrainExtractColor

Extracts and trains Color Models from an image region for use with the ExtractColor function. TrainExtractColor trains Colors within the Color Models, and then the ExtractColor function is used to identify the Color Model present in the image. For more information, see ExtractColor.

The TrainExtractColor function is used to build a color Library (configured in the Training tab of the ExtractColor Training dialog). The Library may contain up to 100 distinct Color Models, which are composed of individual Colors.

A Color Model defines an aggregate 3D distribution of RGB values, and is constructed by sequentially adding and/or subtracting individual Color distributions.

A Color defines the 3D distribution of RGB values based on the peak RGB value present within the region of interest (ROI) at the time the Color was trained. The distribution can be expanded or contracted, based on the individual Color Tolerances settings, and added to or subtracted from the aggregate distribution defined in the Color Model.

When defining a Color during the training phase, the TrainExtractColor function internally generates a 3D color histogram of the colors present within the ROI. The function then determines the Peak Color within the ROI. Figure 1 shows the 3D color histogram of an image of a washer. The data in the histogram illustrates that instead of being composed of a single color, the washer's color occupies a three dimensional distribution of many colors within the RGB space.

Closed Figure 1- 3D RGB Histogram of a Washer

The 3D histogram represents a dichromatic reflection, which is composed of the light that is reflected from the material surface and the light reflected from the material body.

  • The Peak Color area represents the location in the histogram with the highest concentration of matching pixels.
  • The Darker/Lighter Line corresponds to the light reflected from the body of the object, and is represented as a line that connects the origin (Black; 0,0,0) to the Peak Color, and then extends beyond to the limits of the histogram.
  • The Highlight Line represents the surface reflection component, and extends from the Peak Color to the limits of the histogram along the illumination vector (White; 255,255,255).

Peak Color and Hues

When a Color is first trained, the function performs a statistical analysis of the individual colors present in the ROI. The Peak Color is determined, and the standard deviation from the Red, Green and Blue channels is calculated. This calculation is referred to as the sigma factor, and adjusting the Hues control will set the number of standard deviations from the Peak Color that a Color must be within to be considered part of the trained Color, creating upper and lower limits on the RGB color channels. For example, if the Hues control was set to a sigma factor of 3, any pixel whose RGB values are within 3 standard deviations from the Peak Color will be counted as a match for that Color.

Darker/Lighter Line

Adjusting the Darker/Lighter controls allows you to expand the model beyond the bounds of the Peak Color and sigma factor to include more variations of the Color along the Darker/Lighter Line. These controls allows you to include/exclude RGB values that maintain the proportionality of the Peak Color, but have greater or lesser intensity. These colors are contained within a volume that extends from the apex, located at the origin, to the limits of the histogram, and encompasses the Peak Color. Figure 2 illustrates the 3D histogram from Figure 1, but with the Darker/Lighter Limits in place. The Darker/Lighter Line of the Color is limited by the Darker/Lighter Limit values, which are set as a percentage of the color magnitude (the Euclidian distance from the Peak Color to the origin). A separate percentage is calculated for the range values of the Darker and Lighter Limits.

Closed Figure 2 - Darker/Lighter Limits on a 3D Histogram

Highlight Line

Adjusting the Highlights controls expands the number of colors that are considered to belong to the Color. The additional colors are contained within a volume that starts at the Peak Color, has a width equal to the that of the Darker/Lighter volume, and encompasses the Highlight line, as illustrated in Figure 3. The Highlight Line's upper limit is the only adjustable limit, and it is set as a percentage of the color magnitude.

Closed Figure 3 - Highlight Limits on a 3D Histogram

TrainExtractColor Training Tab

Note: The parameters in this section are used to configure the training of Color Models while the In-Sight color vision system is Offline.

The Training tab controls are used to manually train Colors and Color Models for the Library.

Color Models Controls

Library Directory Structure

The Library directory structure displays the Color Models in the Library.

  • New Model: Adds a new Color Model to the Library.
  • Rename: Allows the default Color Model name (Model_1) to be modified.
  • Delete Model: Removes the selected Color Model from the Library.

Colors Table

The Colors table displays the Colors of the selected Color Model in the Library window, and the Color's Name, RGB values and Operation.

  • Rename Color: Allows the default Color name (Color_1) to be modified.
  • Include Color: Specifies an additive Operation of the Color within the Color Model.
  • Exclude Color: Specifies a subtractive Operation of the Color within the Color Model.
  • Move Color Down: Moves the selected Color down in the list of Colors within the Color Model.
  • Move Color Up: Moves the selected Color up in the list of Colors within the Color Model.
  • Delete Color: Removes the selected Color from the list of Colors within the Color Model.

Train Controls

Specifies how the Color will be trained, the ROI used to define the Color and the Operation of the Color within the Color Model.

  • Most Dominant Color: Specifies that one Color within the defined Color Model is trained, and will be added or subtracted from the Color Model, depending on which button is pressed (Add New Color/Subtract New Color).

  • Multiple Colors: Specifies that the function will automatically populate the Color Model with Colors, according to the RGB data present in the ROI, and assigns an additive or subtractive operation depending on which button is pressed (Add New Color/Subtract New Color) to the newly created Colors. The properties of the individual Colors may then be configured.

    Note: This parameter enables the Minimum Color Area and Smooth Image First parameters.

  • Smooth Image First: Specifies the image smoothing factor (0-10; default = 1), reducing image noise, to be applied prior to training.

    Note: This control is only enabled when Multiple Colors is selected.

  • Minimum Color Area (%): Specifies the minimum number of pixels (1 to 80; default = 2) within the ROI that the Color must occupy to be trained, as a percentage of the total number of pixels within the ROI.

    Note: This control is only enabled when Multiple Colors is selected.
  • Select Region: Specifies that a rectangular ROI will be used to define the Color(s).
  • Select Circle: Specifies that a circular ROI will be used to define the Color(s).
  • Select Annulus: Specifies than an annulus ROI will be used to define the Color(s).
  • Select Polygon: Specifies that a polygon ROI will be used to define the Color(s).
  • Draw Freehand: Specifies that a free-hand shape ROI will be used to define the Color(s).
  • Add New Color: Specifies an Add Operation for the Color(s).
  • Subtract New Color: Specifies a Subtract Operation for the Color(s).

Color Tolerance Controls

Specifies the tolerances for the selected Color(s).

Tip: When configuring the Color Tolerance controls, position the TrainExtractColor property sheet so that you can easily view the image. As you adjust the controls, the image will update to reflect the changes, depending on the type of Image Marking selected.
  • Darker: Specifies the lower limit (0 to 1.0; default = 1.0). This setting expands the color distribution proportionally lower along a line passing through 0,0.0 and the Peak Color.
  • Lighter: Specifies the upper limit (1.0 to 10.0; default = 1.0). This setting expands the color distribution proportionally higher along a line passing through 0,0.0 and the Peak Color.
  • Highlights: Specifies the highlight limit (1.0 to 10.0; default = 1.0) for training. This setting, beginning at the peak color, expands the Color distribution higher and towards saturation (255,255,255).
  • Hues: Specifies the sigma factor (0.0 to 10.0; default = 2.0) for Single Color training. This setting expands the color distribution to allow colors that are similar to the peak color to be included. The sigma factor refers to the standard deviation calculation that is performed internally at the time of training for each color plane. The Hue Limit sets the number of standard deviations about the peak color in each of the three color planes. A Hue Limit of 2.0, for example, sets a box around the peak color of ±1 standard deviation for each color plane.

Image Marking Controls

Specifies the display of the Color(s) in the image.

  • Mark Results for Entire Group: Specifies that all of the Colors in the Color Model are marked in the image.
  • Mark Results up to Selected Color: If you select the second Color in a list of three, the first and second Colors are marked in the image.
  • Mark Selected Colors Only: Only the selected Color is marked in the image.

TrainExtractColor Image Tab

The Image tab is used to specify the image that will be used to train the Color Models in the Library.

Note: The parameters in this section are used to configure the training of Color Models while the In-Sight color vision system is Offline.
  • Start Live: Places the vision system into Live Video mode to display a real-time image.
  • Open Image...: Loads an image from any networked vision system, local PC or networked PC.

TrainExtractColor External Training Tab

The External Training tab is used to configure re-training parameters for external training.

Note: The parameters in this section are used to configure the re-training of color models while the In-Sight color vision system is Online.

TrainExtractColor Inputs

Syntax: TrainExtractColor(Image,Event,External Region,Retrain Operation,Retrain Procedure,Retrain Mode,Color Model Name,Darker Limit,Lighter Limit,Highlight Limit,Hue Limit,Minimum Color Area,Smoothing)

Parameter Description

Image

Specifies the color image reference. This argument must reference either:

  • The valid color Image data structure output by the AcquireImage function. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage.
  • A Color data structure output by an ExtractColor function.
Note: This parameter must reference a color image.

Event

Specifies the update event on which to train a Color Model. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Retrain Operation

Specifies the Operation of the Color within the Color Model.

0 = Add | The newly trained Color will have an Add Operation in the Color Model.
1 = Subtract | The newly trained Color will have a Subtract Operation in the Color Model.

Retrain Procedure

Specifies the method used to add new Colors to the Color Model.

0 = Append to existing colors (default) | Add the new Color to the existing Colors in the Color Model.
1 = Delete existing colors and append | All previous Colors will be deleted and the new Color will be added to the Color Model.

Retrain Mode

Specifies the training mode.

0 = Single Color (default) | One Color within the defined Color Model is trained, and will be added or subtracted from the Color Model, depending on the Retrain Operation parameter setting.
1 = Multi Color | The function will automatically populate the Color Model with Colors, according to the RGB data present in the ROI, and assigns the property set in the Retrain Operation parameter (Add/Subtract) to the newly created Colors. The properties of the individual Colors may then be configured. Note: This parameter enables the Minimum Color Area and Smoothing parameters.

Color Model Name

Specifies the name of the Color Model, set in the Training tab, to re-train for Online re-training. If the Color Model does not exist, a new Color Model is created.

Darker Limit

Specifies the lower limit (0 to 1.0; default = 1.0) for Online training. This setting expands the color distribution proportionally lower along a line passing through 0,0.0 and the peak color.

Lighter Limit

Specifies the upper limit (1.0 to 10.0; default = 1.0) for Online training. This setting expands the color distribution proportionally higher along a line passing through 0,0.0 and the peak color.

Highlight Limit

Specifies the highlight limit (1.0 to 10.0; default = 1.0) for Online training. This setting, beginning at the peak color, expands the Color distribution higher and towards saturation (255,255,255).

Hue Limit

Specifies the sigma factor (0.0 to 10.0; default = 2.0) for Single Color Online training. This setting expands the color distribution to allow colors that are similar to the peak color to be included. The sigma factor refers to the standard deviation calculation that is performed internally at the time of training for each color plane. The Hue Limit sets the number of standard deviations about the peak color in each of the three color planes. A Hue Limit of 2.0, for example, sets a box around the peak color of ±1 standard deviation for each color plane.

Note: This parameter is only enabled when the Retrain Mode parameter is set to Single Color.

Minimum Color Area

Specifies the minimum number of pixels (1 to 80; default = 2) within the ROI that the Color must occupy to be trained, as a percentage of the total number of pixels within the ROI.

Note: This parameter is only enabled when the Retrain Mode parameter is set to Multi Color.

Smoothing

Specifies the image smoothing factor (0-10; default = 1), reducing image noise, to be applied prior to training.

Note: This parameter is only enabled when the Retrain Mode parameter is set to Multi Color.

TrainExtractColor Outputs

Returns

An ExtractColorLib data structure containing the Color Model(s) trained for the ExtractColor tool, or #ERR if any of the input parameters are invalid.

TrainExtractColor Vision Data Access Functions

The following data elements can be accessed using Vision Data Access functions. For more information, see Color.

GetNTrainExtClrModels(ExtractColorLib) | Returns the number of Color Models in the TrainExtractColor tool generated ExtractColorLib data structure.
GetTrainExtClrModelName(ExtractColorLib,[Index]) | Returns the name of the indexed Color Model in the TrainExtractColor tool generated ExtractColorLib data structure.
GetColorLibraryName(ExtractColorLib) | Returns the name of the color Library from the referenced ExtractColorLib data structure.


TrainMatchColor

Extracts and trains Colors from an image region for use with the MatchColor function. TrainMatchColor trains Colors within the Library, and then the MatchColor function is used to identify the Color present in the image based on the color distance between the current image and the trained Color(s). For more information, see MatchColor.

The TrainMatchColor function is used to build a Color Library (configured in the Training tab of the MatchColor Training dialog). The Library may contain up to 100 distinct Colors, which are composed of RGB/HSI values of the object being examined.

Colors are defined by a region of interest (ROI), and they store the average RGB and HSI values contained within the ROI at the time of training. Each individual Color defines a single color in the color space. By adjusting the Color Tolerance controls, a Color may be configured to consider lighter or darker shades of the Color as a match.

In the RGB color space, the Darker and Lighter limits are based on the color magnitude of the trained Color. The color magnitude can be expressed as the length of a vector starting at the origin and ending at the trained Color; a value of 1 corresponds to the trained Color, while a value of 0.5 corresponds to half of the trained Color.

In the HSI color space, the Darker and Lighter limits are based solely on the Intensity plane. If the Intensity component of the object being currently examined falls within the Darker and Lighter limits of the trained Color, then the color distance for the object is determined based solely on Hue and Saturation. If the Intensity component falls outside of the Darker and Lighter limits, then the color distance is based on Hue, Saturation and the difference between the current Intensity value and the closest Darker or Lighter limit.

Note: The HSI values returned by the ExtractColorHistogram function may differ from the HSI values returned by the MatchColor and TrainMatchColor functions. The MatchColor and TrainMatchColor functions average the pixels before HSI processing while the ExtractColorHistogram function averages the pixels after HSI processing; the divergence will increase with the color randomness found in the image.

TrainMatchColor Training Tab

Note: The parameters in this section are used to configure the training of Colors while the In-Sight color vision system is Offline.

The Training tab controls are used to manually train Colors for the Library.

Library Name

  • Library Name: Specifies the name of the Library (the default name is "Library").

Colors Table

The Colors table displays the Colors of the Library. The table displays the Color's name, RGB and HSI values.

  • Rename Color: Allows the default Color name (Color_1) to be modified.
  • Delete Color: Removes the selected Color from the Library.

Train Controls

The Train controls are used to add and retrain Colors and specifies the ROI used to define the Color.

  • Select Region: Specifies that a rectangular ROI will be used to define the Color.
  • Select Circle: Specifies that a circular ROI will be used to define the Color.
  • Select Annulus: Specifies than an annulus ROI will be used to define the Color.
  • Select Polygon: Specifies that a polygon ROI will be used to define the Color.
  • Draw Freehand: Specifies that a free-hand shape ROI will be used to define the Color.
  • Select Point: Specifies a point in the image that will be used to define the Color.
  • Add New Color: Specifies that a new Color will be added to the Library.
  • Retrain Color: Specifies that the selected Color will be retrained.

Color Tolerance Controls

Specifies the tolerances for the selected Color.

Tip: When configuring the Color Tolerance controls, position the TrainMatchColor property sheet so that you can easily view the image. As you adjust the controls, the image will update to reflect the changes.
  • Darker: Specifies the Darker Limit (0 to 1.0; default = 1.0). When the MatchColor function's Color Space parameter is set to RGB, the Darker limit expands the trained Color proportionally lower along a line from (0,0,0) to the trained color's RGB value. When the Color Space is set to HSI, the Darker limit expands the Intensity value of the trained Color lower.
  • Lighter: Specifies the Lighter Limit(1.0 to 10.0; default = 1.0). When the MatchColor function's Color Space parameter is set to RGB, the Lighter limit expands the trained Color proportionally higher along a line from (0,0,0) to the trained color's RGB value. When the Color Space is set to HSI, the Lighter limit expands the Intensity value of the trained Color higher.

TrainMatchColor Image Tab

The Image tab is used to specify the image that will be used to train the Colors in the Library.

Note: The parameters in this section are used to configure the training of Color Models while the In-Sight color vision system is Offline.
  • Start Live: Places the vision system into Live Video mode to display a real-time image.
  • Open Image...: Loads an image from any networked vision system, local PC or networked PC.

TrainMatchColor External Training Tab

The External Training tab is used to configure re-training parameters for external training.

Note: The parameters in this section are used to configure the re-training of Colors while the In-Sight color vision system is Online.

TrainMatchColor Inputs

Syntax: TrainMatchColor(Image,Event,External Region,Color Name,Darker Limit,Lighter Limit)

Parameter Description

Image

Specifies the color image reference. This argument must reference either:

  • The valid color Image data structure output by the AcquireImage function. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage.
  • A Color data structure output by a MatchColor function.
Note: This parameter must reference a color image.

Event

Specifies the update event on which to train a Color Model. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

External Region

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Color Name

Specifies the name of the Color, set in the Training tab, to re-train for Online re-training. If the Color does not exist, a new Color is created.

Darker Limit

Specifies the Darker Limit for Online training. When the MatchColor function's Color Space parameter is set to RGB, the Darker limit expands the trained Color proportionally lower along a line from (0,0,0) to the trained color's RGB value. When the Color Space is set to HSI, the Darker limit expands the Intensity value of the trained Color lower.

Lighter Limit

Specifies the Lighter Limit for Online training. When the MatchColor function's Color Space parameter is set to RGB, the Lighter limit expands the trained Color proportionally higher along a line from (0,0,0) to the trained color's RGB value. When the Color Space is set to HSI, the Lighter limit expands the Intensity value of the trained Color higher.

TrainMatchColor Outputs

Returns

A MatchColorLib data structure containing the Colors trained for the MatchColor tool, or #ERR if any of the input parameters are invalid.

TrainMatchColor Vision Data Access Functions

The following data elements can be accessed using Vision Data Access functions. For more information, see Color.

GetNTrainMatchClrColors(MatchColorLib) | Returns the number of Colors in the TrainMatchColor tool generated MatchColorLib data structure.
GetTrainMatchClrColorName(MatchColorLib,[Index]) | Returns the name of the indexed Color in the TrainMatchColor tool generated MatchColorLib data structure.
GetColorLibraryName(Colors or MatchColorLib) | Returns the name of the color Library from the referenced MatchColorLib data structure.


Edge

In machine vision terminology, an edge is defined as the boundary (either a line, arc or circle) between two adjacent pixel groups with contrasting greyscale values. The In-Sight Edge Tools are used to detect and process statistics about the found edges. In-Sight vision systems perform edge detection and processing using the Edge Tool's functions:

  • Caliper: Measures the width between edges, locates edges and the location and spacing of edge pairs within a Region of Interest (ROI), based upon an edge model.
  • FindCircle: Locates a single circular edge within an annular (shaped like a circle or ring) ROI.
  • FindCircleMinMax: Inspects the circularity of a continuous edge.
  • FindCurve: Locates a single arced edge within a bent ROI.
  • FindLine: Locates a single straight-line edge within a ROI.
  • FindMultiLine: Locates multiple straight-line edges within a ROI.
  • FindSegment: Locates a pair of straight-line edges within a ROI.
  • PairDistance: Computes the distance between two edges.
  • PairEdges: Sorts arrays of edges into arrays of edge pairs.
  • PairMaxDistance: Finds the maximum edge pair distance.
  • PairMeanDistance: Computes the mean edge pair distance.
  • PairMinDistance: Finds the minimum edge pair distance.
  • PairSDevDistance: Computes the standard deviation of edge pair length.
  • PairsToEdges: Converts an array of edge pairs into an array of edges (by averaging.)
  • SortEdges: Sorts edges by a specific criterion.

What is Edge Detection?

When are Edge Tools Used?

Why are Edge Tools Used?

How to Use the Edge Tools

Caliper

FindCircle

FindCircleMinMax

FindCurve

FindLine

FindMultiLine

FindSegment

PairDistance

PairEdges

PairMaxDistance

PairMeanDistance

PairMinDistance

PairSDevDistance

PairsToEdges

SortEdges


What is Edge Detection?

The In-Sight Edge Tool functions detect edges by examining a region of interest (ROI) for discontinuities in pixel polarity, i.e. an area in the image where there is an abrupt change between light and dark (or vice versa) pixels. An edge might only span two or three pixels, or several.

Edge Example

Edges can be comprised of a single edge, or a pair of edges, which consists of two transitions from dark to light or light to dark. The following figure shows the types of edges:

When an Edge Tool, such as a Caliper, FindLine or FindCircle function, is inserted into the spreadsheet, the ROI is scanned for any pixel value discontinuities. The figure below illustrates the direction in which rectangular and annular regions are scanned for edge features. In the rectangular region, the scan direction (the scan direction is indicated by the two directional arrows) starts from the upper-most left-hand corner, and proceeds to the end of the right-hand side, and then continues the pattern until it reaches the bottom right-hand corner.

Scan Directions - Rectangular and Annular Regions

During this process, a greyscale histogram is computed of the ROI, and areas defined by high contrast (the difference between greyscale values found within the ROI) and meeting the other specified parameters, define an edge.

The edge response chart (displayed when the Show parameter is set to show all: input, result, and chart) displays the first derivative of the greyscale values found in the ROI; with peaks and valleys representing the major edge transitions, as shown in the figure below. The Accept Thresh/Minimum Contrast parameter is used to set a minimum peak height (contrast threshold). With this set, any peaks that are lower than the minimum peak height are excluded from the results. This allows the inspection analysis to be limited to just those edges in the image that are of a certain magnitude. Use the function's edge response chart to determine the correct contrast threshold.

Edge Response Chart Example

  • The Score axis is defined by the Score (100 and -100) and the Accept Threshold parameter set for the tool. Peaks (or positive scores) indicate that the edge transitions from dark to light, while valleys (or negative scores) indicate that the edge transitions from light to dark (a score of 0 indicates no edge was detected).
  • The Offset axis refers to the ROI of detecting the edge feature, where 0 represents the beginning of the region and the right-hand value marks the maximum width (in pixels) of the region. The apex of the peaks or valleys along the Offset axis indicates the position of the found edge within the ROI.

Edge Width - Filtering Edges

The Edge Width parameter is used to remove noise from the input image, and accentuate the peaks of the edge profiles. The size of the Edge Width parameter should be specified such that the size closely matches the size of the edges in the image, and the peak is sharp and steep, versus low and gradual. The size of an edge is how many pixels wide the edge is; an edge can be sharp, in which case the edge only spans a pixel or two, or edges can be dull, in which case they might span several pixels. Specifying an Edge Width setting that is close to the edge size allows the function to produce stronger edge peaks in the image. Whereas specifying an Edge Width setting that is too large or too small will produce broad, low peaks in the image.

Edge Results

Once the edge has been defined, the Edge Tool function will automatically create an Edges data structure and a result table that contains data about the defined edge. The information returned can be utilized by other In-Sight Vision Tools as a fixture input, or used by other Edge Tool functions to further extrapolate edge related data.


When are Edge Tools Used?

The Edge Tools should be used in the following circumstances:

  • The edge has a high contrast between light and dark pixels.
  • The application requires quick detection of features. The Edge Tools are among the fastest In-Sight Vision Tools, providing the ability to detect edge features faster than patterns, for example.
Note: The In-Sight Edge Tools only analyze greyscale images; all color images are automatically converted to a greyscale value.


Why are Edge Tools Used?

Edge detection and data extrapolation can be extremely useful in applications such as the following:

  • Gauging applications, such as measuring the radius of circular features on parts such as gaskets, or measuring the length of circuits on a circuit board.
  • Locating features on parts, such as circular features or the straight ends of parts, to use as fixture inputs for other In-Sight Vision Tools.
  • Presence/absence applications, where the Edge Tools are used to determine whether or not an edge feature is present or absent.
  • Counting and sorting applications, where the Edge Tools are used to count and sort edges based on their established parameters.
Note: When using a horizontal or vertical linear edge feature as a fixture input, the FindLine tool will only account for the movement of the edge in one direction, either along the horizontal or vertical axis, depending on the position of the scan direction of the ROI.


How to Use the Edge Tools

The Edge Tools are typically utilized in the following manner:

  1. The image is examined and a determination is made that an edge tool would meet the requirements of the application.
  2. One of the Edge Tools, such as Caliper, FindCircle, FindCircleMinMax, FindCurve, FindLine, FindMultiLine or FindSegment, is inserted into the spreadsheet and the parameters are configured to define and detect the edge or edge pairs in the image.
  3. Another of the Edge Tools, such as a PairDistance, PairEdges, PairMaxDistance, PairMeanDistance, PairMinDistance, PairSDevDistance, PairsToEdges or SortEdges, is inserted to filter, compute or sort the found edges or edge pairs, based on specific criteria.


Caliper

Used to perform the following edge-related inspections: measure the width of objects, determine the location of single edges and the location and spacing of edge pairs. The Caliper function is the most accurate Edge Tool function, however, it requires more time to setup and configure.

Caliper Overview

The Caliper function is used to examine an image and locate a 1-dimensional edge, a change in the greyscale values of neighboring pixels. The function examines a specified portion of the image (defined by the Region parameter) and scans for a transition in the greyscale values of pixels along one direction, from dark to light or light to dark. Either a single edge or a pair of edges (that are separated by an expected width) can be located by the function.

The Caliper function is ideally suited to applications where the function is used to develop detailed information about the precise locations of edge features within or around an object. For example, the function could be used to count leads on a chip, measure the width of a part, or find edge points to be used as an input for another Vision Tool. The function locates edges or edge pairs based upon an edge model, in which potential edge candidate peaks are detected using a simple 1D kernel, and then scored against a model and scoring methods.

Once the location and orientation of the edges of interest within the image have been determined, the Caliper function can be applied:

  • Configure the Region to enclose the edges or edge pairs.
  • Set the Edge Mode parameter to the type of edge (single edge or edge pairs) and specify the number of edges to find, and set the Edge: First, Edge: Second, and Edge: Distance parameters to create an edge model, which includes the edge polarity, position and spacing.
  • Set the Edge Width and Minimum Contrast parameters to isolate the edges or edge pairs.
  • Define the scoring method that will be used to score edge candidates.

Configuring the Region

When positioning the region, ensure that the scan direction is set to properly identify the desired edges. The scan direction should be pointing towards the first edge to be detected. Edge position will be determined by where the edges are detected, relative to the center of the region.

Isolating Edges and Defining the Edge Model

Once the edges have been located in the region, the Caliper function computes a score for each potential edge in the image. The score for each edge is computed based on the similarity between the edge in the current image and the defined ideal edge. The edges in the current image are considered "edge candidates," while the ideal edge is called the "edge model" (which can be a single edge or a pair of edges).

Edge Model

To evaluate whether an edge candidate in the image is a good match for the edge sought, a model that accurately describes the edge of interest must be defined. An edge model is defined by first defining the type of edge: a single edge or a pair of edges. Next, define how many of the edge types to locate in the region. Then specify the polarity (white-to-black or black-to-white), position of each edge in the model, which is specified by the position of the edges relative to the Region, and the spacing between edges if edge pairs are being defined.

Edge Detection, Peak Detection with the Minimum Contrast Threshold

The Edge Width parameter is used to remove noise from the input image, and accentuate the peaks of the edge profiles. Use the Minimum Contrast parameter to set a minimum peak height (contrast threshold).

Edge Mode Scoring

Once the Caliper function has filtered the region and produced a list of the edge peaks that exceed the specified contrast threshold, the function computes a score for each edge candidate within the image. This score determines which of the edge candidates in the image represent instances of the actual edges of interest, as defined by your edge model.

The Caliper function computes the score for each edge candidate by comparing the edge candidate against the edge model, based upon a set of user-defined scoring criteria, called scoring methods.

A scoring method has two parts:

  • A scoring method type that defines what measurement of the edge you want to evaluate
  • A scoring function that defines the relationship between the raw measure and the mapped score that will be generated for the scoring method

Several scoring methods can be defined; the Caliper function applies all of defined scoring methods to each edge candidate within the image and returns an overall score for each edge candidate. Defining the appropriate scoring methods ensures that the edge candidate with the highest score will be the edge of interest.

Scoring Method Types

The Caliper function bases the score of an edge candidate on how different the edge candidate is from the edge model. The particular measure that the tool uses to assess this difference is defined by the user. The types of measures that can be specified are called scoring method types, and there are four types of scoring methods: Contrast, Position, Size and Straddle.

When the function applies a scoring method type to an edge candidate, the result is a raw score. The raw score is different for different scoring method types. The scoring method types and their raw scores are described in the following sections.

Contrast Scoring Methods

Edge candidates can be scored based on the contrast of the edge candidates. The contrast of an edge is expressed in terms of the change in pixel values divided by the size of the edge, in pixels. The raw score for a contrast scoring method is normalized so that a value of 100 is equal to a contrast of 256 (the maximum possible value for contrast). If an edge pair model is specified, the raw score is the average of the contrast for the two edges.

Positional Scoring Methods

Edge candidates can be scored based on the position of the edge candidate relative to the center of the region. The position is defined as the distance between the center and the model origin point within the edge candidate. If the edge of interest is expected to be a specific distance from the center of the region, then an absolute positional scoring method can be defined, and the raw score will be expressed as an absolute distance in pixels. If an edge pair model is being used and the variation in position between the edge candidate and the center of the region relative to the size of the model should be accounted for, define a relative positional scoring method. In this case, the raw score will be normalized so that a value of 100 means that the distance was equal to the size of the model.

Size Scoring Methods

If an edge pair model is being used, edge candidates can be scored based on how much the width between the edges of the edge candidate varies from the width between the edges of the edge model. The size scoring method can be defined to be absolute, in which case the raw score will be returned as an absolute size difference in pixels. If the size difference relative to the size of the model should be qualified, define a relative size scoring method. In this case, the raw score will be normalized so that a value of 100 means that the size difference was equal to the size of the model.

Straddle Scoring Methods

If an edge pair model is being used, edge pair candidates can be scored based on whether or not the two edges lie on either side of the center of the region. This type of scoring method can be used to find objects defined by a pair of edges that are expected to lie under the center of the region. The raw score is returned as 100 if the center of the region is straddled by the edges, 0 if the center of the region is not straddled by the edges.

Scoring Functions

For each scoring method, the selected scoring method type produces a raw score; the effect that this raw score has on the overall score for an edge candidate is controlled by defining a scoring function. A scoring function maps a raw score to a mapped score. The mapped scores for each scoring method for an edge candidate are combined to form the overall score for that edge candidate.

Caliper Inputs

Syntax: Caliper(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Edge Mode,Number to Find,Minimum Contrast,Thresh: Accept,Edge Width,Edge: First,Edge: Second,Edge: Distance,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Edge Mode

Specifies whether the function should locate a single edge or an edge pair.

Single Edge | Specifies that the function will search the Region for single edges that meet the specified criteria, and return their position. The Position and Contrast scoring methods can be used with this mode.
Edge Pair | Specifies that the function will search the Region for edge pairs that meet the specified criteria. The Position, Contrast, Size, and Straddle scoring methods can be used with this mode.

Number to Find

Specifies the maximum number of edges or edge pairs to return (1 to the In-Sight vision system's image width, minus 1; default = 1). The maximum number of edges that may be detected is one less than the width of the image for the particular In-Sight vision system capturing the image (i.e., an In-Sight 5100 vision system's maximum would be 639, or one less than the vision system's 640 x 480 image resolution). If there are more edges or edge pairs whose scores exceed the Thresh: Accept parameter value, the edges or edge pairs with the highest scores will be selected.

Minimum Contrast

Specifies the minimum contrast (0 to 100; default = 5) for edges or edge pairs; the contrast value is normalized from the greyscale histogram within the Region to a scale of 0 to 100. The function will only return edges or edge pairs with contrast values that exceed this setting.

Thresh: Accept

Specifies the minimum acceptable match score (0 to 100; default = 5) for edge candidates; the function only returns those edges or edge pairs with match scores that exceed this value. The match score is the geometric means of all of the specified scoring methods.

Edge Width

Specifies the pixel distance (1 to 50; default = 2) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Edge: First

Specifies the polarity of the first edge in a pair, relative to the scan direction in the Region; when set as either black-to-white or white-to-black, the function only reports edge pairs whose first edge has the specified polarity.

0 = black-to-white | Specifies that the edge polarity is black-to-white.
1 = white-to-black | Specifies that the edge polarity is white-to-black.
2 = either (default) | Specifies that the edge polarity could be either black-to-white or white-to-black.

Edge: Second

Specifies the polarity of the second edge in a pair, relative to the scan direction in the Region; when set as either black-to-white or white-to-black, the function only reports edge pairs whose second edge has the specified polarity.

Note: This parameter is used only when the Edge Mode parameter is set to Edge Pair.
0 = black-to-white | Specifies that the edge polarity is black-to-white.
1 = white-to-black | Specifies that the edge polarity is white-to-black.
2 = either (default) | Specifies that the edge polarity could be either black-to-white or white-to-black.

Edge: Distance

Specifies the pixel distance (1 to 3 times the In-Sight vision system's width; default = 10) between the two edges in an edge pair. This parameter is used only for the Edge Pair mode. If the edge distance is greater than the Region width, the function will return #ERR. If the Region is not rotated or curved, this value needs to be less than or equal to Region > Wide.

Note: The In-Sight vision system's image width is the width of the image for the particular In-Sight vision system capturing the image (i.e., an In-Sight 5100 vision system's maximum would be 1920, 3 times the width of the vision system's 640 x 480 image resolution).

Show

Specifies the display mode for Caliper graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the Caliper function is the active cell in the spreadsheet.
1 = result graphics only | The line edges will be displayed at all times.
2 = input and result graphics | The input image region and the line edges will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the line edges, and the edges response chart will be displayed at all times.

Caliper Scoring Methods Tab

The Scoring Methods tab is used to select and edit the scoring functions that will be used to score edge candidates against the edge model. For each edge candidate, once the Caliper function has computed the raw score for each selected scoring method and applied the scoring function, an overall score is then computed for the edge candidate. The overall score is computed by taking the Nth root of the product of the mapped scores. For example, if four scoring methods are defined, the Caliper function would multiply the four scores and take the 4th root of the result (if any single scoring function produces a value of 0, then the overall score for the edge candidate would be also be 0).

Note: At least one Scoring Method must be specified, or #ERR will be returned. By default, a Contrast Scoring Function is applied.

Scoring Functions

Parameter Description

Position
  • Available for edge pairs and single edges, this scoring method is based on the edge's, or edge pair's, position relative to the left-side or center of the Region. Adjust the scoring settings to assign scores to edges or edge pairs based on their proximity to the left-side of the Region, with a score range of 0 to 100.
  • When the Region Centered check-box is enabled (its default state), edges or edge pairs are scored based on their position relative to the center of the Region, using an outside edge or centered edges as the basis for the scoring calculation. Centered edges are those closer to the center of the Region, while outside edges are those further away from the center.
  • If the Region Centered check-box is not selected, the scoring is based on the position relative to the left-side of the Region, using right or left edges as the basis for the scoring calculation.
  • The Normalize to Edge Pair Distance check-box (which is only used for edge pairs and is enabled by default), divides the distance between the edges in the edge pair by the Edge: Distance parameter value before calculating the score. This provides a way to accommodate size changes in the Region by using a percentage value, rather than an actual value, in calculating the score.

Contrast

Available for edge pairs and single edges, this scoring method is based on the edge candidate's contrast, which is the change in contrast across adjacent pixels that make up the edge. With edge pairs, the average contrast of the two edges is used. Adjust the scoring settings to assign scores to edges or edge pairs based on the contrast, with a score range of 0 to 100. The basis for calculating the score can be either high contrast edges, or low contrast edges.

Size
  • Available for edge pairs only, this scoring method is based on the distance (size) between edge pairs. Adjust the scoring settings to assign scores to edge pairs based on their size, with a score range of 0 to 100.
  • The Use Edge Pair Distance Difference check-box uses the actual distance in calculating the score using distances closer to or further from the Edge: Distance parameter value in pixels as the basis for the score calculation. Otherwise, the basis for the score calculation is edge distances that are larger or smaller than the expected Edge: Distance parameter value.
  • The Use Symmetric Difference check-box (off by default) provides a way to allow for scaling of the region. With this setting, sizes that are both smaller and larger than the Edge: Distance parameter value may be specified. This setting allows a change in one direction to be accepted, while ignoring the other. For example, smaller distances could be allowed, but set the method to score larger distances lower.

Straddle

Available for edge pairs only, this scoring method is based on whether or not the two edges lie on either side of the center of the Region. This type of scoring method can be used to find objects defined by a pair of edges that are expected to lie under the center of the image region. The score is 0 if the edges in the edge pair do not straddle the center of the image region and 100 if they do.

Editing the Scoring Functions

Scoring functions are defined by specifying low and high input and output values. There are two types of scoring functions: single-sided and two-sided scoring functions.

Single-Sided Scoring Functions

The scoring function is configured by defining values for xC, x1, x0, y1, and y0. The values defined for y0 and y1 must be between 0 and 100. Values specified for xC, x1, and x0 can include negative values (negative values would be specified if one or more of the xC, x1, and x0 points is expected to produce a raw score less than zero), and their range is determined by the selected scoring method type. The defined scoring function maps input scores to output scores as follows:

  • Input values above x0 are mapped to an output score of y0.
  • Input values below xC are mapped to an output score of 0.
  • Input values between xc and x1 are mapped to a score of y1.
  • Input values between x1 and x0 are mapped linearly to the range of scores between y1 and y0.

The scoring function illustrated above would be appropriate for a case where higher input scores should produce higher output scores, such as a contrast scoring method where a greater edge contrast should produce a higher score.

Two-Sided Scoring Functions

If an edge pair is being used, a two-sided scoring function can be defined that scores edge candidates that are smaller than the edge model differently from edge candidates that are larger than the edge model. The figure above illustrates an example of a two-sided scoring function that is more tolerant of edge candidates that are larger than the edge model than of edge candidates that are smaller. In this example, if the edge candidate is exactly the same size as the edge model, the input score will be 0.0; if the edge candidate is smaller than the edge model, the input score will be less than 0; if the edge candidate is larger than the edge model, the input score will be greater than 0.

If a two-sided scoring function is specified, the raw score is normalized so that an edge candidate that is smaller than the edge model by an amount equal to the size of the edge model receives an input score of -100, and an edge candidate that is larger than the edge model by an amount equal to the size of the edge model receives an input score of 100.

Caliper Outputs

Returns

An Edges data structure containing paired edges, or #ERR if any of the input parameters are invalid.

Results
  • When Caliper is initially inserted into a cell, a result table is created in the spreadsheet.
  • When Single Edge Edge Mode is selected, the result table includes Index, Row0, Col0, Row1, Col1, Score, Contrast, and Positions are included for each edge. Index starts at 0 and the number of lines displayed equals the Number to Find setting.
  • When Edge Pair Edge Mode is selected, the result table includes Index, Row0, Col0, Row1, and Col1 for each edge and Score, Contrast, Position and Distance for the first edge of the pair. Index starts at 0 and the number of lines displayed equals twice the Number to Find setting.

Caliper Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

Row0 | GetRow(Edges, Edge Index, 0) | The row coordinate of the first endpoint for the specified edge.
Col0 | GetCol(Edges, Edge Index, 0) | The column coordinate of the first endpoint for the specified edge.
Row1 | GetRow(Edges, Edge Index, 1) | The row coordinate of the second endpoint for the specified edge.
Col1 | GetCol(Edges, Edge Index, 1) | The column coordinate of the second endpoint for the specified edge.
Score | GetScore(Edges, Edge Index) | The edge or edge pair score, which is the geometric mean of all specified scoring functions.
Contrast | GetContrast(Edges, Edge Index) | The average contrast between the foreground and background of the edge (in grey levels 0-255). Contrast is positive for black-to-white transitions and negative for white-to-black transitions.
Position | GetPosition(Edges, Edge Index) | The X position of the edge or edge pair center relative to the left side of the image region.
Distance | GetEdgeDistance(Edges, Edge Index) | The distance between edge pairs when Edge Pair is the selected Edge Mode. Returns #ERR if Single Edge is selected as the Edge Mode.

Use the Caliper Tool


Use the Caliper Tool

Using the Caliper tool requires the following steps:

  1. Opening the Caliper dialog
  2. Setting the Caliper Tool Inputs
  3. Setting the Image Region
  4. Setting the Contrast Scoring Method
  5. Setting the Size Scoring Method
  6. Set the Straddle Scoring Method
  7. Set the Position Scoring Method

In this example, the caliper tool will be used to find an edge pair that is high contrast, near the center of the image region, straddles the center of the image region, and has an edge distance close to the expected distance.

  1. Opening the Caliper Dialog

    1. Right-click an empty cell in the spreadsheet and select Insert Function to open the Insert Function dialog.
    2. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.
    3. Select the Edge tool category.

    4. Select the Caliper function from the Function List and press the OK button or double-click on the function.

    5. The Caliper dialog will appear.

  2. Setting the Caliper Tool Inputs

    1. Set the Edge Mode to Edge Pair.
    2. For this example, we set Edge: First polarity to black-to-white.
    3. Set Edge: Second polarity to white-to-black.
    4. Set the Edge Distance to the expected distance between the edges in the edge pair.
    5. Change Show to input and result graphics.
    6. Click the OK button.

  3. Setting the Image Region

    1. Right-click on the Caliper Edges structure that you previously inserted into the spreadsheet.
    2. Select Cell Graphic.
    3. Adjust the region until it includes the edge pair that you want to examine.

    4. Double-click in the region to return to the spreadsheet.

  4. Setting the Contrast Scoring Method

    1. Double-click on the Caliper Edges structure in the spreadsheet.
    2. Click on the Scoring Methods tab, which shows the default Contrast scoring method editor.
    3. Set the top slider to below the expected edge contrast, which is the average of the edge pair as shown in the following figure. You can adjust the other sliders to create a scoring calculation the fits your needs. The setting shown here gives a 100 score for any edge pair with an average contrast greater than 84 and a score that drops as the contrast approaches zero.
    4. Click OK.

    5. Notice the score for the edge pair. The score is dependent only on the contrast scoring method.

  5. Setting the Size Scoring Method

    1. Double-click on the Caliper Edges structure in the spreadsheet.
    2. Click on the Scoring Methods tab.
    3. Select Size in the Add Scoring Function drop-down list and click the Add button, which displays the Size scoring method editor.
    4. In this case, we only want to focus on the difference between the expected edge size and not whether the size is larger or smaller than the Edge Distance setting. Click the Use Symmetric Distance check-box.
    5. Adjust the slider so that edge pairs with a difference of 5 pixels get a score of 100 and the score diminishes as the difference increases up to 25 pixels, at which point, the score is zero.
    6. Click the OK button.

    7. Notice the score for the edge pair. The score is now dependent on the geometric mean of contrast and size scoring methods.

  6. Setting the Straddle Scoring Method

    1. Double-click on the Caliper Edges structure in the spreadsheet.
    2. Click on the Scoring Methods tab.
    3. Select Straddle in the Add Scoring Function drop-down list and click the Add button, which displays a note that there are no editable parameters.
    4. Leave the Caliper dialog open.

    The straddle scoring method scores 100 if the edge pair straddle the center of the image region and 0 if they do not.

    The score is now dependent on the geometric mean of the contrast, straddle and size scoring methods.

  7. Setting the Position Scoring Method

    1. Select Position in the Add Scoring Function drop-down list and click the Add button, which displays the Position scoring method editor.
    2. In this case, we only want to focus on the position of the center of the edge pair in the image region. We don't expect a need to deal with scaling. Make certain that Centered Edges and Region Centered are selected.
    3. Adjust the slider so that edge pairs within 5 pixels of the center receive a high score and the score diminishes as the edge pairs move away from the center up to 20 pixels, at which point the score is zero.
    4. Click the OK button.

    5. Notice the score for the edge pair. The score is now dependent on the geometric mean of contrast and size scoring methods.

    The score for this example is the geometric mean of the contrast, size, position, and straddle scores (4th root of contrast score X size score X position score X straddle score).


FindCircle

Locates a single circular edge within an annular (shaped like a circle or ring) image region. FindCircle forms one-dimensional projections of the image region by summing pixel values on concentric circles, scanned in the direction of increasing radius. Edge transitions are extracted from the projected image data.

FindCircle Inputs

Syntax: FindCircle(Image,Fixture.Row,Fixture.Columm,Fixture.Theta,Annulus.X,Annulus.Y,Annulus.Inner Radius,Annulus.Outer Radius,Polarity,Find By,Accept Thresh,Normalize Score,Edge Width,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Annulus

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an annular image region that can be translated and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
Inner Radius | The size of the inner radius.
Outer Radius | The size of the outer radius.
Note: The Fixture and Annulus parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.

Polarity

Specifies the polarity of the edge to be located, relative to the scan direction of the Region; the function will only report edges of the specified polarity.

0 = black-to-white | Specifies that the edge polarity is black-to-white.
1 = white-to-black | Specifies that the edge polarity is white-to-black.
2 = either (default) | Specifies that the edge polarity could be either black-to-white or white-to-black.

Find By

Specifies the edge selection technique the function will use to select an edge, amongst multiple edge candidates.

0 = best score (default) | Specifies that the edge with the highest score receives the highest consideration.
1 = smallest circle | Specifies that the smallest circle detected receives the highest consideration.
2 = largest circle | Specifies that the largest circle detected receives the highest consideration.

Accept Thresh

Specifies the minimum acceptable edge contrast (0 to 100; default = 25). The contrast value is normalized from the greyscale histogram within the Region to a scale of 0 to 100. The function will reject any edge whose contrast score falls below this value.

Normalize Score

Specifies whether the edge scores will be normalized by the greyscale histogram of the Region. When Normalize Score is enabled, raw edge scores are normalized by the maximum contrast found within the image region using the following formula:

Score = (Raw Edge Score) x (100/Max Contrast)

Where Raw Edge Score is the grey level difference across the edge and Max Contrast is the difference between the maximum and minimum grey level (0 to 255) within the image region.

When Normalize Score is disabled, low contrast edges will score lower than high contrast edges. The following formula is used:

Score = (Raw Edge Score) x (100/255)

0 = OFF | Do not normalize the score.
1 = ON (default) | Normalize the score.
Tip: This parameter is useful for finding edges in a low contrast region. If the edges to be detected are expected to be only high contrast, disable this parameter.

Edge Width

Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Show

Specifies the display mode for FindCircle graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindCircle function is the active cell in the spreadsheet.
1 = result graphics only | The circular edge will be displayed at all times.
2 = input and result graphics | Both the input image region and the circular edge will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the circular edge, and the edge response chart will be displayed at all times.

FindCircle Outputs

Returns | An Edges data structure containing a single circular edge, or #ERR if any of the input parameters are invalid.
Results | When FindCircle is initially inserted into a cell, a result table is created in the spreadsheet.

FindCircle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

CentRow | GetRow(Edges, 0, 0) | The center row.
CentCol | GetCol(Edges, 0, 0) | The center column.
Radius | GetRadius(Edges, 0) | The radius.
Score | GetScore(Edges, 0) | The edge contrast score. Score is positive for black-to-white transitions, and negative for white-to-black transitions.


FindCircleMinMax

Inspects the circularity of a continuous edge by finding the minimum and maximum deviations from the edge and the standard deviation of the radii of all points on the edge.

Note: FindCircleMinMax should not be used for locating circular edges; use FindCircle to locate circular edges instead. For more information, see FindCircle.

FindCircleMinMax Inputs

Syntax: FindCircleMinMax(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Annulus.X,Annulus.Y,Annulus.Inner Radius,Annulus.Outer Radius,Polarity,Minimum Contrast,Edge Width,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Annulus

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an annular image region that can be translated and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
Inner Radius | The size of the inner radius.
Outer Radius | The size of the outer radius.
Note: The Fixture and Annulus parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.

Polarity

Specifies the polarity of the edge to be located, moving from inside to outside the circle, relative to the scan direction of the Region; the function will only report edges of the specified polarity.

0 = black-to-white (default)

1 = white-to-black

Minimum Contrast

Specifies the minimum greyscale contrast (0 to 255; default = 10) at each point along the circle.

Edge Width

Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Show

Specifies the display mode for FindCircleMinMax graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindCircleMinMax function is the active cell in the spreadsheet.
1 = result graphics only | The circular edge and the minimum and maximum deviation points will be displayed at all times.
2 = input and result graphics | The input image region, the circular edge, and the minimum and maximum deviation points will be displayed at all times.

FindCircleMinMax Outputs

Returns | An Edges data structure containing a single circular edge, or #ERR if any of the input parameters are invalid.
Results | When FindCircleMinMax is initially inserted into a cell, a result table is created in the spreadsheet.

FindCircleMinMax Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

CentRow | GetRow(Edges) | The center row of the circular edge.
CentCol | GetCol(Edges) | The center column of the circular edge.
Radius | GetRadius(Edges) | The radius of the circular edge.
Min | GetMin(Edges) | The minimum deviation from the circular edge.
Max | GetMax(Edges) | The maximum deviation from the circular edge.
SDev | GetSDev(Edges) | The standard deviation from the radii of all points on a continuous edge.
Score | GetScore(Edges) | A measure of circularity of a continuous edge based on the radius of the circular edge and the standard deviation. The score will be higher for a small standard deviation and lower for a large standard deviation. Score is calculated using the following formula: Score = 100*(1 - 2*SDev/Radius)

Additional data elements can be accessed using the following Vision Data Access functions:

MinRow | GetRow(Edges, 1) | The row of the minimum radius point of the circular edge.
MaxRow | GetRow(Edges, 2) | The row of the maximum radius point of the circular edge.
MinCol | GetCol(Edges, 1) | The column of the minimum radius point of the circular edge.
MaxCol | GetCol(Edges, 2) | The column of the maximum radius point of the circular edge.
Contrast | GetContrast(Edges) | The average contrast between the foreground and background of the circular edge (in grey levels 0-255). Contrast is positive for black-to-white transitions and negative for white-to-black transitions.


FindCurve

Locates a single circular arc edge segment within a curved image region. FindCurve forms a one-dimensional projection of the image region by summing pixel values on concentric arc segments scanned in the positive x-direction relative to the region's local coordinate system. Edge transitions are extracted from the projected image data.

FindCurve Inputs

Syntax: FindCurve(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Polarity,Find By,Accept Thresh,Normalize Score,Angle Range,Edge Width,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Polarity

Specifies the polarity of the edge to be located, relative to the scan direction of the Region; the function will only report edges of the specified polarity.

0 = black-to-white | Specifies that the edge polarity is black-to-white.
1 = white-to-black | Specifies that the edge polarity is white-to-black.
2 = either (default) | Specifies that the edge polarity could be either black-to-white or white-to-black.

Find By

Specifies the edge selection technique the function will use to select an edge, amongst multiple edge candidates.

0 = best score (default) | Specifies that the edge with the highest score receives the highest consideration.
1 = first edge | Specifies that the first edge detected receives the highest consideration.
2 = last edge | Specifies that the last edge detected receives the highest consideration.

Accept Thresh

Specifies the minimum acceptable edge contrast (0 to 100; default = 25). The contrast value is normalized from the greyscale histogram within the Region to a scale of 0 to 100. The function will reject any edge whose contrast score falls below this value.

Normalize Score

Specifies whether the edge scores will be normalized by the greyscale histogram of the Region. When Normalize Score is enabled, raw edge scores are normalized by the maximum contrast found within the image region using the following formula:

Score = (Raw Edge Score) x (100/Max Contrast)

Where Raw Edge Score is the grey level difference across the edge and Max Contrast is the difference between the maximum and minimum grey level (0 to 255) within the image region.

When Normalize Score is disabled, low contrast edges will score lower than high contrast edges. The following formula is used:

Score = (Raw Edge Score) x (100/255)

0 = OFF | Do not normalize the score.
1 = ON (default) | Normalize the score.
Tip: This parameter is useful for finding edges in a low contrast region. If the edges to be detected are expected to be only high contrast, disable this parameter.

Angle Range

Specifies the function's tolerance to edge rotation (0 to 10; default = 0). The function will still find edges that are outside of the specified range, but the accuracy may not be as high.

Note:
  • Setting this parameter to a value greater than 0 will reduce the speed of the function.
  • This setting is currently ignored; the maximum Angle Range of 10 is always allowed within an annular segment.

Edge Width

Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Show

Specifies the display mode for FindCurve graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindCurve function is the active cell in the spreadsheet.
1 = result graphics only | The curved edge will be displayed at all times.
2 = input and result graphics | Both the input image region and the curved edge will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the curved edge, and the edge response chart will be displayed at all times.

FindCurve Outputs

Returns | An Edges data structure containing a single curved edge segment, or #ERR if any of the input parameters are invalid.
Results | When FindCurve is initially inserted into a cell, a result table is created in the spreadsheet.

FindCurve Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

CentRow | GetRow(Edges, 0, 0) | The row coordinate of the center of curvature.
CentCol | GetCol(Edges, 0, 0) | The column coordinate of the center of curvature.
StartRow | GetRow(Edges, 0, 1) | The row coordinate of the first endpoint.
StartCol | GetCol(Edges, 0, 1) | The column coordinate of the first endpoint.
EndRow | GetRow(Edges, 0, 2) | The row coordinate of the second endpoint.
EndCol | GetCol(Edges, 0, 2) | The column coordinate of the second endpoint.
Radius | GetRadius(Edges, 0) | The arc radius.
Score | GetScore(Edges, 0) | The edge contrast score. Score is positive for black-to-white transitions, negative for white-to-black transitions.


FindLine

Locates a single straight-line edge within an image region. FindLine forms a one-dimensional projection of the image region by summing pixel values on radial line segments scanned in the positive y-direction relative to the region's local coordinate system. Edge transitions are extracted from the projected image data.

FindLine Inputs

Syntax: FindLine(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Polarity,Find By,Accept Thresh,Normalize Score,Angle Range,Edge Width,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Polarity

Specifies the polarity of the edge to be located, relative to the scan direction of the Region; the function will only report edges of the specified polarity.

Note: When using a horizontal or vertical linear edge feature as a fixture input, the function will only account for the movement of the edge in one direction, either along the horizontal or vertical axis, depending on the position of the scan direction of the ROI.
0 = black-to-white | Specifies that the edge polarity is black-to-white.
1 = white-to-black | Specifies that the edge polarity is white-to-black.
2 = either (default) | Specifies that the edge polarity could be either black-to-white or white-to-black.

Find By

Specifies the edge selection technique the function will use to select an edge, amongst multiple edge candidates.

0 = best score (default) | Specifies that the edge with the highest score receives the highest consideration.
1 = first edge | Specifies that the first edge detected receives the highest consideration.
2 = last edge | Specifies that the last edge detected receives the highest consideration.

Accept Thresh

Specifies the minimum acceptable edge contrast (0 to 100; default = 25). The contrast value is normalized from the greyscale histogram within the Region to a scale of 0 to 100. The function will reject any edge whose contrast score falls below this value.

Normalize Score

Specifies whether the edge scores will be normalized by the greyscale histogram of the Region. When Normalize Score is enabled, raw edge scores are normalized by the maximum contrast found within the image region using the following formula:

Score = (Raw Edge Score) x (100/Max Contrast)

Where Raw Edge Score is the grey level difference across the edge and Max Contrast is the difference between the maximum and minimum grey level (0 to 255) within the image region.

When Normalize Score is disabled, low contrast edges will score lower than high contrast edges. The following formula is used:

Score = (Raw Edge Score) x (100/255)

0 = OFF | Do not normalize the score.
1 = ON (default) | Normalize the score.
Tip: This parameter is useful for finding edges in a low contrast region. If the edges to be detected are expected to be only high contrast, disable this parameter.

Angle Range

Specifies the function's tolerance to edge rotation (0 to 10; default = 0). The function will still find edges that are outside of the specified range, but the accuracy may not be as high.

Note: Setting this parameter to a value greater than 0 will reduce the speed of the function.

Edge Width

Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Show

Specifies the display mode for FindLine graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindLine function is the active cell in the spreadsheet.
1 = result graphics only | The line edge will be displayed at all times.
2 = input and result graphics | Both the input image region and the line edge will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the line edge, and the edge response chart will be displayed at all times.

FindLine Outputs

Returns | An Edges data structure containing a single straight-line edge segment, or #ERR if any of the input parameters are invalid.
Results | When FindLine is initially inserted into a cell, a result table is created in the spreadsheet.

FindLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

Angle | GetAngle(Edges) | The angle of the edge.
Row0 | GetRow(Edges,0,0) | The row coordinate of the first endpoint.
Col0 | GetCol(Edges,0,0) | The column coordinate of the first endpoint.
Row1 | GetRow(Edges,0,1) | The row coordinate of the second endpoint.
Col1 | GetCol(Edges,0,1) | The column coordinate of the second endpoint.
Score | GetScore(Edges,0) | The edge contrast score. Score is positive for black-to-white transitions, negative for white-to-black transitions.


FindMultiLine

Locates multiple straight-line edges within an image region. FindMultiLine forms a one-dimensional projection of the image region by summing pixel values on radial line segments scanned in the positive y-direction relative to the region's local coordinate system. Edge transitions are extracted from the projected image data.

FindMultiLine Inputs

Syntax: FindMultiLine(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Number to Find,Threshold B2W,Threshold W2B,Normalize Score,Find By,Angle Range,Edge Width,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Number to Find

Specifies the maximum number of edges the function will return (1 to sensor's image width, minus 1; default = 3). The maximum number of edges that may be detected is one less than the width of the image for the particular In-Sight vision system capturing the image (i.e., an In-Sight 5100 vision system's maximum would be 639, or one less than the vision system's 640 x 480 image resolution).

Threshold B2W

Specifies the minimum acceptable black-to-white edge contrast score (0 to 100; default = 25). FindMultiLine will reject any black-to-white edges whose contrast score falls below Threshold B2W. Edge contrast is normalized by the greyscale histogram of the scan region.

Threshold W2B

Specifies the minimum acceptable white-to-black edge contrast score (0 to 100 default = 25). FindMultiLine will reject any white-to-black edges whose contrast score falls below Threshold W2B. Edge contrast is normalized by the greyscale histogram of the scan region.

Normalize Score

Specifies whether the edge scores will be normalized by the greyscale histogram of the Region. When Normalize Score is enabled, raw edge scores are normalized by the maximum contrast found within the image region using the following formula:

Score = (Raw Edge Score) x (100/Max Contrast)

Where Raw Edge Score is the grey level difference across the edge and Max Contrast is the difference between the maximum and minimum grey level (0 to 255) within the image region.

When Normalize Score is disabled, low contrast edges will score lower than high contrast edges. The following formula is used:

Score = (Raw Edge Score) x (100/255)

0 = OFF | Do not normalize the score.
1 = ON (default) | Normalize the score.
Tip: This parameter is useful for finding edges in a low contrast region. If the edges to be detected are expected to be only high contrast, disable this parameter.

Find By

Specifies the edge selection technique the function will use to select an edge, amongst multiple edge candidates.

0 = best score (default) | Specifies that the edge with the highest score receives the highest consideration.
1 = first edge | Specifies that the first edge detected receives the highest consideration.
2 = last edge | Specifies that the last edge detected receives the highest consideration.

Angle Range

Specifies the function's tolerance to edge rotation (0 to 10; default = 0). The function will still find edges that are outside of the specified range, but the accuracy may not be as high.

Note: Setting this parameter to a value greater than 0 will reduce the speed of the function.

Edge Width

Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Show

Specifies the display mode for FindMultiLine graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindMultiLine function is the active cell in the spreadsheet.
1 = result graphics only | The found line edges will be displayed at all times.
2 = input and result graphics | Both the input image region and the found line edges will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the found line edges, and the edges' response chart will be displayed at all times.

FindMultiLine Outputs

Returns | An Edges data structure containing multiple straight-line edge segments, or #ERR if any of the input parameters are invalid.
Results | When FindMultiLine is initially inserted into a cell, a result table is created in the spreadsheet.

FindMultiLine Vision Data Access Functions

One Vision Data Access function is automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

NFound

GetNFound(Edges)

NFound is the number of edges found.

Additional data elements can be accessed using the following Vision Data Access functions:

Angle | GetAngle(Edges, Index) | The angle of the specified edge.
Row0 | GetRow(Edges, Edge Index, 0) | The row coordinate of the first endpoint.
Col0 | GetCol(Edges, Edge Index, 0) | The column coordinate of the first endpoint.
Row1 | GetRow(Edges, Edge Index, 1) | The row coordinate of the second endpoint.
Col1 | GetCol(Edges, Edge Index, 1) | The column coordinate of the second endpoint.
Score | GetScore(Edges, Edge Index) | The edge contrast score. Score is positive for black-to-white transitions, negative for white-to-black transitions.


FindSegment

Locates a pair of edges within an image region and computes the arc distance between them. FindSegment forms a one-dimensional projection of the image region by summing pixel values in the x-direction of the region. For more information, see Edge. Edge transitions are extracted from the projected image data. The arc segment over which the edge-to-edge distance is computed is derived from the region used to extract the edges.

FindSegment Inputs

Syntax: FindSegment(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Segment Color,Find By,Accept Thresh,Normalize Score,Angle Range,Edge Width,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Segment Color

Specifies the color of the segment to be located. FindSegment will only report only edge pairs of the specified polarity.

0 = black (default) | Specifies black or white-to-black followed by black-to-white polarity.
1 = white | Specifies white or black-to-white followed by white-to-black polarity.

Find By

Specifies the edge selection technique.

0 = widest segment (default) | Finds the two edges farthest apart from which a segment of the specified Segment Color can be identified.
1 = strongest edges | Finds the two edges with the strongest response scores from which a segment of the specified Segment Color can be identified.
2 = widest contiguous segment | Finds the two edges from which a segment of the specified Segment Color can be identified without any other edges in between them.
3 = narrowest segment | Finds the two edges nearest each other from which a segment of the specified Segment Color can be identified.

Accept Thresh

Specifies the minimum acceptable edge contrast (0 to 100; default = 25). The contrast value is normalized from the greyscale histogram within the Region to a scale of 0 to 100. The function will reject any edge whose contrast score falls below this value.

Normalize Score

Specifies whether the edge scores will be normalized by the greyscale histogram of the Region. When Normalize Score is enabled, raw edge scores are normalized by the maximum contrast found within the image region using the following formula:

Score = (Raw Edge Score) x (100/Max Contrast)

Where Raw Edge Score is the grey level difference across the edge and Max Contrast is the difference between the maximum and minimum grey level (0 to 255) within the image region.

When Normalize Score is disabled, low contrast edges will score lower than high contrast edges. The following formula is used:

Score = (Raw Edge Score) x (100/255)

0 = OFF | Do not normalize the score.
1 = ON (default) | Normalize the score.
Tip: This parameter is useful for finding edges in a low contrast region. If the edges to be detected are expected to be only high contrast, disable this parameter.

Angle Range

Specifies the function's tolerance to edge rotation (0 to 10; default = 0). The function will still find edges that are outside of the specified range, but the accuracy may not be as high.

Note: Setting this parameter to a value greater than 0 will reduce the speed of the function.

Edge Width

Specifies the pixel distance (1 to 50; default = 3) over which an edge transition takes place. Edge Width is used to filter the image before edges are extracted.

Show

Specifies the display mode for FindSegment graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FindSegment function is the active cell in the spreadsheet.
1 = result graphics only | The two edges that define the edge segment will be displayed at all times.
2 = input and result graphics | Both the input image region and the two edges will be displayed at all times.
3 = show all: input, result, and chart | The input image region, the two edges, and the edges' response chart will be displayed at all times.

FindSegment Outputs

Returns | An Edges data structure containing a matched pair of straight-line edges, or #ERR if any of the input parameters are invalid.
Results | When FindSegment is initially inserted into a cell, a result table is created in the spreadsheet.

FindSegment Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges.

Distance | PairDistance(Edges, 0, 1) | The segment distance.
Score | GetScore(Edges, 0) | The contrast score of the segment.

Additional data elements can be accessed using the following Vision Data Access functions:

Angle | GetAngle(Edges, Index) | The angle of the specified edge.
Row0 | GetRow(Edges, Edge Index, 0) | The row coordinate of the first endpoint.
Col0 | GetCol(Edges, Edge Index, 0) | The column coordinate of the first endpoint.
Row1 | GetRow(Edges, Edge Index, 1) | The row coordinate of the second endpoint.
Col1 | GetCol(Edges, Edge Index, 1) | The column coordinate of the second endpoint.


PairDistance

Computes the distance between two edges of an Edges data structure. PairDistance references two edges, by index number, and reports the distance between their midpoints. The segment over which the edge-to-edge distance is computed is derived from the region originally used to extract the edges from the image.

Note: If the PairDistance function is added to an Abs formula, for example, Abs(B2)+PairDistance(C2,0,1), it is recommended to insert the PairDistance function in its own spreadsheet cell and use a cell reference into the Abs formula.

PairDistance Inputs

Syntax: PairDistance(Edges,First Edge,Second Edge)

Parameter | Description
Edges | A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges.
First Edge | Specifies the index number (0 to 10000; default = 0) of the first edge of an edge pair.
Second Edge | Specifies the index number (0 to 10000; default = 1) of the second edge of an edge pair.

PairDistance Outputs

Returns

A value representing the arc distance between edges, or #ERR if any of the input parameters are invalid.

For more information, see Edge or Edges.


PairEdges

Sorts arrays of edges into arrays of edge pairs. PairEdges scans an Edges data structure for edge pairs that fall within the specified tolerance. Edges belonging to a pair are ordered consecutively, such that the first edge of a pair is on an even index number and the second edge of a pair is on an odd index number.

PairEdges Inputs

Syntax: PairEdges(Edges,Number of Pairs,Edge: First,Edge: Second,Edge Dist: Min,Edge Dist: Max,Intermediate Edges.Min B2W,Intermediate Edges.Max B2W,Intermediate Edges.Min W2B,Intermediate Edges.Max W2B,Show)

Parameter Description

Edges

A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges.

Note: The PairEdges function cannot reference the Edges data structure returned by the Caliper function.

Number of Pairs

Specifies the maximum number of pairs to be reported. (0 to 80; default = 1)

Edge: First

Specifies the polarity of the first edge in a pair. PairEdges will only report edge pairs whose first edge has the specified polarity.

0 = black-to-white

1 = white-to-black (default)

2 = either

Edge: Second

Specifies the polarity of the second edge in a pair. PairEdges will only report edge pairs whose second edge has the specified polarity.

0 = black-to-white (default)

1 = white-to-black

2 = either

Edge Dist: Min

Specifies the minimum arc distance (0 to 1920; default = 0) between edges in a pair. PairEdges will only report edge pairs that are more than Edge Dist: Min distance apart.

Edge Dist: Max

Specifies the maximum arc distance (0 to 1920; default = 50) between edges in a pair. PairEdges will only report edge pairs that are less than Edge Dist: Max distance apart.

Intermediate Edges

Specifies the expected number and polarity of edges that fall between the end points of an edge pair. PairEdges will only report edge pairs with an expected number of intermediate edges.

Min B2W | Specifies the minimum number of black-to-white edges expected between the end points of an edge pair. (0 to 320; default = 0)
Max B2W | Specifies the maximum number of black-to-white edges expected between the end points of an edge pair. (0 to 320; default = 0)
Min W2B | Specifies the minimum number of white-to-black edges expected between the end points of an edge pair. (0 to 320; default = 0)
Max W2B | Specifies the maximum number of white-to-black edges expected between the end points of an edge pair. (0 to 320; default = 0)

Show

Specifies the display mode for PairEdges graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the PairEdges function is the active cell in the spreadsheet.
1 = result graphics only | The line edges will be displayed at all times.

PairEdges Outputs

Returns | An Edges data structure containing paired edges, or #ERR if any of the input parameters are invalid.
Results | When PairEdges is initially inserted into a cell, a result table is created in the spreadsheet.

PairEdges Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

NumPairs | GetNFound(Edges) | The number of edge pairs found.
MinDist | PairMinDistance(Edges) | The minimum distance between paired edges.
MaxDist | PairMaxDistance(Edges) | The maximum distance between paired edges.
MeanDist | PairMeanDistance(Edges) | The mean distance between paired edges.
SDevDist | PairSDevDistance(Edges) | The standard deviation of the distance between paired edges.

Additional data elements can be accessed using the following Vision Data Access functions:

Angle | GetAngle(Edges, Index) | The angle of the specified edge.
Row0 | GetRow(Edges, Edge Index, 0) | The row coordinate of the first endpoint for the specified edge.
Col0 | GetCol(Edges, Edge Index, 0) | The column coordinate of the first endpoint for the specified edge.
Row1 | GetRow(Edges, Edge Index, 1) | The row coordinate of the second endpoint for the specified edge.
Col1 | GetCol(Edges, Edge Index, 1) | The column coordinate of the second endpoint for the specified edge.
Score | GetScore(Edges, Edge Index) | The edge contrast score for the specified edge.

For more information, see Edge or Edges.


PairMaxDistance

Finds the maximum distance between edges in a pair. PairMaxDistance searches an array of edge pairs contained within an Edges data structure for the edge pair enclosing the largest arc length and returns the distance value.

PairMaxDistance Inputs

Syntax: PairMaxDistance(Edges)

Parameter | Description
Edges | A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges. The function expects the input Edges data structure to be sorted by pairs, such that evenly-indexed edges contain the first edge of an edge pair, and oddly-indexed edges contain the second edge of an edge pair.

PairMaxDistance Outputs

Returns

A value representing the largest edge pair distance, or #ERR if any of the input parameters are invalid.

For more information, see Edge or Edges.


PairMeanDistance

Computes the mean of edge pair distances.

PairMeanDistance Inputs

Syntax: PairMeanDistance(Edges)

Parameter | Description
Edges | A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges. The function expects the input Edges data structure to be sorted by pairs, such that evenly-indexed edges contain the first edge of an edge pair, and oddly-indexed edges contain the second edge of an edge pair.

PairMeanDistance Outputs

Returns

A value representing the mean of edge pair distances, or #ERR if any of the input parameters are invalid.

For more information, see Edge or Edges.


PairMinDistance

Finds the minimum of edge pair distances. PairMinDistance searches an array of edge pairs contained within an Edges data structure for the edge pair enclosing the largest arc length and returns the distance value.

PairMinDistance Inputs

Syntax: PairMinDistance(Edges)

Parameter | Description
Edges | A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges. The function expects the input Edges data structure to be sorted by pairs, such that evenly-indexed edges contain the first edge of an edge pair, and oddly-indexed edges contain the second edge of an edge pair.

PairMinDistance Outputs

Returns

A value representing the smallest edge pair distance, or #ERR if any of the input parameters are invalid.

For more information, see Edge or Edges.


PairSDevDistance

Computes the standard deviation of edge pair distances.

PairSDevDistance Inputs

Syntax: PairSDevDistance(Edges)

Parameter | Description
Edges | A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges. The function expects the input Edges data structure to be sorted by pairs, such that evenly-indexed edges contain the first edge of an edge pair, and oddly-indexed edges contain the second edge of an edge pair.

PairSDevDistance Outputs

Returns

A value representing the standard deviation of edge pair distances, or #ERR if any of the input parameters are invalid.

For more information, see Edge or Edges.


PairsToEdges

Converts arrays of edge pairs into arrays of edges. The function averages the row and column coordinates of evenly-indexed edges with the corresponding row and column coordinates of oddly-indexed edges to convert pairs of edges into single edges.

PairsToEdges Inputs

Syntax: PairsToEdges(Edges,Number of Pairs,Show)

Parameter Description

Edges

A reference to a spreadsheet cell containing an Edges data structure, which must consist of multiple straight-line edges. The function expects the input Edges data structure to be sorted by pairs, such that evenly-indexed edges contain the first edge of an edge pair, and oddly-indexed edges contain the second edge of an edge pair.

Number of Pairs

Specifies the number of edge pairs to convert into edges. (0 to 80; default = 1)

Show

Specifies the display mode for PairsToEdges graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the PairsToEdges function is the active cell in the spreadsheet.
1 = result graphics only | The edge pairs will be displayed at all times.

PairsToEdges Outputs

Returns | An Edges data structure containing edges derived from edge pairs, or #ERR if any of the input parameters are invalid.
Results | When PairsToEdges is initially inserted into a cell, a result table is created in the spreadsheet.

PairsToEdges Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Row0 | GetRow(Edges, Edge Index, 0) | The row coordinate of the first endpoint.
Col0 | GetCol(Edges, Edge Index, 0) | The column coordinate of the first endpoint.
Row1 | GetRow(Edges, Edge Index, 1) | The row coordinate of the second endpoint.
Col1 | GetCol(Edges, Edge Index, 1) | The column coordinate of the second endpoint.
Score | GetScore(Edges, Edge Index) | The edge contrast score.

For more information, see Edge or Edges.


SortEdges

Sorts arrays of edges by the specified criteria. For more information, see Edge.

SortEdges Inputs

Syntax: SortEdges (Edges,Number to Sort,Sort By,Show)

Edges

A reference to a spreadsheet cell containing an Edges data structure. The Edges data structure must consist of multiple straight-line edges.

Number to Sort

Specifies the number of edges to sort (0 to 160; default = 2).

Sort By

Specifies the method by which the edges are sorted.

0 = best score | Sort by order of descending contrast scores.
1 = first-to-last (default) | Sort by the original scan direction.
2 = B2W by score, W2B by score | Sort first by polarity, then by score.
3 = B2W first-to-last, W2B first-to-last | Sort first by polarity, then by original scan order.
4 = last-to-first | Sort by reverse scan order.

Show

Specifies the display mode for SortEdges graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the SortEdges function is the active cell in the spreadsheet. For more information, see Active Cell.
1 = result graphics only | The line edges will be displayed at all times.

SortEdges Outputs

Returns | An Edges data structure containing sorted edges, or #ERR if any of the input parameters are invalid.
Results | When SortEdges is initially inserted into a cell, a result table is created in the spreadsheet.

SortEdges Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Edges

Angle | GetAngle(Edges, Index) | The angle of the specified edge.
Row0 | GetRow(Edges, Edge Index, 0) | The row coordinate of the first endpoint.
Col0 | GetCol(Edges, Edge Index, 0) | The column coordinate of the first endpoint.
Row1 | GetRow(Edges, Edge Index, 1) | The row coordinate of the second endpoint.
Col1 | GetCol(Edges, Edge Index, 1) | The column coordinate of the second endpoint.
Score | GetScore(Edges, Edge Index) | The edge contrast score.


Flaw Detection

The Flaw Detection Vision Tools, SurfaceFlaw, DetectFlaw, FlexFlawModel and TrainFlawModel, are used to perform advanced pattern match analysis to verify the presence or absence of defects.

The SurfaceFlaw Flaw Detection Vision Tool is used to detect small flaws based upon pixel intensity variations, without the use of a trained model. This tool is designed for detecting flaws such as scratches, nicks, tears, stains or chips, on greyscale or color images.

The DetectFlaw, FlexFlawModel and TrainFlawModel Flaw Detection Vision Tools create a model based upon a "golden" or perfect part, and then compare the model against acquired images using an advanced pattern matching algorithm to determine if there are any flaws, such as missing edges, surface scratches or logos were printed incorrectly.

In-Sight vision systems perform detailed flaw detection analysis using the Flaw Detection Vision Tool's functions:

  • SurfaceFlaw: Detects local intensity variations within an image to determine if flaws are present.
  • DetectFlaw: Creates the parameters to determine if a flaw exists or not when comparing acquired images against the model.
  • FlexFlawModel: Creates optional Flex algorithms to compensate for process variations.
  • TrainFlawModel: Creates the model of the "golden" part.
Note: The FlexFlawModel function must reference a data structure output by a TrainFlawModel function. The DetectFlaw function may reference a data structure output by either a TrainFlawModel or DetectFlaw function.

About the Flaw Detection Tools

SurfaceFlaw

DetectFlaw

FlexFlawModel

TrainFlawModel


About the Flaw Detection Tools

The Flaw Detection Vision Tools are composed of two groups of tools, the SurfaceFlaw function and the DetectFlaw, FlexFlawModel and TrainFlawModel functions.

SurfaceFlaw Flaw Detection Vision Tool

The SurfaceFlaw function is designed to detect areas of local intensity and color variations which are flaws in the production process. The function uses an internal filtering operation to first highlight edges and areas with sudden color or greyscale variations, before applying blob analysis to determine whether or not flaws are present.

SurfaceFlaw is a stand-alone function, and does not require the use of a model, simplifying its setup and improving its execution time. Due to not incorporating a model, the function is able to account for run-time lighting variations and accurately detect flaws. However, it does not have the ability to compensate for possible variations, as the DetectFlaw, FlexFlawModel and TrainFlawModel functions can, so it can not adjust for process variations in a part. Therefore, SurfaceFlaw is best suited to applications where a part should have a uniform area to be inspected, such that any sudden change in intensity will be classified as a defect. If the part will have intensity variations, the other Flaw Detection functions should be able to account for the variations.

Note: The SurfaceFlaw function does accept a Mask data structure output by the Mask function. This allows the function to only inspect specified areas within an image. For more information, see Mask.

DetectFlaw, FlexFlawModel and TrainFlawModel Flaw Detection Vision Tools

The DetectFlaw, FlexFlawModel and TrainFlawModel Flaw Detection Tools are designed to perform advanced pattern matching analysis, verifying whether or not defects are present. The functions combine model "stretching" (teaching the function to compensate for possible variations) and image subtraction to create detailed models that are compared against acquired images, determining whether a defect exists in the acquired image. Within this architecture, the functions provide the ability to dynamically update the model during run-time.

The functions, when combined together, are capable of performing the following types of inspections:

  • Boundary Defects: Ensuring that the part/object maintains the same shape.
  • Surface Defects : Ensuring that the part/object does not have any stains or scratches.
  • Print Inspections: Ensuring that the part/object's silk screened logo was printed correctly and without defects.

Build the Model

Detect Defects

Flex the Model


Build the Model

As with all applications, first, a database of images of the part, containing the part in both its "good" and "bad" states is loaded. To begin using the Flaw Detection Tools, first load an image of the object/part that will be inspected that illustrates the part/object in its "golden"/perfect state. This ensures that all of the correct features of the object/part are included in the original model. After the image has been loaded, the TrainFlawModel function is added to the spreadsheet, and either the function's internal Region or a reference to an external region or path is specified to define the object/part in the image. Once all of the parameters have been adjusted to adequately define the model, the function will then store all of the data about the model.


Detect Defects

With the trained model now in place, the DetectFlaw function can be used to classify defects in the object/part as it appears in acquired images. The DetectFlaw function compares the model data stored in the TrainFlawModel function against acquired images to determine if there are area and/or edge defects in the object/part. Area inspections verify whether there are defects such as scratches or stains on the surface of the object/part. Edge inspections verify whether there are extra or missing edges, or that the boundary of the object/part is consistent. Combining area and edge defects provides the highest degree of inspection verification.

The DetectFlaw function also contains controls to dynamically adjust the mask during run-time to ignore certain flaws.


Flex the Model

Optionally, if the object/part may undergo distortions or process variations, the FlexFlawModel function may be used to create Flex algorithms to compensate for the distortions and process variations. The FlexFlawModel allows the model to be "stretched," which involves modifying the model to allow a broader range of possible variations in the part, to ensure that the DetectFlaw function does not classify the variation as a defect.

Definition of terms:

  • Edge Pixel: A pixel in an image that lies on the boundary between two areas of different pixel values.
  • Edge Segment: A continuous boundary between areas of dissimilar pixel values. An Edge Segment is represented by a list of Edge Pixels (i.e. "Edge Features").
  • Flex: The displacement of Edge Pixels and Edge Segments, which may be caused by positioning errors, lens or perspective distortions, registration errors or other normal process variations.
  • Enclosed Segment and Enclosed Segment Flex: An Enclosed Segment is an Edge Segment with the same beginning and ending points; Enclosed Segment Flex is the displacement of an Enclosed Segment.
  • Line Segment Flex: A Line Segment is a portion of an Edge Segment, which may or may not be enclosed; Line Segment Flex is the displacement of a Line Segment.
  • Pixel Flex: The displacement of an Edge Pixel.
  • Flex Resolution: The scaling factor applied to the model image and the mask image when corrections for flex are applied. A higher resolution will more accurately handle non-linear distortion, but will consume more memory.

  • Mask/Masking: A collection of pixel locations which are to be ignored during processing. Pixels which are masked will never generate a defect, regardless of the pixel value.

    Note: The Mask/Masking functionality in the Flaw Detection tools is not the same as those applied in the EditCompositeRegion function. The EditCompositeRegion function is typically used to define an irregular Region of Interest (ROI) and exclude areas of the image, while the masking used by the Flaw Detection tools is computed to determine the pixel greyscale gradient values when creating the model.
  • Area Defects: A type of flaw that is found by comparing the pixels of a trained Model Image against an acquired image, and verifying whether the pixel value (greyscale or color intensity) are the same. Area defects are typically blob-like, and may include discoloration, smears, stains or streaks.
  • Missing Edge Defects: A type of flaw that occurs when a previously trained Edge Segment is not found in the acquired image. Missing edge defects typically include such defects such as changes in a part's contour or a missing feature.
  • Extra Edge Defects: A type of flaw that occurs when an Edge Segment appears in the acquired image that wasn't present in the trained Edge Segment. Extra edge defects typically include defects such as extra features, scratches or tears.
  • Model Image: The image that was saved during training. The Model Image will be compared against acquired images to detect Area Defects.
  • Mask Image: Represents the location and value of Masked Pixels, and the location of Masked Edge Segments. The Mask Image does not include areas of the image excluded by the shape of an EditCompositeRegion function, or other non-rectangular shapes.
  • Residual Image: Produced by comparing the acquired image against the Model Image and Mask Image. This image is generated to detect Area Defects.


SurfaceFlaw

The SurfaceFlaw function is used to detect local intensity variations, which may indicate a flaw, such as a scratch, nick or tear, on the object/part being inspected.

The SurfaceFlaw function is designed to detect areas of local intensity and color variations which are flaws in the production process.The function uses two different types of internal filtering operations (Fast, which is used to detect edge-like flaws, or Light Flaws, Dark Flaws or Light and Dark Flaws, which are used to detect blob-like flaws) to first highlight edges and areas with sudden color or greyscale variations, before establishing a threshold and applying blob analysis to determine whether or not flaws are present.

SurfaceFlaw is a stand-alone function, and does not require the use of a model, simplifying its setup and improving its execution time.Due to not incorporating a model, the function is able to account for runtime lighting variations and accurately detect flaws.However, it does not have the ability to compensate for possible variations, as the DetectFlaw, FlexFlawModel and TrainFlawModel functions can, so it can not adjust for process variations in a part.Therefore, SurfaceFlaw is best suited to applications where a part should have a uniform area to be inspected, such that any sudden change in intensity will be classified as a defect.If the part will have process variations, the other Flaw Detection functions should be able to account for the variations.For more information, see Flaw Detection.

Note: The SurfaceFlaw function does accept a Mask data structure output by the Mask function.This allows the function to only inspect specified areas within an image.For more information, see Mask.

Configuring the SurfaceFlaw function

Setting up the SurfaceFlaw function involves establishing the thresholds that will be used to determine whether or not a flaw exists.Before beginning, collect a database of images of the part to be inspected which contain images of the part in its error-free state, as well as those illustrating common error cases.The images may be loaded using the Record/Playback Options dialog.For more information, see Record/Playback Options Dialog.

To begin, first load an image of the part in its error-free state.Insert the SurfaceFlaw function into the Spreadsheet, and adjust its Region to enclose the area of the image that will be inspected.When configuring the Region, ensure that it does not contain extraneous features, such as labels, the edges of characters or logos, for example.If the inspection will include an edge of a part, the Region must be positioned parallel to the edge (the same applies to circular-shaped Regions, with the circular region arc being parallel to the edge of the part), but not over the edge.

Note:
  • If the part will exhibit motion, use a fixture to ensure the Region moves accordingly with the part.For more information, see Fixture.
  • If the part contains areas that should be excluded from inspection, such as labels or alpha-numeric characters, use a Mask data structure output by the Mask function to remove them.This allows the function to only inspect specified areas within an image.For more information, see Mask.

Ensure that the function's parameters are configured such that the function does not identify any flaws.The SurfaceFlaw function contains a Display Image parameter, which provides visual feedback on how parameter adjustments affect the function.Set the Display Image parameter to Flaw Candidates to begin, so that any detected flaws are enclosed within a red bounding box.

When adjusting the parameters, try adjusting the Sampling Factor and Smoothing Factor parameters.Increase the Sampling parameter when trying to detect low gradient flaws, or large flaws with low contrast.Increase the Smoothing Factor parameter to help get rid of small, false defects.

After adjusting those parameters, use the different options of the Detection Type, Detection Size and Detection Axis parameters.The function has two types of flaw detection operations: edge-like flaws or blob-like flaws.When the Detection Type parameter is set to Fast, the function performs an Erosion-Dilation filter to detect edge-like flaws at the edge of "area"-type flaws.Thus, the function will report the size of the flaw as the perimeter of the flaw's bounding box, versus the overall area of the flaw.This setting is useful in detecting flaws such as scratches or tears.

The Light Flaws, Dark Flaws or Light and Dark Flaws Detection Type options use combinations of Bottom-Hat and Top-Hat filters to detect blob-like flaws.This allows the function to detect flaws based on their pixel size.These options are useful in detecting flaws based on their area, such as splotches, smears or stains.However, these three Detection Type options generally require more processing time.

For most applications that require the Detection Type parameter be set to Fast, a Detection Size of 1 is typically appropriate.For applications that require Light Flaws, Dark Flaws or Light and Dark Flaws, the Detection Size parameter must be set to a size that is greater than the radius of the flaw to be detected.

Note: If the Region parameter is configured to be parallel to an edge, the Detection Axis must be set to run parallel to the Region.

Finally, adjust the Minimum Flaw Area, Maximum Flaw Area and Minimum Contrast parameters to ensure that the flaws are being properly detected and highlighted, respectively.

Once the function is correctly inspecting the part in its error-free state, load an image of the part containing a flaw.Again, go through the process of adjusting the parameters until the function correctly identifies the desired flaws.After the flaws have been identified, re-load an image of the part in its error-free state and ensure it is still being correctly inspected as not containing flaws.The function will be ready for run-time inspections once all of the database images have been properly configured.

SurfaceFlawInputs

Syntax: SurfaceFlaw(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region,Straighten Images,Sampling Factor,Automatic Smoothing,Smoothing Factor,Detection Type,Detection Size,Detection Axis,Calculate Flaw Data,Calculate Flaw Shapes,Minimum Flaw Area,Maximum Flaw Area,Minimum Contrast,Timeout,Display Image,Display Row,Display Col,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Note:
  • The SurfaceFlaw function operates in pixel coordinates.
  • The SurfaceFlaw function supports both greyscale and color images.When referencing a color image, defects in any of the three color planes, Red, Green and Blue (RGB), are identified.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
Note: Use the External Region parameter instead of setting cell references to the region coordinates if attempting to define the ROI relative to the output of another Vision Tool function or Controls function.The External Region parameter will properly account for fixture movement, while the cell references may not function correctly and may cause any functions that reference it to result in #ERR.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

Specifies a reference to a spreadsheet cell that contains a Controls function or a Mask data structure, output by a Mask function. When this parameter is used, the function will ignore the Region and Fixture settings and inspects the image area specified by the referenced region. For more information, see Controls Functions and Mask.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Straighten Images

Specifies whether or not the function will straighten a curved or angled region of interest (ROI), prior to further image processing.Enabling this parameter is helpful in situations where flaws are only being detected along a particular axis (X or Y); the detection kernel always processes along the image's X and Y axis, independent of the ROI orientation or shape.In order to detect a flaw along a straight edge that is "diagonal" in the image, the image should first be straightened.

Note:
  • This parameter is necessary if the internal Region or the External Region parameters have an angle or are curved.
  • If the SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.
0 = Off (default) | Specifies that the function will not straighten a curved or angled ROI.
1 = On | Specifies that the function will straighten a curved or angled ROI.

Sampling Factor

Specifies the amount by which to sample (1 to 99999; default = 1) the input image, thus reducing its resolution.Sampling is used to help reduce the function's execution time, however, at the expense of accuracy.Sub-sampling the image is helpful in instances where the contrast of the flaws is low and they gradually move; sub-sampling brings the pixels closer together so the transitions are shorter and steeper.When determining the proper sampling value, a value of 1 denotes no sampling, i.e.that the input image will be used at full resolution.Higher values denote less resolution and accuracy, but faster execution times.

Automatic Smoothing

Specifies whether or not the function will determine the optimal smoothing factor by which to smooth the image.Allowing the function to select the optimal smoothing factor generally enables better performance.

Note: The Automatic Smoothing parameter is Off by default.To enable the parameter, the Sampling Factor parameter must be set to a value greater than 1.If the Sampling Factor parameter is set to a value greater than 1 and Automatic Smoothing is not desired, turn off the parameter and set the appropriate value using the Smoothing Factor parameter, instead.
0 = Off (default) | Specifies that a manual smoothing factor will be applied using the Smoothing Factor parameter.
1 = On | Specifies that the function will determine the optimal smoothing factor.

Smoothing Factor

Specifies the factor (0 to 99999; default = 0) by which to smooth the image.When determining the optimal value, begin with a similar value as specified in the Sampling Factor parameter.To specify no smoothing, set the value to 0.

Note: This parameter is disabled if the Automatic Smoothing parameter is enabled.

Detection Type

Specifies the type of image processing to apply to the image to determine if flaws are present.

Note: If Light Flaws, Dark Flaws or Light and Dark Flaws is the selected type of image processing, the Detection Size parameter must be set to the size of the largest flaw to be detected.
0 = Fast (default) | This option is ideally suited for detecting "edge-like" intensity transitions on a surface, such as streaks or scratches.It applies an erode-dilation operation, which highlights the edge of a flaw.It has the best execution time, however, when reporting flaws, it only reports the perimeter of the flaw, not its area.
1 = Light Flaws | This option is ideally suited for detecting light "blob-like" flaws on a dark background, and detecting flaws based on their area pixel size.It applies a "top hat" filtering operation, which filters out everything except bright features that are smaller than the size of the Detection Size parameter, to detect potential flaws.
2 = Dark Flaws | This option is ideally suited for detecting dark "blob-like" flaws on a light background, and detecting flaws based on their area pixel size.It applies a "bottom hat" filteringoperation, which filters out everything except dark features that are smaller than the size of the Detection Size parameter.
3 = Light and Dark Flaws | This option is ideally suited for detecting "blob-like" flaws where the flaw could be either dark or light, and detecting flaws based on their area pixel size.It applies both "bottom hat" and "top hat" operations and utilizes the maximum result of the two operations.

Detection Size

Specifies the detection neighborhood size (1 to 99999; default = 1), in pixels.This parameter is used to construct the processing neighborhood, or kernel, for use with the Detection Type parameter.

Note: For all the Detection Type operations other than Fast, the size value must be set to a value that is at least as large as the length or width of the flaws to be detected.

Detection Axis

Specifies the axis in which to detect potential flaws.This parameter also determines the height of the kernel.For example, if this parameter is set to X and Y, with a Detection Size of 1, the kernel will be a 3 x 3 grid.If this parameter were set to X, with a Detection Size of 1, the kernel will be 1 x 3, in the X direction.

0 = X | The function will attempt to detect flaws along the X axis.
1 = Y | The function will attempt to detect flaws along the Y axis.
2 = X and Y (default) | The function will attempt to detect flaws along both the X and Y axis.

Calculate Flaw Data

Specifies whether or not the function will calculate the area, intensity and bounding box for each detected flaw.

Note: Disabling this parameter will decrease the function's execution time.When this parameter is disabled, the internal blob analysis will not be performed.This will cause the function to only return the total area of "flaw " pixels, and no graphical information will denote where the flaws are located in the image.The function's auto-generated results table will return #ERR for the individual results; to extract the data, use the GetTotalFlawArea Vision Data Access function, which returns the total area of all of the flaws, combined.For more information, see Flaw Detection.
0 = Off | Specifies that the function will not calculate the area, intensity and bounding box for each detected flaw.
1 = On (default) | Specifies that the function will calculate the area, intensity and bounding box for each detected flaw.

Calculate Flaw Shapes

Specifies whether or not the function will also calculate the perimeter and roundedness of each flaw.Roundedness is a unit-less number that represents how circular a flaw is; a perfect circle has a roundedness value of 1.0.Elongated flaws will have values greater than 1, with values larger than that representing even further elongation.Point-like flaws may have values closer to 0.

Note: The Calculate Flaw Data parameter must be enabled to activate this parameter.
0 = Off | Specifies that the function will not also calculate the perimeter and roundedness of each flaw.
1 = On (default) | Specifies that the function will also calculate the perimeter and roundedness of each flaw.

Minimum Flaw Area

Specifies the minimum size (1 to 99999; default = 30), in pixels, of the flaws to detect.

Maximum Flaw Area

Specifies the maximum size (1 to 99999; default = 99999), in pixels, of the flaws to detect.A value of 0 specifies that there is no maximum size.

Minimum Contrast

Specifies the intensity threshold (1 to 255; default = 20) used to detect flaws.For a flaw to be detected, its intensity must differ by this value from the background.

Timeout (ms)

Specifies the amount of time, in milliseconds (0 to 30000; default = 0/No Timeout), that the function will search for flaws before execution is halted and #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Display Image

Specifies the output image to display.

Note: This image is for display purposes only, and may not be used as an input to another function.
0 = Input Image | Specifies that the currently acquired image will be displayed.
1 = Straightened Image | Specifies that a transformed and straightened image will be displayed, when an angled or curved Region is used as an input.
2 = Sampled Image | Specifies that the smoothed and sampled image will be displayed.If an angled or curved ROI was used as an input, the transformed and straightened version will be displayed in addition to the smoothed and sampled affects.
3 = Flaw Candidates | Specifies that the potential flaws will be displayed.Potential flaws are highlighted in contrast to the background, and surrounded by a red bounding box.This display option will include flaws that fall outside the limits of defined flaws (Minimum Flaw Area and Maximum Flaw Area).
4 = Flaw Image (default) | Specifies that flaws will be displayed.Flaws will be drawn in white, while all other areas are drawn in black.

Display Row

Specifies the Row coordinate (default = 0) where the display image will be displayed, relative to the upper left-hand corner.

Note:
  • This parameter is enabled under the following conditions:
    • The Display Image parameter is set to either Sampled Image, Flaw Candidates or Flaw Image, and the Sampling Factor parameter is set to a value greater than 1.
    • The Display Image parameter is set to Straightened Image, Sampled Image, Flaw Candidates or Flaw Image, the Straighten Images parameter is enabled, and the Region Angle and/or Curve parameter settings do not equal 0.

Display Col

Specifies the Column coordinate (default = 0) where the display image will be displayed, relative to the upper left-hand corner.

Note:
  • This parameter is enabled under the following conditions:
    • The Display Image parameter is set to either Sampled Image, Flaw Candidates or Flaw Image, and the Sampling Factor parameter is set to a value greater than 1.
    • The Display Image parameter is set to Straightened Image, Sampled Image, Flaw Candidates or Flaw Image, the Straighten Images parameter is enabled, and the Region Angle and/or Curve parameter settings do not equal 0.

Show

Specifies the display mode for SurfaceFlawgraphical overlays on top of the image.

0 = hide all (default)

All graphics will be hidden, exceptwhen the cell containing the SurfaceFlaw function is highlighted in thespreadsheet.

1 = result graphics only

The specified Display Image will be shown atall times.

2 = input and result graphics

The specified Display Image and result graphics (red rectangles will be drawn around detected flaws) will be displayed at all times.

Note: If the External Region parameter is set as a reference to a Mask data structure, no input image will be displayed.

SurfaceFlawOutputs

Returns | A SurfaceFlaw data structure containing the display image data and detected flaws; or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted intoa cell, a results tableis created in the spreadsheet. Note: If the Calculate Flaw Data parameter is disabled, the function will only return the total area of all of the detected flaws; use the GetTotalFlawArea Vision Data Access function, which returns the total area of all of the flaws, combined.For more information, see Flaw Detection.

SurfaceFlawVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Flaw Detection.

Spreadsheet Name | Function Name | Description
Total Flaw Size | GetTotalFlawArea(SurfaceFlaw) | Returns the total area of all of the flaws, combined.
Index | N/A | Returns the indexed flaws, sorted from largest to smallest in area.
Row | GetRow(SurfaceFlaw, Index) | Returns the row coordinate, in pixels, of the bounding box surrounding the flaw.
Col | GetCol(SurfaceFlaw, Index) | Returns the column coordinate, in pixels, of the bounding box surrounding the flaw.
High | GetHigh(SurfaceFlaw, Index) | Returns height value, in pixels, of the bounding box surrounding the flaw.
Wide | GetWide(SurfaceFlaw, Index) | Returns the width value, in pixels, of the bounding box surrounding the flaw.
Area | GetArea(SurfaceFlaw, Index) | Returns the area, in pixels, of the flaw.
Perimeter | GetPerimeter(SurfaceFlaw, Index) | Returns the perimeter, in pixels, of the flaw.
Intensity | GetAverageIntensity(SurfaceFlaw, Index) | Returns the average pixel intensity value of the flaw.
Roundedness | GetRoundedness(SurfaceFlaw, Index) | Returns the roundedness, in pixels, of the flaw.


DetectFlaw

The DetectFlaw function is used to identify flaws by comparing the trained data contained in a either a valid TrainFlawModel data structure returned by a TrainFlawModel function, or a FlexFlawModel data structure returned by a FlexFlawModel function, and the currently acquired image. The DetectFlaw function is capable of identifying the following three types of flaws: Area Defects, Missing Edge Defects and/or Extra Edge Defects. For more information about TrainFlawModel, see TrainFlawModel. For more information about FlexFlawModel, see FlexFlawModel.

Area inspections verify whether or not there are defects such as scratches or stains on the surface of the object/part. Edge inspections verify whether or not there are extra or missing edges, or that the boundary of the object/part is consistent. Combining area and edge defects provides the highest degree of inspection verification.

Tip:
  • One or more DetectFlaw functions may be referenced to a single TrainFlawModel function, which allows each DetectFlaw function to inspect different portions of the object/part using different settings, if necessary.
  • Additional image processing may be performed on the DetectFlaw output image when the Display Image parameter is set to either Edge Image, Model Image, Mask Image or Residual Image. For example, additional blob image analysis could be performed by setting an ExtractBlobs function's Image parameter to the use the Residual Image of the DetectFlaw function as an input.
  • To reduce the function's execution time, set the function's Image Resolution parameter to Medium or Coarse, which down-samples the image and decreases the function's sensitivity to image noise and very small variations.

DetectFlaw Inputs

General Tab

Syntax: DetectFlaw(Flaw Model Reference,Inspection Region.X,Inspection Region.Y,Inspection Region.High,Inspection Region.Wide,Inspection Region.Angle,Inspection Region.Curve,External Inspection Region or Path,Image Resolution,Mask Image Controls.Add Residual,Mask Image Controls.Default Mask,Defect Parameters.Minimum Contrast,Defect Parameters.Normalize,Defect Parameters.Area Defect Type,Defect Parameters.Minimum Area Defect Size,Defect Parameters.Edge Defect Type,Defect Parameters.Minimum Edge Defect Size,Draw Edge Markings,Draw Flaw Markings,Display Image,Show )

Parameter Description

Flaw Model Reference

 Specifies a reference to a spreadsheet cell that contains either a valid TrainFlawModel data structure returned by a TrainFlawModel function, or a FlexFlawModel data structure returned by a FlexFlawModel function.

Inspection Region

Specifies the region, also known as the Region of Interest (ROI), of the image that undergoes image analysis; creates a rectangular image region that can be transformed and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.

Note:
  • The Inspection Region parameter must be defined within the bounds of the image; otherwise, the function will return #ERR.
  • The Inspection Region will automatically be fixtured to the same input fixture specified in the referenced TrainFlawModel function. If the fixture reference is invalid, the fixture will default to 0,0,0.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Inspection Region or Path

Specifies a reference to a spreadsheet cell that contains a Controls function. When this parameter is used, the TrainFlawModel tool ignores the Region and Fixture settings and inspects the image area specified by the referenced region.

Note: If this parameter has been set as a reference to an external region or path, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region or path.

Image Resolution

Specifies an image processing resolution for the function, which allows the function to down-sample the inspection image. This parameter specifies the resolution used to perform flaw detection, as well as the resolution of the output image and markings on the image.

Tip: Use the Medium or Coarse settings to reduce the execution time of the function, or to decrease the function's sensitivity to image noise and very small variations.
Note: If the Model Reference parameter is referencing a FlexFlawModel data structure returned by a FlexFlawModel function, this parameter will be disabled and the Image Resolution parameter settings of the FlexFlawModel function will be used instead.
1 = Fine (default) | Specifies that full image resolution will be utilized.
2 = Medium | Specifies that half image resolution will be utilized.
3 = Coarse | Specifies that quarter image resolution will be utilized.

Mask Image Controls

Specifies an external reference to a Button or Event function to control how the function processes the Mask Image. These references provide the ability to dynamically adjust the mask during run-time to ignore certain flaws.

Add Residual | Specifies a reference to a Button or Event function to add the current residual image to the Mask Image.
Default Mask | Specifies a reference to a Button or Event function that sets the Mask Image to its initially trained state, by regenerating the mask data from the Model Image.

Defect Parameters

Specifies the limits for determining area and/or edge flaws. Area flaws are measured by deviations of the pixel greyscale value, and typically include defects such as blemishes or discolorations. Edge flaws are measured by the presence/absence of edge features, and typically include defects such as scratches, tears or extra features.

Note: When applying the DetectFlaw function, if the tolerances for the Defect Parameters are narrow (i.e. ≤ 15 pixels, for instance), and the image encounters minor variations in image noise, the options Ignore Defect and Add Residual may not account for the variations. In these situations, attempt to broaden the tolerances for the Defect Parameters before applying the Ignore Defect or Add Residual options.

Minimum Contrast

Specifies the minimum contrast (1 to 255; default = 25) transition value to be considered as an edge or an area defect.

Normalize

Specifies whether or not the normalization of intensity levels in the residual image will be performed prior to inspecting the region for area defects.

0 = Off (default) | Specifies that the function will not perform normalization of intensity levels prior to inspecting for area defects.
1 = On | Specifies that the function will perform normalization of intensity levels prior to inspecting for area defects.

Area Defect Type

Specifies the type of area defects to identify. When enabled, the function will identify blobs of pixels in the residual image that exceed the specified Minimum Contrast and Minimum Area Defect Size values.

0 = None | Disables area defect detection.
1 = Both (default) | The function will identify defects that are caused by pixels in the currently acquired image that are either brighter or darker than those in the trained model.
2 = Light Defects | The function will only identify defects that are caused by pixels in the currently acquired image that are brighter than those in the trained model.
3 = Dark Defects | The function will only identify defects that are caused by pixels in the currently acquired image that are darker than those in the trained model.
Minimum Area Defect Size

Specifies the minimum area defect size (2 to 400000; default = 30), in pixels; an area below this value is not considered a defect.
Edge Defect Type

Specifies the type of edge defects to identify.

0 = None | The function will not identify edge defects.
1 = Both | The function will verify the presence/absence of both Missing Edges and Extra Edges.
2 = Missing Edges (default) | The function will verify that all of the previously trained edges in the model are present in the currently acquired image. Missing edges that exceed the specified Minimum Edge Defect Size value will be classified as a flaw.
3 = Extra Edges | The function will verify that there are not additional edges present in the currently acquired image that were not in the trained model. Extra edges that exceed the specified Minimum Edge Defect Size value will be classified as a flaw.
Minimum Edge Defect Size Specifies the minimum length (2 to 1000; default = 5) of an edge to classify it as a missing and/or extra edge; detected edges shorter than this setting are not classified as defects.
Draw Edge Markings

Specifies whether or not the function will draw the detected edge marks, in green, on the image. The output markings indicate which pixels align with pixels in the trained Model Image. Pixels in the acquired image which coincide with a trained edge segment in the trained Model Image will be drawn in green. Pixels which fall outside of tolerances and are classified as either edge or area defects are drawn in red, and a red bounding box is placed around them.

0 = Off (default) | Specifies that the function will not draw the edge marks on the image.
1 = On | Specifies that the function will draw the edge mark on the image.
Draw Flaw Markings

Specifies whether or not the function will draw the detected flaw marks, in red, on the image. The output markings indicate which pixels align with pixels in the trained Model Image. Pixels in the acquired image which coincide with a trained edge segment in the trained Model Image will be drawn in green. Pixels which fall outside of tolerances and are classified as either edge or area defects are drawn in red, and a red bounding box is placed around them.

0 = Off (default) | Specifies that the function will not draw the detected flaw marks, in red, on the image.
1 = On | Specifies that the function will draw the detected flaw marks, in red, on the image.
Display Image

Specifies the type of output the function will generate.

0 = Live Image (default) | The function will generate the currently acquired image as the output image.
1 = Edge Image | The function will generate the edge model from the currently acquired image as the output image. This option is only available if the Edge Defect Type parameter is set to Missing Edges, Extra Edges or Both, or the function is referencing a FlexFlawModel data structure returned by a FlexFlawModel function in the Model Reference parameter.
2 = Model Image | The function will generate the trained model image, after being transformed based on fixture and scale, and, optionally, Flex algorithms.
3 = Mask Image | The function will generate the current mask image, after being transformed based on fixture and scale, and, optionally, Flex algorithms.
4 = Residual Image | The function will generate the residual image based on the flaw detection analysis. Note: If the residual image is being used as an output image, Area Defects must be enabled. Otherwise, edge defects will still be drawn, but the output image will not be generated and an error message will be displayed.

Show

Specifies the display mode for DetectFlaw graphical overlays on top of the image. The output markings indicate which pixels align with pixels in the trained Model Image.

Note: When the DetectFlaw property sheet is open, all of the markings will be drawn on the image, if the Draw Edge Markings and Draw Flaw Markings parameters are enabled.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the DetectFlaw function is highlighted in the spreadsheet.
1 = result graphics only | The enabled markings, defects and input region will be displayed at all times.
2 = show all: input and result graphics | Both the input region, detected defects, and detected edges will be displayed at all times. Note: The Draw Edge Markings and Draw Flaw Markings parameters must be enabled to display the detected defects and edges.

Edit Mask Tab

Mask Image Editing Controls

The Mask Image Editing controls provide a means to manipulate the mask image saved in the referenced TrainFlawModel data structure. While the Edit Mask tab is selected, the image will be displayed, and if the Edge Defect Type parameter is enabled, masked edges will be marked, and if the Area Defect Type parameter is enabled, the mask image will be displayed.

Note:
  • Adjusting the Mask Image will affect any other DetectFlaw functions that reference the same TrainFlawModel function which contains the Mask Image.
  • When applying the DetectFlaw function, if the tolerances for the Defect Parameters are narrow (i.e. ≤ 15 pixels, for instance), and the image encounters minor variations in image noise, the options Ignore Defect and Add Residual may not account for the variations. In these situations, attempt to broaden the tolerances for the Defect Parameters before applying the Ignore Defect or Add Residual options.
Add Residual Image | Specifies that the residual image and residual edges will be added to the mask. This setting has the effect of changing the defects identified in the image into non-defects.
Expand Mask | Specifies that the area of the pixels in the mask are expanded. Note: Area Defect Types must be enabled to use this option.
Shrink Mask | Specifies that the area of the pixels in the mask are reduced. Note: Area Defect Types must be enabled to use this option.
Remove Mask | Specifies that all of the mask data is removed.
Default Mask | Specifies that the Mask Image is reset to its initially trained state, by regenerating the mask data from the Model Image.

Defect List Tab

Defect List Table

The Defect List provides a sortable table of the detected flaw(s). Selecting a flaw in the list will highlight it in the image, and also enables the Ignore Defect button; multiple flaws may be selected by using either the CTRL or SHIFT keys while selecting defects in the list.

Note: When applying the DetectFlaw function, if the tolerances for the Defect Parameters are narrow (i.e. ≤ 15 pixels, for instance), and the image encounters minor variations in image noise, the options Ignore Defect and Add Residual may not account for the variations. In these situations, attempt to broaden the tolerances for the Defect Parameters before applying the Ignore Defect or Add Residual options.
Number | Specifies the numeric order of the detected flaws, from 1 to N.
Type | Specifies the type of flaw: Extra Edge, Missing Edge or Area.
Size | Specifies the size, in pixels, of the flaw.
Contrast | Specifies the contrast of the flaw.
Row | Specifies the row coordinate of the bounding box surrounding the flaw.
Column | Specifies the column coordinate of the bounding box surrounding the flaw.
Height | Specifies the height value of the bounding box surrounding the flaw.
Width | Specifies the width value of the bounding box surrounding the flaw.
Ignore Defect Button | Specifies that the selected flaw(s) will be added to the Mask Image, no longer reported as a flaw and removed from the list. A flaw must be selected to enable the button.

DetectFlaw Outputs

Returns

A DetectFlaw data structure containing the detected flaws, or #ERR if any of the input parameters are invalid.

Note: The DetectFlaw data structure may be used as an Image input for other Vision Tools. For more information, see Vision Tools.

Results

When DetectFlaw is initially inserted into a cell, a results table is created in the spreadsheet.

DetectFlaw Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the DetectFlaw data structure result table. For more information on Vision Data Access functions, see Flaw Detection.

Spreadsheet Name | Function Name | Description
Summary Total Count | GetTotalFlawCount(DetectFlaw, Type) | Returns the total number of detected flaws, regardless of type.
Total Flaw Size | GetTotalFlawSize(DetectFlaw, Type) | Returns the total number of pixels that are classified as flaws.
Count
Area | GetTotalFlawCount(DetectFlaw, Type) | Returns the total number of detected area flaws.
Missing Edges | GetTotalFlawCount(DetectFlaw, Type) | Returns the total number of detected missing edge flaws.
Extra Edges | GetTotalFlawCount(DetectFlaw, Type) | Returns the total number of detected extra edge flaws.
Flaw Size
Area | GetTotalFlawSize(DetectFlaw, Type) | Returns the total number of pixels that are classified as area flaws.
Missing Edges | GetTotalFlawSize(DetectFlaw, Type) | Returns the total number of pixels that are classified as missing edge flaws.
Extra Edges | GetTotalFlawSize(DetectFlaw, Type) | Returns the total number of pixels that are classified as extra edge pixels.
Flaw Type Note: For each of the Flaw Types (Area, Missing Edge and Extra Edge) the first five detected flaws are displayed.
Size | GetFlawSize(DetectFlaw, Type, Index) | Returns the size, in pixels, of the flaw.
Contrast | GetFlawContrast(DetectFlaw, Type, Index) | Returns the contrast of the flaw.
Row | GetFlawRow(DetectFlaw, Type, Index) | Returns the row coordinate of the bounding box surrounding the flaw.
Col | GetFlawCol(DetectFlaw, Type, Index) | Returns the column coordinate of the bounding box surrounding the flaw.
High | GetFlawHigh(DetectFlaw, Type, Index) | Returns height value of the bounding box surrounding the flaw.
Wide | GetFlawWide(DetectFlaw, Type, Index) | Returns the width value of the bounding box surrounding the flaw.


FlexFlawModel

The FlexFlawModel function is used to construct optional Flex algorithms, which help compensate for acceptable process variations in the TrainFlawModel function, allowing the DetectFlaw function to better classify flaws. For more information, see DetectFlaw. The FlexFlawModel function measures the displacement within the TrainFlawModel or Mask function's Region, by comparing the trained Edge Model against the Edge Model in the currently acquired image. For more information, see TrainFlawModel or Mask.

FlexFlawModel Overview

The FlexFlawModel function operates within the ROI specified by the referenced TrainFlawModel function. During inspection, the function will translate, rotate and scale the trained Edge Model to the current location and orientation of the part, based on the fixture and scale values in the referenced TrainFlawModel function. The FlexFlawModel function will then extract the edges within the ROI, at the specified Image Resolution value. These extracted edges will be compared against the trained Edge Model. The function then calculates an initial Match Score, and if this first score is too low, the function will return #ERR. Provided the Match Score is high enough, the function executes the Flex algorithm, based on the Flex Recipe values. Afterward, the function calculates a final Flex Score.

Building the Flex algorithms, by adjusting the Flex Parameters, allows the model to "stretch" to compensate for acceptable variations that would otherwise be classified as flaws. This stretching also helps the model more closely resemble the part in the currently acquired image. Flex may be applied to align the part prior to running the DetectFlaw function to reduce false rejects.

The Flex algorithms help compensate for the following:

  • Positional errors, such as slight movements from image to image.
  • Lens or perspective distortion.
  • Acceptable part variations, such as slight differences in shape or surface values.
  • Pixel lengthening, such as that associated with line scan images.
  • The part's scale changes in the image.

FlexFlawModel Inputs

Syntax: FlexFlawModel(TrainFlawModel,Image Resolution,Minimum Edge Strength,Minimum Match Score,Flex Parameters.Flex Recipe,Flex Parameters.Flex Grid Size,Flex Parameters.Allow Enclosed Segment Flex,Flex Parameters.Enclosed Segment Flex,Flex Parameters.Allow Line Segment Flex,Flex Parameters.Line Segment Flex,Flex Parameters.Line Segment Maximum Line Size,Flex Parameters.Allow Pixel Flex,Flex Parameters.Pixel Flex,Draw Options,Display Image,Show)

Parameter Description

TrainFlawModel

 Specifies a reference to a spreadsheet cell that contains a valid TrainFlawModel data structure returned by a TrainFlawModel function.

Image Resolution

Specifies an image processing resolution for the function, which allows the function to down-sample the inspection image. This parameter specifies the resolution used to perform flaw detection, as well as the resolution of the output image and markings on the image.

Tip: Use the Medium or Coarse settings to reduce the execution time of the function, or to decrease the function's sensitivity to image noise and very small variations.
1 = Fine (default) | Specifies that full image resolution will be utilized.
2 = Medium | Specifies that half image resolution will be utilized.
3 = Coarse | Specifies that quarter image resolution will be utilized.

Minimum Edge Strength

Specifies the minimum required greyscale intensity transition (5 to 255; default = 20) to extract edge features from the image.

Minimum Match Score

Specifies the initial minimum match score (10 to 100; default = 30) to initiate the use of the Flex Parameters. If the initial match score is less than this value, then the Flex Parameters will not process and the function will result in #ERR.

Flex Parameters

Specifies the limits to the flex type and the amount of flex which can be tolerated.

Flex Recipe

Specifies a set of read-only pre-configured settings, which provide a suggested set of values for different applications.

0 = Default
  • Flex Grid Size = 8x8
  • Allow Enclosed Segment Flex = Off
  • Enclosed Segment Flex = 20
  • Allow Line Segment Flex = On
  • Line Segment Flex = 10
  • Line Segment Maximum Line Size = 15
  • Allow Pixel Flex = On
  • Pixel Flex = 1

1 = Large Flex
  • Flex Grid Size = 4x4
  • Allow Enclosed Segment Flex = On
  • Enclosed Segment Flex = 40
  • Allow Line Segment Flex = On
  • Line Segment Flex = 20
  • Line Segment Maximum Line Size = 8
  • Allow Pixel Flex = On
  • Pixel Flex = 10
Tip: Large Flex is best suited to applications where there is significant non-linear distortion.

2 = Print Growth
  • Flex Grid Size = 4x4
  • Allow Enclosed Segment Flex = On
  • Enclosed Segment Flex = 30
  • Allow Line Segment Flex = On
  • Line Segment Flex = 1
  • Line Segment Maximum Line Size = 40
  • Allow Pixel Flex = On; Pixel Flex = 1
Tip: Print Growth is best suited to applications to verify the quality of printed characters and the function must adjust to growth in the characters.
3 = Mouse Bite
  • Flex Grid Size = 8x8
  • Allow Enclosed Segment Flex = On
  • Enclosed Segment Flex = 5
  • Allow Line Segment Flex = On
  • Line Segment Flex = 5
  • Line Segment Maximum Line Size = 10
  • Allow Pixel Flex = On; Pixel Flex = 1
Tip: Mouse Bite is best suited to applications that are edge boundary-based and the flaw sizes are very small.
4 = Fine Detail
  • Flex Grid Size = 2x2
  • Allow Enclosed Segment Flex = On
  • Enclosed Segment Flex = 10
  • Allow Line Segment Flex = On
  • Line Segment Flex = 3
  • Line Segment Maximum Line Size = 15
  • Allow Pixel Flex = On; Pixel Flex = 1
Tip: Fine Detail is best suited to applications where there is significant non-linear distortion for detecting small flaws. This option is more time consuming.
98 = Custom

Allows for custom creation of Flex Recipe settings, by manually entering different values in the Flex Parameters. The initial values will be based on the previously selected recipe's default values.

Note: If a cell reference has been created to control the Flex Recipe selection, and the property sheet for the function is opened and changes are made to the Flex Recipe parameter, the function will overwrite the command from the cell reference.
99 = No Flex
  • Flex Grid Size = 2x2
  • Allow Enclosed Segment Flex = Off
  • Enclosed Segment Flex = 1
  • Allow Line Segment Flex = Off
  • Line Segment Flex = 1
  • Line Segment Maximum Line Size = 3
  • Allow Pixel Flex = Off
  • Pixel Flex = 1
Note: The No Flex setting specifies that the function will use the minimum allowed settings to compute flex. To apply no flex whatsoever, the FlexFlawModel function itself must be disabled.

Flex Grid Size

Specifies a granularity setting that is applied to the Model Image and Mask Image when corrections for flex are utilized. The higher granularity setting more accurately handles non-linear distortion, but will consume more memory.

1 = 2x2 | Specifies the highest granularity setting.
2 = 4x4 | Specifies the second highest granularity setting.
3 = 8x8 (default) | Specifies the third highest granularity setting.
4 = 16x16 | Specifies the lowest granularity setting.

Allow Enclosed Segment Flex

Specifies whether or not the function will tolerate the displacement of enclosed segments.

1 = On | The function will tolerate the displacement of enclosed segments.
0 = Off (default) | The function will not tolerate the displacement of enclosed segments.
Enclosed Segment Flex | Specifies the maximum amount of displacement (1 to 40; default = 20) that will be tolerated from the center of the enclosed segments.
Allow Line Segment Flex

Specifies whether or not the function will tolerate the displacement of a portion of an edge.

1 = On (default) | The function will tolerate the displacement of a portion of an edge.
0 = Off | The function will not tolerate the displacement of a portion of an edge.
Line Segment Flex | Specifies the maximum amount of line segment displacement (1 to 20; default = 10) that will be tolerated for edge segments.
Line Segment Maximum Line Size | Specifies the maximum length (3 to 500; default = 15) in which an edge may be divided into.
Allow Pixel Flex

Specifies whether or not flex will be calculated for each edge pixel.

1 = On (default) | The function will calculate flex for each edge pixel.
0 = Off | The function will not calculate flex for each edge pixel.
Pixel Flex | Specifies the maximum amount of displacement (1 to 10; default = 1) a pixel may undergo.

Draw Options

Specifies which results the function will draw on the image.

0 = Edge Markings (default) | Specifies that the function will draw the edge match results, between the current edge model and the edge model after the flex algorithm has been applied.
1 = Edge Displacement | Specifies that the function will draw the results to indicate how the model image has been modified via the flex algorithms to match the currently acquired image.
2 = Grid Displacement | Specifies that the function will first internally divide the image into a grid to indicate the quantity and direction that the pixels within a section of the grid were modified via the flex algorithms to match the currently acquired image.
3 = None | Specifies that no drawing will be performed.

Display Image

Specifies the type of output image the function will generate.

0 = Live Image (default) | Specifies that the function will display the currently acquired image.
1 = Edge Image | Specifies that the function will display the edge model generated from the currently acquired image.

Show

Specifies the display mode for FlexFlawModel graphical overlays on top of the image. Pixels that match those in the trained model will be colored green; pixels that do not match will be colored yellow; pixels that are missing from the Mask Image will be colored blue; extra pixels in the Mask Image will be colored dark magenta; extra edge defects will be colored magenta; and missing edge and area defect pixels will be colored in red.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the FlexFlawModel function is highlighted in the spreadsheet.
1 = result graphics only | The selections specified in the Draw Options and Display Image and the inspection region of the referenced TrainFlawModel will be displayed at all times.
2 = show all: input and result graphics | Both the input region, the selections specified in the Draw Options and Display Image and the inspection region of the referenced TrainFlawModel will be displayed at all times.

FlexFlawModel Outputs

Returns | A FlexFlawModel data structure containing the Flex algorithm modified model data, or #ERR if any of the input parameters are invalid.
Results | When FlexFlawModel is initially inserted into a cell, to the right of the data structure, two cells are automatically populated with Vision Data Access functions: GetMatchScore and GetFlexScore. GetMatchScore returns a value indicating the edge match score prior to the Flex algorithm being applied, and GetFlexScore returns a value indicating the edge score after the Flex algorithm has been applied. For more information, see Flaw Detection.


TrainFlawModel

The TrainFlawModel function is used to create the model of the "golden" or perfect part/object that will be compared against acquired images.

This function defines what will be inspected.The Region of Interest (set either through the Region or External Region or Path parameter) defines the area of the image that is trained, as well as where the DetectFlaw and FlexFlawModel functions which reference it, perform their search.For more information, see DetectFlaw and FlexFlawModel.

On each image acquisition, the ROI is adjusted based on the current Fixture values.The ROI coordinates, and updated Scale value, are passed to any DetectFlaw or FlexFlawModel functions that reference it.The TrainFlawModel will retain the model.

Note: The TrainFlawModel function passes updated Region, Fixture and Scale data to the DetectFlaw and FlexFlawModel functions which reference it, therefore this function should not be disabled unless all of the functions referencing it are disabled, as well.Otherwise, the functions referencing it will be processing data based on the state of the function prior to being disabled.

TrainFlawModelInputs

Syntax: TrainFlawModel(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region or Path,Scale,Edge Mask Size,Minimum Edge Strength,Minimum Edge Length,Force Train,Display Resolution,Draw Edge Markings,Display Image,Timeout,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter | Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Note:
  • The TrainFlawModel function does not support calibrated results; the function only operates in pixel coordinates.
  • The TrainFlawModel function supports both greyscale and color images.When referencing a color image, defects in any of the three color planes, Red, Green and Blue (RGB), are identified.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
Note: If attempting to define the ROI relative to the output of another Vision Tool function or Controls function, use the External Region or Path parameter instead of setting cell references to the region coordinates. The External Region or Path parameter will properly account for fixture movement, while the cell references may not function correctly and may cause any functions that reference it to result in #ERR.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region or Path

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note:
  • If an external region or path is being used to define the model, and the external region or path is modified, you must enable the Force Train parameter to initiate a re-train of the model.Opening and closing the property sheet will not initiate a re-train when an external region or path is being referenced.
  • If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Scale

Specifies the expected scaled size of the modeled part/object at run-time (80 to 120; default = 100), as a percentage, compared to the trained model.

Note: For example, if a FindPatMaxPatterns function is being used to supply the Fixture input value, the TrainFlawModel function's Scale parameter may be set as a cell reference to the Scale value output by a FindPatMaxPatterns function.For more information, see FindPatMaxPatterns.

Edge Mask Size

Specifies the tolerance amount (0 to 5; default = 0) near edges to build into the mask image.

Minimum Edge Strength

Specifies the minimum change in intensity (10 to 255; default = 30)across an edge to be included in the model.

Minimum Edge Length

Specifies the minimum edge length (10 to 1000; default = 20) to be included in the model; edges shorter than this length will be excluded from the model.This value represents the minimum number of edge pixels that are connected into an edge.When this parameter is set to a higher value, fewer edges will be detected, while setting this parameter to a lower value will cause more edges to be detected.This setting helps to filter out noisy edge pixels, which are generally short.

Force Train

Specifies whether or not automatic model retraining will be performed on spreadsheet updates.

Irrespective of the Force Train parameter, the model will be retrained when the property sheet for the function is open and the following parameters are changed and confirmed by pressing the OK button:

  • The Image parameter is modified.
  • The Fixture parameter is modified.
  • The Region parameter is modified.
  • The External Region or Path parameter is modified.
  • The Scale parameter is modified.
  • The Edge Mask Size parameter is modified.
  • The Minimum Edge Strength parameter is modified.
  • The Minimum Edge Length parameter is modified.

During run-time operation, the model will be retrained if any of the following actions occur:

  • The Image parameter is modified.
  • The Region parameter is modified.
  • The External Region or Path parameter is modified.
  • The Minimum Edge Strength parameter is modified.
  • The Minimum Edge Length parameter is modified.

0 = Off (default)

The function will only retrain if the property sheet is open, one of the parameters mentioned above is changed and the change is confirmed by pressing the OK button of the property sheet.

Note: If parameters are placed in the spreadsheet, and those parameters are modified without the property sheet of the TrainFlawModel function being open, the model will not be re-trained.The property sheet must be open, or the Force Train parameter must be set to ON to initiate a re-train of the model.

1 = On

The function will train a new model every time the spreadsheet executes.
Display Resolution

Specifies the resolution used to display the model image and the edge model.Specifying either Medium or Coarse downsamples the image, removing fine details and noise.

0 = Fine (default) | Specifies that the function will train the model at full image resolution.
1 = Medium | Specifies that the function will train the model at half image resolution.
2 = Coarse | Specifies that the function will train the model at one quarter image resolution.
Draw Edge Markings

Specifies whether or not the edges in the model will be drawn on the image.Trained edges are drawn in green, masked edges are drawn in blue.

0 = On (default) | The function will draw the edge markings on the image.
1 = Off | The function will not draw the edge markings on the image.
Display Image

Specifies the output image to display.

Note: This image is for display purposes only, and may not be used as an input to another function.
0 = Live Image | Specifies that the currently acquired image will be displayed.
1 = Edge Image | Specifies that the trained edges in the image will be displayed.
2 = Model Image (default) | Specifies that the trained model will be displayed.
3 = Mask Image | Specifies that the currently trained mask image will be displayed.
Timeout (ms) | Specifies the amount of time, in milliseconds (0 to 30000; default = 5000), that the function will search for a valid model before execution is halted an #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Show

Specifies the display mode for TrainFlawModelgraphical overlays on top of the image.Pixels that match those in the trained model will be colored green; pixels that do not match will be colored yellow; pixels that are missing from the Mask Image will be colored blue; extra pixels in the Mask Image will be colored dark magenta; extra edge defects will be colored magenta; and missing edge and area defect pixels will be colored in red.

0 = hide all (default) | All graphics will be hidden, exceptwhen the cell containing the TrainFlawModel function is highlighted in thespreadsheet.
1 = result graphics only | The specified Display Image will be shown atall times.
2 = input and result graphics | The input image region, the Model Image and Mask Image will be displayed at all times.

TrainFlawModelOutputs

Returns | A TrainFlawModel datastructure containing, for each resolution, a Model Image, Edge Model Image and a Mask Image; or #ERR if anyof the input parameters are invalid.
Results | When TrainFlawModel is initially inserted into a cell, the Trained status will automatically appear in the adjacent cell to the right.If a model cannot be trained, then #ERR will be inserted.

TrainFlawModel Vision Data Access Functions

One Vision Data Access function is automatically inserted into the spreadsheet:

Trained GetTrained(TrainFlawModel) Returns 1 if a model has been successfully trained, and 0 if a model cannot be trained.


Histogram

In machine vision terminology, a histogram refers to an array of pixels - how many and their individual greyscale values - within a region of interest (ROI). The In-Sight Histogram tool's functions are used to count pixels for the purposes of statistical analysis and feature classification.

In-Sight vision systems perform histogram analysis using the Histogram tool's functions:

  • ExtractColorHistogram: Extracts a color histogram array from a ROI.
  • ExtractHistogram: Extracts a greyscale histogram array from a ROI.
  • HistContrast: Computes the contrast within the ROI.
  • HistCount: Counts the number of pixels within a range of greyscale values.
  • HistHead: Finds the lowest greyscale value within a range.
  • HistHeadPercentage: Returns the greyscale value that is greater than the specified Percentage of pixels in the specified range of the histogram.
  • HistMax: Finds the most prevalent greyscale value within a range.
  • HistMean: Computes the greyscale mean value.
  • HistMin: Finds the least prevalent greyscale value within a range.
  • HistSDev: Computes the greyscale standard deviation.
  • HistSum: Computes the sum of pixel greyscales.
  • HistSumSquare: Computes the sum of pixel greyscales, squared.
  • HistTail: Finds the highest greyscale value within a range.
  • HistTailPercentage: Returns the greyscale value that is less than the specified Percentage of pixels in the specified range of the histogram.
  • HistThresh: Computes an optimum binary threshold.

What is a Histogram?

When are Histogram Tools Used?

How to Use the Histogram Tools

ExtractColorHistogram

ExtractHistogram

HistContrast

HistCount

HistHead

HistHeadPercentage

HistMax

HistMean

HistMin

HistSDev

HistSum

HistSumSquare

HistTail

HistTailPercentage

HistThresh


What is a Histogram?

The In-Sight Histogram tool performs histogram analysis by examining a ROI and classifying each individual pixel within it according to its greyscale value, and then placing them in a "bin" according to the pixel's greyscale value. In an 8-bit greyscale image, there are 256 bins, based on the number of possible greyscale values (0 to 255). Each bin contains a count of the number of pixels within it, with the bin being the index for the count. For example, if an image were to contain 46 pixels with a greyscale value of 33, the 33rd bin of the histogram for that region would contain the value 46. Additionally, the sum of the bins in the histogram array is always equal to the area of the region from which it was extracted.

The image below is a sample histogram chart from the ExtractHistogram function. The histogram chart displays the greyscale values of the pixels in the function's ROI.

  • The X-axis of the graph represents the total number of greyscale values (0 to 255).
  • The Y-axis of the graph represents the number of pixels at a given greyscale value, and the scale is established by displaying the greyscale value with the greatest number of pixels.
  • The green vertical line indicates the threshold.


When are Histogram Tools Used?

Histograms are important because they are a compact representation of the pixel data contained in the image, stripped of all positional data, i.e. the functions only return information about the number of pixels in the ROI, and their individual greyscale (or color) values. This means that all of the position-independent greyscale image statistics can be computed directly from the histogram array.

The Histogram Tools are useful in examining images for issues such as detecting the presence/absence of a feature, checking the illumination values or qualifying the uniformity of greyscale values to determine if there are any scratches, dust or debris.


How to Use the Histogram Tools

The Histogram Tools are typically utilized in the following manner:

  1. If the image being processed is greyscale, the ExtractHistogram function is inserted into the spreadsheet and the parameters are configured to define the area of the image that will undergo histogram analysis. If the image is a color image, the ExtractColorHistogram function is used.
  2. Next, the first and last non-zero bins are found, using the HistHead and HistTail functions, respectively. The output of the HistHead and HistTail functions will be used to set the range for the other Histogram functions to perform their analysis, removing bins that contain no pixels.
  3. Finally, the valley and peak between the first and last non-zero bins are determined using the HistMin and HistMax functions, respectively. Additional analysis may be performed, as well, using the other Histogram Tools (with the output of the HistHead and HistTail functions defining the range).
Note: If the HistMin function is given the default FirstBin parameter argument of 0, instead of the output of the HistHead function, HistMin will always return the first bin that contains 0 pixels, bin 0.


ExtractColorHistogram

Extracts a color histogram array from an image region. For more information, see Histogram.

ExtractColorHistogram Overview

ExtractColorHistogram accesses every whole pixel in an image region to accumulate a color histogram. Each color pixel is composed of three separate color components; these components are represented as combinations of either red, green and blue (RGB) and/or hue, saturation and intensity (HSI). For more information, see Color Components of a Pixel. For both RGB and HSI, each component of a pixel is converted to a value from 0 to 255; therefore, the accumulated histogram will contain 256 elements for each color component, where each element contains a value representing the count of the number of pixels with values equal to the index number of the array element.

Note: The HSI values returned by the ExtractColorHistogram function may differ from the HSI values returned by the MatchColor and TrainMatchColor functions. The MatchColor and TrainMatchColor functions average the pixels before HSI processing while the ExtractColorHistogram function averages the pixels after HSI processing; the divergence will increase with the color randomness found in the image.

ExtractColorHistogram Inputs

Syntax: ExtractColorHistogram(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,ColorMode,Show)

Note:
  • In order for a pixel to be counted in the histogram, it must be completely enclosed within the image region; partially enclosed pixels are not included.
  • The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid color Image data structure. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Note: AcquireImage is the only function that returns a valid color Image data structure.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Color Mode

Specifies the type of color representation to calculate and display within the histogram.

Note: The HSI values returned by the ExtractColorHistogram function may differ from the HSI values returned by the MatchColor and TrainMatchColor functions. The MatchColor and TrainMatchColor functions average the pixels before HSI processing while the ExtractColorHistogram function averages the pixels after HSI processing; the divergence will increase with the color randomness found in the image.
0 = RGB (default) | Calculates the red, green and blue (RGB) components of every input pixel. Within the histogram, the red component is shown as a red line, the green component as a green line, and the blue component as a blue line.
1 = RGB+HSI | Calculates the red, green and blue (RGB) components and the hue, saturation and intensity (HSI) components of every input pixel. The histogram only displays the HSI, with the hue component shown as a red line, the saturation component as a green line, and the intensity component as a blue line.
2 = HSI | Calculates the hue, saturation and intensity (HSI) components of every input pixel, with optimal HSI processing. Within the histogram, the hue component is shown as a red line, the saturation component as a green line, and the intensity component as a blue line.

Show

Specifies the display mode for ExtractColorHistogram graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the ExtractColorHistogram function is the active cell in the spreadsheet.
2 = input graphics only | The input image region will be displayed at all times.
3 = show all: input and chart | Both the input image region and the histogram chart will be displayed at all times.

ExtractColorHistogram Outputs

Returns | A ColorHist data structure containing the RGB and/or HSI frequency distribution, or #ERR if any of the input parameters are invalid.
Results | When ExtractColorHistogram is initially inserted into a cell, a result table is created in the spreadsheet.

ExtractColorHistogram Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Hist or ColorHist.

Note: These Vision Data Access functions are automatically inserted into the spreadsheet, regardless of the Color Mode parameter value. If RGB (Color Mode = 0) is specified, #ERR is returned for Hue, Saturation and Intensity. If HSI (Color Mode = 2) is specified, #ERR is returned for Red, Green and Blue.
Red | HistMean(ColorHist, 0, 255, 0) | The mean red channel value.
Green | HistMean(ColorHist, 0, 255, 1) | The mean green channel value.
Blue | HistMean(ColorHist, 0, 255, 2) | The mean blue channel value.
Hue | HistMean(ColorHist, 0, 255, 3) | The mean hue level value.
Saturation | HistMean(ColorHist, 0, 255, 4) | The mean saturation level value.
Intensity | HistMean(ColorHist, 0, 255, 5) | The mean intensity level value.


ExtractHistogram

Extracts a histogram array from an image region. For more information, see Histogram.

ExtractHistogram Overview

The Histogram function returns a one-dimensional representation of pixel values in a region of interest. A histogram is represented by an array of integers, where each element of the array, called a bin, stores a count of the number of pixels in the region, where the value in bin n is the number of pixels in the region of pixel value n. The total of all bin counts in the array is equal to the number of pixels in the region.

ExtractHistogram Inputs

Syntax: ExtractHistogram(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region,Show)

Note:
  • In order for a pixel to be counted in the histogram, it must be completely enclosed within the image region; partially enclosed pixels are not included.
  • The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Show

Specifies the display mode for ExtractHistogram graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the ExtractHistogram function is the active cell in the spreadsheet.
2 = input graphics only | The input image region will be displayed at all times.
3 = show all: input and chart | Both the input image region and the histogram chart will be displayed at all times.

ExtractHistogram Outputs

Returns | A Hist data structure containing the greyscale frequency distribution, or #ERR if any of the input parameters are invalid.
Results | When ExtractHistogram is initially inserted into a cell, a result table is created in the spreadsheet.

ExtractHistogram Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Hist.

Thresh | HistThresh(Hist, 0, 255) | The binary threshold.
Contrast | HistContrast(Hist, 0, 255) | The greyscale image contrast.
DarkCount | HistCount(Hist, 0, Thresh-1) | The number of pixels below Thresh.
BrightCount | HistCount(Hist, Thresh, 255) | The number of pixels above Thresh.
Average | HistMean(Hist, 0, 255) | The mean greyscale value.


HistContrast

Computes image contrast by finding the optimum binary threshold, and then taking the difference of the mean greyscale above the threshold and the mean greyscale below the threshold. The contrast value is always returned as a number from 0 to 255. For more information, see Hist.

HistContrast Inputs

Syntax: HistContrast(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistContrast Outputs

Returns

A value representing the image contrast, or #ERR if any of the input parameters are invalid.


HistCount

Counts the number of pixels that exist within a specified range of greyscale values.For more information, see Hist.

HistCount Inputs

Syntax: HistCount(Structure,[FirstBin],[LastBin],[Color})

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistCount Outputs

Returns

A value representing the pixel count, or #ERR if any of the input parameters are invalid.


HistHead

Identifies the smallest greyscale value from a specified range of values. For more information, see Hist.

HistHead Inputs

Syntax: HistHead(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistHead Outputs

Returns

A value representing the smallest greyscale value, or #ERR if any of the input parameters are invalid.


HistHeadPercentage

Returns the greyscale value that is greater than the specified Percentage of pixels in the specified range of the histogram. For more information, see Hist.

HistHeadPercentage Inputs

Syntax: HistHeadPercentage(Structure,Percentage,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

Percentage

Specifies the percentage of the total pixels represented in the histogram that exist within a specified range of greyscale values.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistHeadPercentage Outputs

Returns

A value representing the brightest greyscale value, or #ERR if any of the input parameters are invalid.


HistMax

Identifies the most prevalent greyscale value that occurs in a specified range of values. For more information, see Hist.

HistMax Inputs

Syntax: HistMax(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistMax Outputs

Returns

A value representing the most common greyscale value, or #ERR if any of the input parameters are invalid.


HistMean

Computes the greyscale mean, by summing the greyscale values for all pixels in the specified range, and then dividing by the count of pixels in the same range. For more information, see Hist.

HistMean Inputs

Syntax: HistMean(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistMean Outputs

Returns

A value representing the average greyscale value, or #ERR if any of the input parameters are invalid.


HistMin

Identifies the least prevalent greyscale value that occurs in a specified range of values. For more information, see Hist.

HistMin Inputs

Syntax: HistMin(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistMin Outputs

Returns

A value representing the least-common greyscale value, or #ERR if any of the input parameters are invalid.


HistSDev

Computes the greyscale standard deviation of pixel values within a specified range of greyscale values. For more information, see Hist.

HistSDev Inputs

Syntax: HistSDev(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistSDev Outputs

Returns

A value representing the greyscale standard deviation, or #ERR if any of the input parameters are invalid.


HistSum

Sums the pixel values within a specified range of greyscale values. For more information, see Hist.

HistSum Inputs

Syntax: HistSum(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistSum Outputs

Returns

A value representing the sum of the pixel values, or #ERR if any of the input parameters are invalid.


HistSumSquare

Sums the squares of pixel values within a specified range of greyscale values. For more information, see Hist.

HistSumSquare Inputs

Syntax: HistSumSquare(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistSumSquare Outputs

Returns

A value representing the sum of the pixel values squared, or #ERR if any of the input parameters are invalid.


HistTail

Identifies the largest greyscale value from a specified range of values. For more information, see Hist.

HistTail Inputs

Syntax: HistTail(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistTail Outputs

Returns

A value representing the largest greyscale value, or #ERR if any of the input parameters are invalid.


HistTailPercentage

Returns the greyscale value that is less than the specified Percentage of pixels in the specified range of the histogram. For more information, see Hist.

HistTailPercentage Inputs

Syntax: HistTailPercentage(Structure,Percentage,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

Percentage

Specifies the percentage of the total pixels represented in the histogram that exist within a specified range of greyscale values.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistTailPercentage Outputs

Returns

A value representing the highest greyscale value, or #ERR if any of the input parameters are invalid.


HistThresh

Computes an optimum binary threshold by taking the normalized correlation between the ExtractHistogram or ExtractColorHistogram region and all possible binary re-quantization, to locate the threshold level that maximizes similarity. For more information, see Hist, ExtractColorHistogram, or ExtractHistogram.

HistThresh Inputs

Syntax: HistThresh(Structure,[FirstBin],[LastBin],[Color])

Parameter Description

Structure

This argument must reference a spreadsheet cell containing a Hist or ColorHist data structure.

FirstBin

Specifies the first "bin" (0 to 255; default = 0) used to define the histogram. For more information, see What is a Histogram?.

LastBin

Specifies the last "bin" (0 to 255; default = 255) used to define the histogram. For more information, see What is a Histogram?.

Color

Specifies the index of the color component's histogram from a ColorHist data structure (default = 0).

Note: The Color parameter is optional and only available when connected to a color In-Sight vision system, and will be ignored if a Hist structure is referenced in the Structure parameter. When connected to a color vision system, if the Structure parameter references a ColorHist structure (output by an ExtractColorHistogram function), the Color parameter can be used to select the color component. For more information, see ExtractColorHistogram or Color Components of a Pixel.
0 = Red | Specifies the red component from the ColorHist data structure.
1 = Green | Specifies the green component from the ColorHist data structure.
2 = Blue | Specifies the blue component from the ColorHist data structure.
3 = Hue | Specifies the hue component from the ColorHist data structure.
4 = Saturation | Specifies the saturation component from the ColorHist data structure.
5 = Intensity | Specifies the intensity component from the ColorHist data structure.

HistThresh Outputs

Returns

A value representing the optimum binary threshold, or #ERR if any of the input parameters are invalid.


ID

The In-Sight ID tool functions read alphanumeric data strings contained in linear 1D and 2D symbols. Optionally, the quality of most symbols can be verified according to published specification. The ID tool includes the following functions:

  • ReadIDMax: Finds and decodes 1D or 2D symbols (1D/Stacked, Data Matrix, QR Code and Postal) within a region of interest. The function can be configured for a variety of symbologies, a number of results, and can handle a high degree of rotation and perspective distortion. Optionally, can also be used to train Data Matrix and QR Code models, and verify quality metrics.

  • ReadIDCode:Decodes information contained in 1D and 2D symbols, optionally verifies quality.

    Note:
    • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
    • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • ValidateIDData: Performs validation of the data decoded from 1D and 2D symbols.
  • VerifyIDCode: Used to extract metrics associated with code readability and mark quality from 1D and 2D symbols.

Read 1D and 2D Symbols

Verify 1D and 2D Symbol Quality

Additional Verification and Validation Techniques

ReadIDCode

ReadIDMax

ValidateIDData

VerifyIDCode

ID Error Strings


Read 1D and 2D Symbols

The ReadIDMax and ReadIDCode functions are used to locate and decode 1D and 2D symbols within a region of interest. Cognex recommends that the ReadIDMax be used for new code-reading applications, as it offers several advantages over the existing ReadIDCode function:

  • Decodes multiple 1D symbologies, of mixed type, in the same image.
  • Decodes multiple 2D symbologies, of the same type, in the same image.
  • Supports the latest symbol decoding algorithms.


Verify 1D and 2D Symbol Quality

Process Control Metrics of 1D Barcodes

In-Sight vision systems are able to read 1D barcodes, and optionally, provide process control metrics for print code quality following the ISO 15416 test specifications. Process metrics are designed to provide in-line feedback to code quality. These can provide early indication of a trend toward decreasing code readability so that corrective actions can be taken (e.g., print head may need to be replaced).

When the Verify checkbox is enabled in either the ReadIDMax or ReadIDCode functions, In-Sight performs all applicable tests. There are several quality verification tests that are used to verify barcode quality, as detailed in the Vision Data Access function topics for IDMax and IDCode. For more information, see IDMax and IDCode.

Each of the tests yields a "grade" of A (4.0) through F (0.0). The overall quality of a symbol is the lowest grade achieved by any of the tests. But rather than returning the letter grade or its numeric equivalent for each individual quality test, In-Sight returns the actual result values plus the overall symbol grade.

Note: Although a barcode's quality is implicitly related to its readability, it is sometimes possible for a symbol to receive low or failing grades on one or more tests and still be readable. However, symbols failing to meet quality specifications are indicative of process problems that may require attention, such as changed lighting conditions or marking machines that need to be re-calibrated.

Verify 2D Symbol Quality

In-Sight reads Data Matrix, QR Code, PDF 417 and EAN/UCC Composite symbols, as well as verifies symbol quality. The methods In-Sight uses for verifying symbol quality are defined in Section 8 and Annexe N of the International Symbology Specification - Data Matrix (BC11-1997), Section 8 and Annexe M of the International Symbology Specification - QR Code (ITS/97-001), Sections 3 and 4 of the Uniform Symbology Specification - PDF 417, published by AIM International and approved by American National Standards Institute (ANSI), and in the International Standard - Bar Code Print Quality Test Specification (ISO/IEC-15416), published by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC).

When the Verify checkbox is enabled in either the ReadIDMax or ReadIDCode functions, In-Sight performs all applicable tests. There are several quality verification tests, as described in the AIM specification, that are used to verify symbol quality. The type of verification tests that are used depends on the type of symbol that is selected. PDF 417 and EAN/UCC Composite 2D components share some verification tests with 1D barcodes. Each of the tests yields a "grade" of A (4.0) through F (0.0). The overall quality of a symbol is the lowest grade achieved by any of the tests. But rather than returning the letter grade or its numeric equivalent for each of the quality tests, In-Sight returns the actual result values plus the overall symbol grade.

Note: Although a symbol's quality is implicitly related to its readability, it is sometimes possible for a symbol to receive low or failing grades on one or more tests and still be readable. However, symbols failing to meet quality specifications are indicative of process problems that may require attention, such as changed lighting conditions or marking machines that need to be re-calibrated.


Additional Verification and Validation Techniques

In addition to the built-in quality verification metrics of the ReadIDMax and ReadIDCode functions, the ValidateIDData and VerifyIDCode functions can be utilized to perform additional validation and verification of the symbols read and decoded by the ReadIDMax and/or ReadIDCode functions.

  • The ValidateIDData function is used to validate the integrity of the data in the symbol, and ensuring that the data conforms to MIL-STD 130 and GS1 standards. Using the ValidateIDData Vision Data Access functions, the data can be parsed to ensure it conforms to the applicable standards.
  • The VerifyIDCode function is used to perform further verification metrics on the symbol, and extracting metrics associated with code readability and the mark quality of the symbol. Using the VerifyIDCode Vision Data Access functions, symbol verification grades can be extracted.

For more information, see ValidateIDData and VerifyIDCode.


ReadIDCode

Decodes information contained in 1D and 2D barcodesand symbols, optionally verifies quality.

Note:
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.

ReadIDCodeInputs

Syntax: ReadIDCode(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Code Type,Decode Settings.Checksum,DecodeSettings.Omnidirectional,Decode Settings.Scanning,Decode Settings.Contrast,DecodeSettings.Symbol Format,Decode Settings.Rows,Decode Settings.Columns,DecodeSettings.Scale Tolerance,Decode Settings.Color,Decode Settings.Mirror,Decode Settings.Algorithm,DecodeSettings.Mode,DecodeSettings.Perspective,Decode Settings.QRMode,Verify,Timeout,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheetcell that contains a valid Image data structure.By default, the cell referenced isA0, the cell containing the Image data structure returned by AcquireImage.For more information, see AcquireImage.

Fixture

Specifies the image coordinate system in which the input region is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Region

Specifies the rectangular image region thatcan be translated and rotated.

X | The X offset of the origin in fixturecoordinates.
Y | The Y offset of the origin in fixturecoordinates.
High | The dimension along the region'sX-axis. Note: The ReadIDCode function supports a maximum region size of 2048 pixels High by 2048 pixels Wide.If either the High or Wide parameters are set to a value larger than 2048 pixels, the function will return #ERR.
Wide | The dimension along the region'sY-axis. Note: The ReadIDCode function supports a maximum size of 2048 pixels High by 2048 pixels Wide.If either the High or Wide parameters are set to a value larger than 2048 pixels, the function will return #ERR.
Angle | The orientation in fixture coordinates.

Code Type

Specifies the type of 1D and 2D symbols toread.

Note:
  • DecodeSettings parameters that are not applicable to the selected Code Type will begrayed out.
  • The POSTNET, PLANET, UPU 4-State, Australia Post 4-State, Japan Post 4-State, USPS OneCode
    4-State     Postalcode     decoding algorithm uses the Region.Angleparameter value in its initial image processing stage.If the barcode is perfectlyhorizontal in the image, an Angle of 0 will perform best when the Omnidirectional parameter is disabled.If the barcode is perfectly vertical in the image, the Region should berotated +/- 90 degrees for best performance.
  • All GS1 codes are supported.For more information, see gs1.org.

255 = Auto

Decodes by running all symbologiesin the Region and selects the firstsymbol that decodes successfully, on every sheet update.Subsequent spreadsheetupdates will attempt to decode the last successfully decoded Code Typefirst, before attempting other Code Types.

Closed See the order in which CodeTypes are attempted

  1. Last decoded Code Type, if any.
  2. Data Matrix
  3. RSS CC-A
  4. RSS CC-B
  5. PDF417
  6. QR Code
  7. MicroQRCode
  8. RSS 14 & Stacked
  9. RSS Limited
  10. UPC
  11. EAN
  12. Code 128
  13. POSTNET
  14. PLANET
  15. UPU-4 State
  16. Australia 4-State
  17. Japan 4-State
  18. USPS OneCode 4-State
  19. Code 39
  20. Code I2of5
  21. Code 93
  22. Codabar (NW-7)
Note: Autowill not decode PharmaCode barcodes.

-1 = Learn (Default)

Learns the code type.This parameteris re-populated with the Code Type that is first decoded.

Note: Learnwill not decode PharmaCode barcodes.
Tip:
  • Once a symbol is learned, the Code Type parameter displays that symbol's code type.To find out if you are running in learn mode, insert the GetLearned Vision Data Access function into an empty spreadsheet cell, referencing the ReadIDCode structure.If a 1 is returned, the function is in learn mode.For more information, see GetLearned(IDCode).
  • Do not run in Learn mode if the symbol's format is expected to change - even if it is the same code type.The Learn setting remembers the format for the first symbol decoded (code type, polarity, format, module size, etc.).If any format of the new symbol changes from the learned code, even if the Code Type is the same, the read will fail.To un-learn the symbol format but keep the same code type, another code type must be selected before re-selecting the correct code type.To allow the ReadIDCode function to decode symbols with varying format, set the Code Type to Auto; choose a specific symbology if the symbol is not expected to change.
  • When the Algorithm parameter is enabled, selectingLearn may increase the time todecode.
  • Click Closed herefor an example of how to allow the Code Type to relearn programmatically.

    1. Create a Button in cell A1.

    2. Insert the formula, If(A1,255,-1), in cell A2.

    3. Create a ReadIDCode with no visible symbol in the image.

    4. Reference the ReadIDCode's Code Type parameter to cell A2.

    5. Click the button in cell A1 to have the ReadIDCode function relearn(unlearns then relearns).

0 = Code 39

Selects Code 39 reading (also knownas Code 3 of 9 and BC39).

1 = Code 128

Selects Code 128 reading.SupportsCode Sets A, B, and C barcodes.

2 = Code I2of5

Selects I2of5 reading (also knownas Interleaved 2 of 5).

3 = UPC

Selects UPC (Universal Product Code)reading.Supports Version A (Regular version) and Version E (Zero-suppressionversion) UPC barcodes, as well as two- and five-character supplementalencodations.

4 = EAN

Selects EAN (European Article Numbering)reading.Supports EAN-8 and EAN-13 barcodes, as well as two- and five-charactersupplemental encodations.

7 = PharmaCode

Selects PharmaCode reading.

5 = POSTNET

Selects POSTNET reading.

6 = PLANET

Selects PLANET reading.

9 = RSS-14 & Stacked

Selects RSS-14 (Reduced Space Symbology)and RSS Stacked reading.

10 = RSS Limited

Selects RSS Limited reading.

12 = Codabar (NW-7)

Selects Codabar reading (also knownas USD-4 and Code 2 of 7).

11 = Code 93

Selects Code 93 reading.

8 = UPU 4-State

Selects UPU 4-State reading.

13 = Australia Post 4-State

Selects Australia Post 4-State reading.

14 = Japan Post 4-State

Selects Japan Post 4-State reading.

15 = USPS OneCode 4-State

Selects USPS OneCode 4-State reading.

128 = Data Matrix

Selects Data Matrix reading.

Note:
  • Use the Data Matrix Mode parameter to specifythe type of Data Matrix symbol to read.
  • When the Algorithm parameter is enabled, grids up to 144x144 are supported; when disabled, grids up to 48x48 are supported.

129 = QR

Selects QR Code reading.

Note: Use the QR Mode parameter to specify the typeof QR symbol to read.

130 = RSS CC-A

Selects 2D CC-A (Composite Component)reading.

131 = RSS CC-B

Selects 2D CC-B (Composite Component)reading.

132 = PDF417

Selects PDF417 reading.

Decode Settings

Specifies setting to be used to decode 1Dand 2D symbols.

Note: Decode Settingsthat are not applicable to the selected CodeType will be grayed out.

Checksum

Specifies whether the symbol will be validatedto ensure reliability using an error-detection algorithm.Checksum onlyapplies to symbols with optional checksum algorithms included in the symbol;each symbol has its own unique checksum algorithm.The type of checksum,if any, that is used depends on the code type selected.

0 = OFF (default) | Do not verify checksum.
1 = ON | Requires checksum to pass.
Note: Code 128, Code93, RSS, UPC and EAN barcodes are validated with a checksum regardlessof the parameter selection.If Checksumis enabled for any other barcode, and no checksum is encoded, the readwill fail.

Omnidirectional

Specifies the direction in which scan linesare projected within the Region in order to detect all of the elementsin the barcode.An element refers to either a bar or space in a barcode. At least one scan line must project across every elementof the barcode for a successful decode.For more information, see Scan Lines.

0 = OFF | Scan lines are projected in one directionto detect a barcode parallel to the Region.
1 = ON (default) | Scan lines are projected at variousangles to detect a barcode that is rotated relative to the Region.
Note: PharmaCodebarcodes will not decode correctly if rotated over 90° from the angleof the Region.

Scanning

Specifies the space, in pixels, between eachscan lineprojected within the Region.When Fine is selected, the barcode is readwith a high degree of reliability; when Coarse is selected the executiontime is decreased.Any integer value between 1 and 255, up to the heightof the Region, can be entered.For more information, see Scan Lines.

3 = Fine

12 = Medium (default)

48 = Coarse
Note: The Scanningparameter is disabled if Omnidirectionalis ON for 1D symbols.

Contrast

Specifies the expected symbol contrast.

0 = Automatic (Default) | Selects an automatic contrast routinethat computes a threshold level based on the grayscale image statistics.
16 = Low | For use with low contrast symbols.
32 = Normal | For use with normal contrast symbols.
64 = High | For use with high contrast symbols.
Note: The Contrastparameter is disabled for all Code Types other than Postal and RSS.

Symbol Format

Specifies the row and column format of thesymbol.If Symbol Format is disabled (default), the symbol format willbe determined automatically.When enabled, Rows and Columns must be specified.

Note: The SymbolFormat parameter is not implemented.

Rows

Specifies the number of rows in the symbol.

Note: The Rowsparameter is not implemented.

Columns

Specifies the number of columns in the symbol.

Note: The Columnsparameter is not implemented.

Scale Tolerance

Specifies the percentage of scale change (0 to 50; default = 0) to tolerate while searchingfor the symbol.

Note: The ScaleTolerance parameter is not implemented.

Color

Specifies the color of the symbol.

0 = Black | The symbol is darker than the background.
1 = White | The symbol is lighter than the background.
Note: The Colorparameter is only implemented for 1D RSS symbols.

Mirror

Specifies whether to mirror the symbol fromleft to right before attempting to decode it.

0 = No | Attempt to decode the symbol withoutmirroring it.
1 = Yes | Mirror the symbol before attemptingto decode.
2 = Auto (default) | Automatically detects if the symbolneeds to be mirrored before attempting to decode.

Algorithm

Specifies whether an advanced algorithm isused to improve reading accuracy.

Note: When Algorithm is enabled, 1D barcodeswith minimum bar elements wider than 10 pixels may not read correctly.
0 = OFF | Do not use the advanced algorithm.When disabled, the function applies the algorithm used in the legacy IDfunctions.Using this algorithm may increase the decode speed, but maybe less accurate.
1 = ON (default) | Decode using the advanced algorithm.This algorithm is more accurate than the legacy algorithm, but decodespeed may decrease.When enabled, Data Matrix and RSS symbols are decoded usingIDMax®.

Mode

Specifies the mode used to read specific symbols.

0 = Default

Do not attempt to read non-conformant Data Matrix symbols.

2 = Allow Non-Conformant Codes

Allow additional time to read non-conformant Data Matrix symbols, attemptingadditional, more robust decoding options.

Note:
  • Auto,Learn or Data Matrix must be the selected CodeType to decode a Data Matrix symbol; Algorithmmust also be enabled.
  • Select this optionif the modules in the Data Matrix symbol exhibit a halo or similar appearance.

3 = High Speed/High Contrast

Read high-contrast Data Matrix, RSS-14 and RSS Limited symbols.Using this selection can increasethe decode speed.Do not select if the symbol is low-contrast, damagedor blurred.

Note:
  • Learnmust be the selected Code Type and Algorithmmust be enabled.
  • The High Speed/HighContrast option is designed to provide more repeatable decode times forsome high-speed reading applications.Atypical use is reading high contrast ink jet codes where the mark qualityvaries from part-to-part.Inthese applications it is common to see significant variations in the amountof time necessary to decode each mark (i.e., poorly printed marks take3-5 times longer to decode than well-printed marks).TheHigh Speed/High Contrast option reduces the variations in decode timewhile still maintaining a high average speed.Itis important to note that these benefits will not be seen on every applicationand proper testing should be performed to determine if this option isappropriate for you application.

Perspective

Specifies the decoding of Data Matrixand QR Code symbols with perspective distortion and optionally trains Data Matrix symbols for a known perspectivedistortion.

Note:
  • Auto,Learn, Data Matrix or QR must be the selected CodeType to decode the Data Matrix or QR Code symbol with perspective distortion; Algorithm must also be enabled.
  • When either Perspectiveor Train perspective is selected, quality verifications are not support.

0 = No perspective (default)

Decodes Data Matrixand QR Code symbols that haveno perspective distortion.

3 = Perspective

Decodes Data Matrixand QR Code symbols with perspectivedistortion; the perspective distortion is estimated independently duringmodel training and run time.

7 = Train perspective

Decodes Data Matrixsymbols with a known perspective distortion.WhenLearn is the selected Code Type, the perspective is trained along withother "learned" attributes.At run time, the symbol is searchedin a space where the perspective distortion in the input image is compensatedusing the learned attributes.This option requires that the run time symbolis placed on the same plane as that of the learn time symbol.This optionallows for decoding even on severely damaged symbols with known perspectivedistortion.When the selected Code Type is "Auto", this optionis equivalent to "3 = Perspective".

Tip: It is recommendedthat the sensor be mounted so the angle of incidence (the angle betweenthe optical axis of the sensor and the normal vector of the plane on whichthe symbol is presented) is no more than 40 degrees and the resolutionof the symbol be at least 5 pixels per cell.

QR Mode

Specifies the type of QR Code to read.

3 = QR Models 1 and 2

4 = MicroQR

6 = QR2 and MicroQR (Default)

7 = QR Model 1, QR Model 2 and MicroQR

Verify

Specifies whether the print quality tests (also known as quality verification metrics) will be performed. For more information, see ID.

0 = OFF (default) | Do not test quality.
1 = ON | Test quality and display the results in the spreadsheet.
Note:
  • If thestring cannot be decoded, then #ERR will be returned for all results thatare automatically inserted into the spreadsheet.
  • All Code Typesexcept PharmaCode and RSS-Stacked support quality verification.

Timeout

Specifies the amount of time, in milliseconds(0 to 30000), that the functionwill search for a valid ID symbol before execution is halted and an #ERRis returned. Setting the value to 0 disables the setting and a timeout is not applied.

Show

Specifies the display mode for the ReadIDCodegraphical overlay on the image.

0 = hide all (default) | The input region boundary will behidden, except when the cell containing the ReadIDCode function is highlightedin the spreadsheet.
1 = result graphics only | The result graphics (boxes for DataMatrix and QR Code) will be displayed at all times.
2 = input and resultgraphics | The input graphics and result graphicswill be displayed at all times. Note: The Showparameter is only implemented for Data Matrix and QR Code symbols.

ReadIDCode Outputs

Returns | An IDCode data structure containingthe decoded alphanumeric string, or #ERR if any of the input parametersare invalid.
Results | When thefunction is initially inserted into a cell, the decoded string will automaticallyappear in the adjacent cell.If the barcode or symbol cannot be decoded,then #ERR will be inserted.

ReadIDCodeVision Data Access Functions

If the Verify checkbox is disabled when the ReadIDCode function is initiallycreated, then a single Vision Data Accessfunction will be automatically inserted into the spreadsheet:

String

GetString(IDCode)

 Returns the alphanumeric string encoded in the barcode orsymbol.

If the Verify checkbox is enabled when the ReadIDCode functionis initially created, the additional Vision Data Access functions thatare automatically inserted into the spreadsheet will depend on the selectedCode Type.

Note: If the Verifycheckbox is enabled after the ReadIDCode function is initially created,the additional Vision Data Access functions will not be automaticallyinserted into the spreadsheet.Also, the Verify checkbox must be enabledbefore the additional Vision Data Access functions will execute in thespreadsheet.

Additional data elements can be accessed using the ReadIDCodeVision Data Access functions.For more information, see IDCode.


ReadIDMax

Finds and decodes 1D or 2D symbols (1D/Stacked, Data Matrix, QR Code and Postal) within a region of interest.The function can be configured for a variety of symbologies, a number of results, and can handle a high degree of rotation and perspective distortion.Optionally, can also be used to train Data Matrix and QR Code models, and verify quality metrics.The ReadIDMax function is used to locate and decode 1D or 2D symbols.

1D Symbologies

The ReadIDMax function supports decoding multiple 1D symbologies in the same image, including the following types of 1D symbologies:

  • Code 128
  • Code 39
  • Interleaved 2 of 5
  • Pharmacode
  • UPC/EAN
  • Code 93
  • Codabar
  • PDF417
  • DataBar
  • DataBar Limited
  • DataBar Expanded
  • EAN.UCC Composite
  • POSTNET
  • PLANET
  • Japan Post
  • Australian Post
  • UPU
  • Intelligent Mail Barcode
Note: 1D symbologies do not require any training.

2D Symbologies

The ReadIDMax function can locate and decode 2D Data Matrix and QR Code symbols.The function can locate multiple 2D symbols, but unlike 1D symbols, all the symbols must be the same symbology type.For example, if the image contained a mixture of Data Matrix and QR Code symbols, and the function's Symbology Group parameter is set to Data Matrix, the function would ignore the QR Code symbols and only return the Data Matrix symbols.

The function can be trained to decode the same type of 2D symbol, by establishing the size of the symbol grid size, the 2D symbology type and the error checking and correction (ECC) method the symbol uses to verify the accuracy of the data it contains.

Note: Cognex recommends that the function be trained when the 2D symbols used in the application all share the same characteristics.If the 2D symbols can vary in grid size or polarity, for example, do not train the function and allow it to consider all possible settings when decoding a 2D symbol.

Training the ReadIDMax function can improve its performance, especially when all the symbols to be decoded share the same qualities, while not training the function allows it to decode a wider variety of symbols without needing to reconfigure it.

1D/2D Image Requirements

The ReadIDMax function requires minimal configuration before scanning 1D symbols, but the following guidelines should be used for input images:

  • All symbols must be greater than 50 pixels in length, while the maximum width of any module cannot exceed 10 pixels.

    Note: A module is the narrowest element of the symbol (either a space or a bar).
  • For linear symbologies (where modules have different widths, but uniform heights), a module must be at least 1.6 pixels in width and 50 pixels high.For Postal Codes (where the modules are of uniform width, but varying height), a module must be at least 2.5 pixels in width.
  • A quiet zone (an area on either end of a symbol that contains no marks) must be present that is at least the minimum size specified in the print specification for the symbology type.
  • The contrast between modules and the background must be at least 32 grey levels.
  • The pixel aspect ratio can be no greater than 1.35 to 1.

2D symbols have fewer image requirements.In general, there must be a quiet zone (or margin) surrounding the symbol on all four sides that is equal to the width of one module inside the symbol itself.

IDMax and IDQuick

The ReadIDMax function offers two processing modes for the decoding algorithm:

  • Choose IDQuick for high-speed decoding of symbols that are well formed and appear in high contrast.
  • Choose IDMax for advanced image processing and image-analysis techniques for challenging images.

By default, the function uses the IDMax mode, however, experiment with IDQuick to determine how it affects the performance of the function in the application.

Results

Only symbols that are found and decoded generate results.For each symbol in an image, the ReadIDMax function generates the following results through Vision Data Access functions:

  • The decoded string.
  • The angular orientation of the found symbol, in degrees.
  • A location (Row/Column) for the center of the symbol.
  • The particular symbology of the symbol.
  • Codes and modifiers from the ISO/IEC to uniquely identify the symbology according to industry standards.
Note: The Verify checkbox must be enabled to generate results beyond the decoded string.Use the VerifyIDCode and ValidateIDData functions to process additional verification metrics about the decoded symbol(s).

ReadIDMaxInputs

Syntax: ReadIDMax(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Symbology Group,Maximum Results,Advanced Decode Mode,Enable Training,1D Symbologies.Code 128,1D Symbologies.Code 39,1D Symbologies.I2of5,1D Symbologies.Pharmacode,1D Symbologies.UPC/EAN,1D Symbologies.Code 93,1D Symbologies.Codabar,Stacked Symbologies.PDF 417,Stacked Symbologies.DataBar,Stacked Symbologies.DataBar Limited,Stacked Symbologies.DataBar Expanded,Stacked Symbologies.EAN.UCC Composite,Postal Symbologies.POSTNET,Postal Symbologies.PLANET,Postal Symbologies.Japan Post,Postal Symbologies.Australia Post,Postal Symbologies.UPU,Postal Symbologies.Intelligent Mail Barcode,Decode Settings.Perspective,Decode Settings.QRMode,Decode Settings.Ignore Polarity,Decode Settings.Allow Flexible Grid Size,Decode Settings.Checksum,DecodeSettings.Polarity,Decode Settings.Omnidirectional,DecodeSettings.Sort Mode,Decode Settings.Allow Identical 1D Symbols,Decode Settings.Expand UPC-E,Verify,Timeout,Show)

Note: When configuring the ReadIDMax function's property sheet, to view the affect of updating parameter values, press the OK button to accept the changes and close the property sheet.The ReadIDMax function does not support displaying updated results while the property sheet is open.
Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Note: If using a colorIn-Sight vision system, the function must reference an Imagefunction (for example, ColorToGreyscaleFilter),which converts the color image to greyscale.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis. Note: When reading 1D/Stacked and Postal symbols, the ReadIDMax function supports a maximum region size of 2048 pixels High by 2048 pixels Wide.If either the High or Wide parameters are set to a value larger than 2048 pixels, the function will return #ERR.
Wide | The dimension along the region's y-axis. Note: When reading 1D/Stacked and Postal symbols, the ReadIDMax function supports a maximum size of 2048 pixels High by 2048 pixels Wide.If either the High or Wide parameters are set to a value larger than 2048 pixels, the function will return #ERR.
Angle | The orientation, in fixture coordinates.

Symbology Group

Specifies one of four symbology groups to read.

1D/Stacked (default) | Selects 1D and Stacked Code reading.
Data Matrix | Selects Data Matrix reading.
QR Code | Selects QR Code reading.
Postal | Selects Postal Code reading.

Maximum Results

Specifies the maximum number of symbols to be located and decoded (1 to 128; default = 1).

Note: If this parameter's specified value exceeds the number of symbols in the ROI , the function will still continue to search for the specified number of symbols.If the number of symbols in the ROI varies, the execution time of the function can be reduced by lowering the Timeout parameter setting.

Advanced Decode Mode

Specifies the setting to be used to decode Data Matrix or 1D/Stacked symbology groups.

IDMax® (default)

Only reads conformant symbols; does not attempt to read non-conformant symbols.

Allow Non-conformant Modules

Allow additional time to read non-conformant symbols, attempting additional, more robust decoding options.

High Speed High Contrast

Read high-contrast symbols.Using this selection can increase the decode speed.Do not select if the symbol is low-contrast, damaged or blurred.

Note: This option is designed to provide more repeatable decode times for some high-speed reading applications.A typical use is reading high contrast ink jet codes where the mark quality varies from part-to-part.In these applications, it is common to see significant variations in the amount of time necessary to decode each mark (i.e., poorly printed marks take 3-5 times longer to decode than well-printed marks).This option reduces the variations in decode time while still maintaining a high average speed.It is important to note that these benefits will not be seen on every application, and proper testing should be performed to determine if this option is appropriate for the application.

IDQuick™ (Yield Preferred)

Used for symbols that can appear warped, distorted or appear within a non-uniform background.This mode is designed for codes with "continuous" finder patterns, not separated dots.

Enable Training

When enabled, trains a model of the first Data Matrix or QR Code symbol read.Training the function may improve performance, especially when all the symbols to be decoded share similar characteristics.

Trained information is retained until this checkbox is disabled.To retrain a symbol, disable the checkbox, then enable the checkbox again.

Tip: It is recommended to have only one symbol in the Region when training is enabled.
Off (default) | Do not train a model.
On | Train a model of the first symbol read.

1D Symbologies

Specifies which 1D Symbologies to read (multiple symbologies can be selected and read).

Code 128

Selects Code 128 reading.Code 128 is a very high-density alphanumeric symbology which can be scanned bidirectionally.The symbology can encode the entire 128 ASCII character set plus four non-data characters.A symbol using Code 128 symbology encodes each character using 11 black or white modules, and each symbol includes a checksum character.

Code 39

Selects Code 39 reading.Code 39 (also called USS Code 39, BC39 and/or Code 3 of 9) is a widely-used symbology developed for use in non-retail environments, and can encode both letters, digits, and special characters such as " % " and " / ".A symbol using Code 39 symbology encodes each character using 5 bars and 4 spaces for a total of 9 elements, and 3 out of the 9 elements are always wide.The symbol can include a checksum character for error detection.

Interleaved 2 of 5

Selects Interleaved 2 of 5 reading.Popular in warehouse applications, Interleaved 2 of 5 (also called I2of5, I-2/5 or ITF) is a variable-length, numeric-only code.A symbol using Interleaved 2 of 5 symbology encodes 2 characters in a unit of 5 bars and spaces, where the even position character is encoded into bars while the odd position character is encoded into spaces.The Interleaved 2 of 5 symbology can only encode data with an even number length.The symbol can include a checksum character for error detection.

Pharmacode

Selects Pharmacode reading.Pharmacode is used in the pharmaceutical industry as a packing control system.

UPC/EAN

Selects UPC (Universal Product Code)and EAN (European Article Numbering) reading.UPC is a fixed-length, numeric-only symbology which can be scanned bidirectionally.The size for a UPC symbol can vary to accommodate various printing processes, but the code works best when the height of the symbol exceeds its width.European companies use the generally equivalent EAN system.

UPC supports Version A (Regular version) and Version E (Zero-suppressionversion) UPC barcodes, as well as two- and five-character supplementalencodations.EAN supports EAN-8 and EAN-13 barcodes, as well as two- and five-charactersupplemental encodations.

Code 93

Selects Code 93 reading.Code 93 encodes the same characters as Code 39, but uses nine bar code elements per character instead of 15.

Codabar

Selects Codabar reading (also knownas USD-4 and Code 2 of 7).Codabar is an older symbology that encodes digits.

Stacked Symbologies

Specifies which Stacked Symbologies to read (multiple symbologies can be selected and read).

PDF 417 | Selects PDF417 reading.PDF417 is a stacked linear barcode symbol format used in a variety of applications, primarily transport, identification cards, and inventory management.
DataBar | Selects DataBar reading (previously referred toas RSS, and also known as GS1 DataBar).DataBar symbols can identify small items and carry more information than the current EAN/UPC bar code.
DataBar Limited | Selects DataBar Limited reading (also known as GS1 DataBar Limited).
DataBar Expanded | Selects DataBar Expanded reading (also known as GS1 DataBar Expanded).
EAN.UCC Composite | Selects EAN.UCC Composite reading.When enabled a composite code (a 1D code with a 2D component) can be decoded.The 1D codes that the EAN.UCC can be used with are DataBar and Code 128.

Postal Symbologies

Specifies which Stacked Symbologies to read (multiple symbologies can be selected and read).

POSTNET | Selects POSTNET reading.The Postal Numeric Encoding Technique (POSTNET) barcode was invented by the US Postal Office to encode ZIP Code information.A barcode using the POSTNET symbology encodes each numeric character using a combination of 5 bars, either short or long.A POSTNET barcode can contain a 5-digit ZIP Code, a 5-digit ZIP + 4 Code, or an 11-digit delivery point code.The symbol always includes a checksum character.
PLANET | Selects PLANET reading.The PLANET barcode is the inverse of the POSTNET barcode, using short bars where the POSTNET symbology uses long bars and long bars where the POSTNET symbology uses short bars.The US Postal Office uses PLANET barcodes to track pieces of mail.A PLANET barcode can have up to 12 digits.
Japan Post | Selects Japan Post reading.
Australia Post | Selects Australia Post reading.Also known as a 4-State Customer Barcode, it is an alphanumeric symbology adopted by the Australian Post.A barcode using the 4-State symbology encodes each character using 4 different types of bars, each of which has a distinct name and value.A 4-State barcode can be generated in one of three different structures of 37 bars (standard), 52 bars, or 67 bars.The ReadIDMax function supports the Australian, Japan Post, UPU and USPS versions of the 4-state symbology.
UPU | Selects UPU reading.
Intelligent Mail Barcode | Selects Intelligent Mail Barcode reading.Also known as the IM barcode, this is a 65 bar code for use on mail in the United States.

Decode Settings

Perspective

Specifies the decoding of Data Matrixand QR Code symbols with perspective distortion and optionally trains Data Matrix symbols for a known perspectivedistortion.

  • No perspective: Decodes Data Matrix symbols that haveno perspective distortion.
  • Perspective (default): Decodes Data Matrix, QR Code and 1D/Stackedsymbols with perspectivedistortion; the perspective distortion is estimated independently duringmodel training and run time.

  • Train perspective: Decodes Data Matrixsymbols with a known perspective distortion.The perspective is trained, then at run time, the symbol is searchedin a space where the perspective distortion in the input image is compensated,using the trained attributes.This option requires that the run time symbolis placed on the same plane as that of the trained symbol.This optionprovides the ability to decode severely damaged symbols, with known perspectivedistortion.

    Tip: It is recommendedthat the vision system be mounted such that the angle of incidence (the angle betweenthe optical axis of the sensor and the normal vector of the plane on whichthe symbol is presented) is no more than 40 degrees, and the resolutionof the symbol be at least 5 pixels per cell.

QR Mode

Specifies the type of QR Code to read:

  • QR Model 1
  • QR Model 2
  • QR Models 1 and 2
  • Micro QR
  • Micro QR and QR Model 1
  • Micro QR and QR Model 2
  • All QR Modes (default)

Ignore Polarity

Specifies whether or not to read Data Matrix symbols where the polarity is inverted, with respect to the trainedsymbol.

Note: This parameter is only valid if the Enable Training parameter is On.
  • Off (default): Do not allow inverted polarity from the trained model.
  • On: Allow inverted polarity from the trained model.

Allow Flexible
Grid Size

Specifies whether or not to read Data Matrix and QR Code symbols of a different grid size, with respect to the trained symbol.

Note: This parameter is only valid if the Enable Training parameter is On.
  • Off (default): Only allow symbols to be read that are the same grid size as the trained symbol.
  • On: Allow symbols to be read that are not the same grid size as the trained symbol.

Checksum

Specifies whether the symbol will be validatedto ensure reliability using an error-detection algorithm.Checksum onlyapplies to symbols with optional checksum algorithms included in the symbol;each symbol has its own unique checksum algorithm.The type of checksum,if any, that is used depends on the code type selected.

  • OFF (default): Do not verify checksum.
  • ON: Requires checksum to pass.
Note: Code 128, Code93, DataBar, UPC and EAN barcodes are validated with a checksum regardlessof the parameter selection.If Checksumis enabled for any other barcode, and no checksum is encoded, the readwill fail.

Polarity

Specifies the color of the symbols.

  • Black: The symbol is darker than the background.
  • White: The symbol is lighter than the background.
  • Auto (default): The function automatically selects the polarity of the symbol.

Omnidirectional

Specifies the direction in which scan linesare projected within the Region in order to detect all of the elementsin the barcode.An element refers to either a bar or space in a barcode. At least one scan line must project across every elementof the barcode for a successful decode.For more information, see Scan Lines.

  • 0 = OFF (default): Scan lines are projected in one directionto detect a barcode parallel to the Region.
  • 1 = ON: Scan lines are projected at variousangles to detect a barcode that is rotated relative to the Region.
Note: PharmaCodebarcodes will not decode correctly if rotated over 90° from the angleof the Region.

Sort Mode

Specifies the order, if any, in which results are returned.

Note: For accurate sorting of symbols, the Maximum Results parameter must be set to a value that is equal to or greater than the number of symbols contained in the image.
  • None (default): Sorts by first decoded results.Any undecoded results will follow decoded results.
  • Top Down: Sorts in ascending Row order.
  • Left To Right: Sorts in ascending Column order
  • Alphabetical: Sorts the results alphabetically.
  • String Length: Sorts the results by string length (shortest to longest).
  • Rows: Sorts the results by grouping the symbols into rows, and then sorting them from left-to-right within each row.When sorting by Rows, two symbols will be considered part of the same Row if the center of one symbol overlaps vertically with any part of the other symbol.
  • Columns: Sorts the results by grouping the symbols into columns, and then sorting them from top-to-bottom within each column.When sorting by Columns, two symbols will be considered part of the same Column if the center of one overlaps horizontally with any part of the other symbol.

Allow Identical 1D Symbols

Specifies whether or not the function should decode all symbols within the region, even if they are identical.Two symbols are considered identical if they have the same length, symbology type and decoded string.

  • OFF (default): Only return one result if multiple symbols are decoded.
  • ON: Return all results, even if they are identical.
Expand UPC-E

Specifies whether the decoded symbol returns the 6-digit UPC-E string or the expanded 11-digit UPC-A equivalent string.

  • OFF: The decoded symbol returns the 6-digit UPC-E string.
  • ON (default): The decoded symbol returns the expanded 11-digit UPC-A equivalent string.
Note:
  • The Expand UPC-Eparameter is only implemented for 1D/Stacked symbols.
  • The Expand UPC-Eparameter is only supported on In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 70xx - 74xx series vision systems with firmware version 4.10.1 and higher.

Verify

Specifies whether the print quality tests (also known as quality verification metrics) will be performed. For more information, see ID.

OFF (default) | Do not test quality.
ON | Test quality and display the results in the spreadsheet.
Note:
  • If thestring cannot be decoded, then #ERR will be returned for all results thatare automatically inserted into the spreadsheet.
  • All Code Types except PDF 417, Pharmacode and DataBar support quality verification metrics.The UCC.EAN Composite code type supports verification metrics for the linear 1D symbol portion, but not the 2D portion.

Timeout

Specifies the amount of time, in milliseconds(0 to 30000), that the functionwill search for a valid ID symbol before execution is halted and an #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Note: At times, the ReadIDMax function may exceed the specified Timeout parameter value by varying percentages.If this happens, adjust the Timeout parameter value lower to compensate for the overage.

Show

Specifies the display mode for the ReadIDMaxgraphical overlay on the image.

Note: The Showparameter is only implemented for Data Matrix and QR Code symbols.
Hide all (default) | The input region boundary will behidden, except when the cell containing the ReadIDMax function is highlightedin the spreadsheet.
Result graphics only | The result graphics (boxes for DataMatrix and QR Code) will be displayed at all times.
Input and result graphics | The input graphics and result graphicswill be displayed at all times.

ReadIDMax Outputs

Returns

An IDMax data structure containingthe decoded alphanumeric string, or #ERR if any of the input parametersare invalid.

Results

When thefunction is initially inserted into a cell, a result table is inserted in the spreadsheet.The number of indexed strings returned in the result table is equal to the value entered in the Maximum Results parameter.If no symbol can be located and decoded,then #ERR is returned.

Note: For Data Matrix symbols, the base 256 latch character (Decimal 231 Hex E7) will cause encoded data to be processed as bytes, per the Data MatrixISO/IEC 16022 specification.Use the GetStringIDMax function to return the encoded data.For more information, see IDMax.

ReadIDMaxVision Data Access Functions

If the Verify checkbox is disabled when the ReadIDMax function is initiallycreated, then a single Vision Data Accessfunction will be automatically inserted into the spreadsheet:

String

GetString(IDMax, [Index])

 Returns the alphanumeric string encoded in theindexed symbol.

If the Verify checkbox is enabled (and the function performs additional quality verification metrics) when the ReadIDMax functionis initially created, the additional Vision Data Access functions thatare automatically inserted into the spreadsheet depend on the selected Symbology Group.Additional data elements can be accessed using the ReadIDMaxVision Data Access functions.For more information, see IDMax.

Note:
  • If the Verifycheckbox is enabled after the ReadIDMax function is initially created,the additional Vision Data Access functions will not be automaticallyinserted into the spreadsheet.Also, the Verify checkbox must be enabledbefore the additional Vision Data Access functions will execute in thespreadsheet.
  • If decoding Data Matrix symbols, use the GetStringIDMax function instead of GetString for more accurate and detailed information about the decoded symbol.


ValidateIDData

Performs validation, which conforms to MIL-STD 130 and GS1, of the data decoded from an ID Code that is initially read by either the ReadIDMax or ReadIDCode functions. For more information, see ReadIDMax and ReadIDCode.

Note:
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • When using a color In-Sight vision system, the ReadIDCode function must reference an Image processing function (for example, ColorToGreyscaleFilter), which converts the color image to greyscale. For more information, see Image.

ValidateIDData Inputs

Syntax: ValidateIDData(IDCode,Validation Options,DoD UID Construct,)

Parameter Description

IDCode

This argument must reference a spreadsheet cell that contains either a valid IDMax data structure returned by the ReadIDMax function, or a valid IDCode data structure returned by the ReadIDCode function.

Note: If referencing a ReadIDMax function, the Verify parameter must be enabled. If referencing a ReadIDCode function, the Algorithm parameter must be enabled.

Validation Options

Specifies which validation option is used.

0 = Data Qualifiers (Default)

Specifies that the data qualifiers in the data are valid and the characters that follow each data qualifier conform in type, length and value. A data qualifier is a specified character, or string of characters, that immediately precedes data that defines the general category or intended use of the data that follows. Three categories of data qualifiers can be validated:

  • Application Identifiers (AIs) – Format 05 of ISO/IEC 15434
  • Data Identifiers (DIs) – Format 06 of ISO/IEC 15434
  • Text Element Identifiers (TEIs)

1 = ISO 15434

Specifies ISO 15434 as the validation option. For more information, see

iso.org.

2 = DoD UID

Specifies the Department of Defense (DoD) Unique Identification (UID) as the validation option. For more information, see acq.osd.mil/dpap.

Note: The DoD minimum machine-readable information (MRI) symbology requirement is the Data Matrix ECC200 symbol defined by the ISO 16022 specification.

3 = GS1

Specifies GS1 standards as the validation option. For more information, see gs1.org.

Note:
  • For In-Sight Micro 1000 series, 5000 series and 70xx - 74xx series vision systems, In-Sight firmware version 4.10.1 and later is current with GS1 General Specifications, Version 14.
  • In-Sight firmware version 5.1.0 to 5.3.0 is current with GS1 General Specifications, Version 10, Issue 1, Jan-2010.
  • In-Sight firmware version 5.4.0 and later is current with GS1 General Specifications, Version 14.

4 = securPharm (strict)

 Specifies "strict" securPharm (a German pharmaceutical industry barcode packaging system using DataMatrix symbols) as the validation option. Requires that Pharmacy Product Number (PPN), Serial Number, Lot and Expiration (GTIN is optional) be included.

5 = securPharm (loose)

 Specifies "loose" securPharm (a German pharmaceutical industry barcode packaging system using DataMatrix symbols) as the validation option. Requires that only PPN be included, with the other information being optional.

DoD UID Construct

Specifies type of DoD UID Construct to validate.

Note: This parameter is only enabled when DoD UID is the selected value for the Validation Options parameter.

0 = Either DoD UID Construct #1 or Construct #2 (Default)

Specifies either DoD UID Construct #1 or Construct #2 as the validation option.

When complying with the DoD Construct #1 UID, all fields are validated and must contain, at a minimum:

  • Enterprise ID
  • Serial Number within the enterprise ID

When complying with the DoD Construct #2 UID, all fields are validated and must contain, at a minimum:

  • Enterprise ID
  • Original part, lot or batch number
  • Serial Number within the original part, lot or batch number
  • Current part, lot or batch number

1 = DoD UID Construct #1

Specifies DoD UID Construct #1 as the validation option.

2 = DoD UID Construct #2

Specifies DoD UID Construct #2 as the validation option.

ValidateIDData Outputs

Returns | An IDValid data structure containing validation metrics of the symbol or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, the validation status will automatically appear in the adjacent cell to the right of the IDValid data structure, along with an applicable information string. For more information, see IDValidate.

ValidateIDData Vision Data Access Functions

When the ValidateIDData function is initially created, the following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Valid | GetValid(IDValid) | The validity of the data (0 = not valid, 1 = valid).
Diagnostic Info | GetDiagnosticString(IDValid) | Returns an applicable diagnostic information string.

Additional data elements can be accessed using the IDValidate Vision Data Access functions. For more information, see IDValidate.


VerifyIDCode

Used to extract metrics associated with code readability and mark quality from symbols that are initially read by either a ReadIDMax function or ReadIDCode function. For more information, see ReadIDMax and ReadIDCode.

Note:
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • The referenced ReadIDMax function must have the Verify parameter enabled.
  • The referenced ReadIDCode function must have the Algorithm parameter enabled.
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

VerifyIDCode Inputs

Syntax: VerifyIDCode(IDCode,Metrics,IAQG 9132 Metrics,Cognex Metrics,Min Cell Size,Aperture Percentage,Timeout,Show)

Parameter Description

IDCode

This argument must reference a spreadsheet cell that contains either a valid IDMax data structure returned by a ReadIDMax function, or a IDCode data structure returned by a ReadIDCode function.

Note: The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

Metrics

Specifies whether ISO verification metrics are used.

Note: When verifying QR Codes, only ISO 16022:2000 Enhanced and ISO 16022:2000 Traditional are supported.
0 = None | ISO/AIM verification metrics will not be used in the ID verification.
1 = ISO 16022:2000 Enhanced Closed International symbology specification - Data Matrix. | The Enhanced ISO 16022:2000 quality metrics are calculated using advanced methods to provide more robust and reliable ID verification results. For more information on ISO, click here.
2 = ISO 16022:2000 Traditional | The Traditional ISO 16022:2000 quality metrics are calculated strictly per the methods described in the ISO 16022:2000 standard for ID verification.
3 = ISO 15415:2004 (Default) Closed Barcode print quality test specification - 2D symbols. | The ISO 15415 quality metrics are calculated strictly following the requirements defined in the ISO 15415:2004 standard for ID verification.
4 = AIM DPM-Process Control | The AIM DPM-Process Control quality metrics are calculated following the requirements defined by AIM.
5 = ISO 29158 / AIM DPM-Contract Compliance | The ISO 29158 / AIM DPM-Contract Compliance quality metrics are calculated following the requirements defined by AIM.
6 = Postal Code Verification | The Postal Code quality metrics are calculated following the requirements defined in the MERLIN specification (software release version 2.02 Date: June 20, 2002).

IAQG 9132 Metrics

Specifies whether the IAQG AS9132, revision A Closed Data Matrix (2D) Coding Quality Requirements for Parts Marking verification metrics are used (including Dot Ovality) to verify Data Matrix symbols. For more information on IAQG, click here.

Note: IAQG 9132 Metrics are not supported for verifying QR Codes.
ON (Default) | The IAQG 9132 verification metrics are used in the ID verification.
OFF | IAQG 9132 verification metrics are not used in the ID verification.

Cognex Metrics

Specifies whether the Cognex supplemental verification metrics are used.

ON (Default) | Cognex verification metrics are used in the ID verification.
OFF | Cognex Metrics are not used in the ID verification.

Min Cell Size

Specifies the minimum expected Also called a module, a cell is a single square, which can be either black or white. For example, a 10 x 10 symbol is made up of 100 black and white cells. One cell is equal to one bit of data. cell size (0 to 255; default = 0). A value of 0 will use the current symbol's cell size.

Note: ISO 15415:2004 must be the selected ISO Metric to enable this parameter.

Aperture Percentage

Specifies the percentage (0 to 100; default = 80) to compute the synthetic aperture size from minimum cell value. This value is used in assessment of verification metrics.

Note: ISO 15415 must be the selected ISO Metric to enable this parameter.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000), that the function will attempt to verify the ID symbol before execution is halted and an #ERR is returned.

Show

Specifies the display mode for the VerifyIDCode graphical overlay on the image, when verifying Data Matrix and QR Code symbols.

0 = hide all (default)

will be hidden, except when the cell containing the VerifyIDCode function is highlighted in the spreadsheet.

1 = result graphics only

The result graphics (boxes for Data Matrix and QR Code) will be displayed at all times.

2 = show all: input, result and error modules

The input Region graphic, result graphics (boxes for Data Matrix and QR Code) and Closed error module diagnostic graphics (Data Matrix only) will be displayed at all times.

When ISO 15415, AIM DPM-Process Control or ISO 29158 / AIM DPM-Contract Compliance and both versions of AIM-DPM are selected, errors are graphically shown. The representative graphics depends on the type of error(s) found.

A colored square represents the modulation grade. The color of the square depends on the grade:

  • No square = 4
  • Blue square = 2 or 3
  • Yellow square = 1
  • Red square = 0

A red [image] represents a bit error (a white bit, where a black bit is expected and vice versa).

VerifyIDCode Outputs

Returns | An IDVerify data structure containing verification metrics of the symbol, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, the grade of the verified symbol will appear in the adjacent cell. If the symbol cannot be verified, then #ERR will be inserted.

VerifyIDCode Vision Data Access Functions

When the VerifyIDCode function is initially created, IDVerify Vision Data Access functions are automatically inserted into the spreadsheet, depending on the verification metrics that are selected. For more information, see VerifyIDCode.


ID Error Strings

The GetErrorString Vision Data Access function may be used to extract the following list of errors from either the IDMax data structure returned by a ReadIDMax function, or the IDCode structure returned by a ReadIDCode function. For more information, see ReadIDMax and ReadIDCode.

  • System error.
  • Insufficient heap memory.
  • Vision processing error.
  • Invalid image buffer.
  • Invalid region size.
  • Region exceeds image boundary.
  • ReadIDMax error.
  • ReadIDCode error.
  • Cannot detect Row Address Patterns.
  • Row Address Patterns (RAP) memory limit exceeded.
  • Can't detect CC-A symbol version.
  • Unable to fill in missing RAP points.
  • Invalid scan line detected. For more information, see Scan Lines.
  • Scan line exceeds image boundary.
  • Cannot detect half value patterns.
  • Half value memory limit exceeded.
  • No valid symbols found.
  • Too many symbol errors to correct.
  • Reed Solomon error correction failed.
  • Automatic contrast threshold calculation failed.
  • Contrast sensitivity exceeds allowed range.


Image

The In-Sight Image tool processes the input image to enhance desirable features while removing or diminishing undesirable features; the result is an enhanced input image or a new output image that is better suited for additional data-extraction functions such as Blob or Histogram analysis. For more information, see Blob and Histogram.

The Image tool includes the following functions:

  • ColorToGreyscaleFilter: Converts each pixel in a color image or region of interest (ROI) to a greyscale value based on a simple filter of one color parameter. (For color In-Sight vision systems and color-enabled emulators only.)
  • CompareImage: Compares a template image with an input image to produce a greyscale output image where every pixel represents the normalized difference.
  • ComputeImageSharpness: Computes a measure of the relative focus of an input image as part of an iterative process for refocusing an In-Sight vision system lens.

  • Filter: Produces a color or greyscale output image where every pixel is the result of an image-enhancement technique in the input image or ROI.

    Note: This function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • FindCircleDefects: Converts each pixel within an annular (ring-like) region in an input image to black or white based on a user-set threshold, with white indicating non-circular or non-radial features.
  • GreyscaleDistance: Converts each pixel of a color image or ROI to a greyscale value or to black or white based on a variety of user-set color parameters. (For color In-Sight vision systems or color-enabled emulators only.)
  • ImageMath: Produces a greyscale or black-and-white output image where every pixel is the result of an arithmetic operation—for example, addition, subtraction or averaging—performed between two input images. This is a multipurpose function.
  • LineScanDistortion: Produces an undistorted output image based on calculations from a TrainLineScanDistortion function, for use with In-Sight 5604 line scan vision systems.

  • NeighborFilter: Produces a greyscale output image where every pixel is the result of a "local" image-enhancement technique—for example, shrinking, expanding, filling, smoothing or edge enhancement—applied to a set of adjacent pixels ("neighbors") in the input image or ROI. This is a multipurpose function. For more information, refer to the "Inputs" section for NeighborFilter.

    Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  • PointFilter: Produces a black-and-white or greyscale output image where every pixel is the result of a "global" image-enhancement technique—for example, thresholding, inversion, histogram equalization or greyscale stretching or clipping—applied to each pixel in the input image or ROI. This is a multipurpose function.

    Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • ScaleColorImage: Resamples the pixels in an color input image or ROI to produce a reduced, enlarged, unrotated or unbent version of the color image.
  • ScaleImage: Resamples the pixels in an input image or ROI to produce a reduced, enlarged, unrotated or unbent version of the image.

  • SceneCorrection: Produces a greyscale image to improve images with uneven lighting or shading.

    Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • SurfaceFX: Analyzes multiple images acquired with lighting from different directions to create a high contrast output image which highlights areas where surface height exhibits departures from smoothness, such as edges, creases, indentations and protrusions.
  • TrainLineScanDistortion: Calculates the lens distortion present in a region of an image for use with In-Sight 5604 and 9902L line scan vision systems.
  • WhiteBalance: Removes color casts in a color image by calculating its RGB (red, green and blue) values and correcting them according to color tables stored in the In-Sight job. (For color In-Sight vision systems and color-enabled emulators only.)

To view these Image functions by operation, see When Image Processing Is Used?.

Note: Functions that require an Image parameter must reference a spreadsheet cell that contains a valid Image data structure. The default Image parameter reference is cell A0, which contains the Image data structure returned by the AcquireImage function. Other valid Image parameters include Image data structures returned by CompareImage, FindCircleDefects, NeighborFilter and PointFilter.

What is Image Processing?

When Image Processing Is Used?

Why Image Processing Is Used?

How to Perform Image Processing

ColorToGreyscaleFilter

CompareImage

ComputeImageSharpness

Filter

FindCircleDefects

GreyscaleDistance

ImageMath

LineScanDistortion

NeighborFilter

PointFilter

ScaleImage

ScaleColorImage

SceneCorrection

SurfaceFX

TrainLineScanDistortion

WhiteBalance


What is Image Processing?

Machine vision applications need high-quality images. Data is lost when images are unfocused, warped or poorly lit, which can cause data-extraction functions such as Blob or Histogram analysis to operate poorly or even fail. For more information, see Blob and Histogram.

The first step to producing high-quality images is to ensure that hardware and environmental issues such as lighting and lenses are optimized during equipment setup so that the acquired images are sharply focused, undistorted and evenly illuminated. If an In-Sight job has difficulty extracting the desired data from the images, the second step might be to use an Image function to enhance the images further.

As are all photos, In-Sight images are raster graphics. Raster graphics store information about image characteristics in a grid of picture elements ("pixels"), which are the smallest complete samples of an image and are not scalable. The quality of a raster image is determined by the total number of pixels (known as "resolution") and the amount of information in each pixel.

To enhance the desired object and remove or diminish distracting features in images—for example, by adjusting color, brightness, contrast or scaling—the In-Sight Image functions employ sophisticated image-processing algorithms to add or subtract data from individual pixels or groups of adjacent pixels (known as "neighbors").


When Image Processing Is Used?

Many users build their In-Sight jobs without the Image tool, and use the tool only if their jobs fail to produce the desired results. Image functions can be used for any of the following conditions:

  • The acquired image is in color. The In-Sight tools operate only on greyscale images, and although each tool is designed to convert images from color to greyscale automatically, it can be more efficient to perform the conversion only once using an Image function and to reference subsequent tools to the converted image.
  • The acquired image displays little contrast between the object and its background.
  • The acquired image contains distracting features that minimize the visual impact of the object.
  • The acquired image is out of focus, and adjustments to the vision system lens are needed.
  • An enlarged, reduced, unbent or unrotated version of the acquired image is required by another In-Sight tool.
  • A black-and-white version of the acquired image is required by another In-Sight tool.

Image functions can perform a variety of image-processing operations. Most of the functions target a specific operation; three are designed for multipurpose use. The following table lists common operations and the applicable Image functions.

Operation | Description | Applicable Image Function
Brightness/contrast | "Clips" (or "scales up" or "scales down") the greyscale value in each pixel to user-specified minimum and maximum values to modify brightness and contrast. | Filter PointFilter SurfaceFX
Color adjustment | Converts or corrects the color of the input image; available only for color In-Sight vision systems or color-enabled emulators. | ColorToGreyscaleFilter GreyscaleDistance WhiteBalance
Expansion/contraction | Expands or contracts features in the input image or ROI. | Filter NeighborFilter
Filling | Fills pixels with white or black values so that they resemble adjacent pixels. | Filter NeighborFilter
Filtering | Blocks undesirable or unwanted data, while passing only desirable data. | ColorToGreyscaleFilter GreyscaleDistance Filter NeighborFilter PointFilter
Image differences | Compares the input image with a template, another image or a shape to determine differences between the two. | CompareImage FindCircleDefects ImageMath
Inverse | Creates a "negative" of the image. | Filter PointFilter
Lens adjustment | Measures the lens focus so that it can be adjusted through an iterative process. | ComputeImageSharpness
Scaling (size) | Presents an enlarged or reduced version of the input image in the job view. | ScaleImage ScaleColorImage
Sharpening | Discovers edges (that is, areas in an image where pixel greyscale values change sharply) based on orientation (vertical, horizontal); or enhances edges by comparing a "smoothed" version of the image with the original. | Filter NeighborFilter
Smoothing | Averages the greyscale values in a set of adjacent pixels ("neighbors") in the input image to diminish the effect of rapidly changing greyscale values. | Filter NeighborFilter SceneCorrection SurfaceFX
Thresholding | Produces a black-and-white version of the input image or ROI based on a user-set threshold. | Filter FindCircleDefects GreyscaleDistance ImageMath PointFilter


Why Image Processing Is Used?

If an In-Sight job fails because of poor image quality, an Image function can help enhance the image so that the desired data is easier to extract. Some examples include:

  • Reducing noise or changing the patterns of object connectivity for Blob analysis. For more information, see Blob.
  • Converting spatial features into greyscale values so that statistics can be computed for Histogram analysis. For more information, see Histogram.
  • Increasing the contrast of a 2D symbol against its background for 2D code reading. For more information, see ID.
  • Minimizing confusing or unwanted spatial frequency characteristics from both the model and image pixel data, to improve the speed and reliability for PatFind template searching. For more information, see Pattern Match.


How to Perform Image Processing

With In-Sight Explorer, the image-processing procedure can be broken down into three steps:

  1. Analyze the acquired image to determine whether image processing will help and what kind of modifications are needed.
  2. Insert an appropriate Image function into the In-Sight spreadsheet and experiment with the parameters to determine the optimal settings for enhancing the image.
  3. If needed, insert another Image function into the In-Sight spreadsheet, reference it to the preceding function's output image and experiment with the parameter settings. Repeat as required.

As indicated, several Image functions might be needed to improve the quality of the acquired image, each referenced to the output of a subsequent Image function. Note, however, the degree of improvement possible with the Image tool depends on the quality of the acquired image, which, in turn, is largely determined by external factors such as lighting and optics. The Image tool cannot make a bad photo good.


ColorToGreyscaleFilter

Available for color In-Sight sensors and color-enabled emulators only, ColorToGreyscaleFilter converts each pixel in a color image or region of interest (ROI) to a greyscale value based on a simple filter of one color parameter: "pure" red, green or blue (RGB); hue, saturation or intensity (HSI); luminance; or interpolation of the weighted average of RGB components. For more information, see Color Components of a Pixel.

Note: Although similar to the GreyscaleDistance function, ColorToGreyscaleFilter offers a more straightforward operation—every output pixel is a function of the selected conversion filter, which focuses on only one component of the pixel (for example, the red value, not the red, green and blue values together, as with GreyscaleDistance). Users might need to experiment with both to determine the best color-conversion function for their applications. For more information on the GreyscaleDistance function, see GreyscaleDistance.

ColorToGreyscaleFilter Inputs

Syntax: ColorToGreyscaleFilter(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Conversion,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid color Image data structure. By default, the cell referenced isA0, the cell containing the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Note: : AcquireImage is the only function that returns a valid color Image data structure.

Fixture

Defines the ROI relative to a Fixture input or the output of a VisionTool function's image coordinate system. Setting the ROI relative to a fixture ensures that if the fixture is rotated or translated, the ROI will be rotated or translated in relation to the fixture.

Note: The default setting is (0,0,0), the top leftmost corner of the image. For more information on Fixture, see Fixture. For more information on VisionTools, see Vision Tools.
Row | Specifies the row offset, in image coordinates.
Column | Specifies the column offset, in image coordinates.
Theta | Specifies the orientation, in image coordinates.

Region

Also known as the region of interest or ROI, specifies the region of the image that undergoes image processing; creates a rectangular image region that can be transformed and rotated. With this parameter selected, clicking the MaximizeRegion button will automatically stretch the region to cover the entire image.

X | Specifies the x-offset of the origin, in fixture coordinates.
Y | Specifies the y-offset of the origin, in fixture coordinates.
High | Specifies the dimension along the region's x-axis.
Wide | Specifies the dimension along the region's y-axis.
Angle | Specifies the orientation, in fixture coordinates.

Conversion

Specifies the type of conversion filter.

Note:
  • Each color pixel is divided into color components.
  • The default color conversion used by other In-Sight tools is equivalent to ColorToGreyscaleFilter's Interpolation conversion filter.

0 = Luminance (default)

Specifies the conversion filter for the luminance of the color. The result is an output image of the luminance. The more light emitted from a pixel in the input image, the lighter its appearance in the output image.

Note:

Luminance is closely related to intensity in concept, and is a measure of the amount of light emitted or reflected from a particular area.

In machine-vision applications, luminance is a greyscale value that is computed from the red, green and blue (RGB) components of a pixel using the following formula:

RGB Luminance value = 0.299xR + 0.587xG + 0.114xB

1 = Red

Specifies the conversion filter for the red component of the color. The result is to filter out all but the red component of the pixel. The higher a pixel's red value in the input image, the lighter its appearance in the output image.

2 = Green

Specifies the conversion filter for the green component of the color. The result is to filter out all but the green component of the pixel. The higher a pixel's green value in the input image, the lighter its appearance in the output image.

3 = Blue

Specifies the conversion filter for the blue component of the color. The result is to filter out all but the blue component of the pixel. The higher a pixel's blue value in the input image, the lighter its appearance in the output image.

4 = Hue

Specifies the conversion filter for the hue component of the color. The result is to filter out all but the hue component of the pixel. The higher a pixel's hue value in the input image, the lighter its appearance in the output image (for example, a red with a hue value of 0 will appear dark).

5 = Saturation

Specifies the conversion filter for the saturation component of the color. The result is to filter out all but the saturation component of the pixel. The higher a pixel's saturation value in the input image, the lighter its appearance in the output image (for example, a white with a saturation value of 0 will appear dark).

6 = Intensity

Specifies the conversion filter for the intensity component of the color. The result is to filter out all but the intensity component of the pixel and to determine the average intensity of the pixel's RGB components. The higher a pixel's intensity value in the input image, the lighter its appearance in the output image (for example, a white with an intensity value of 255 will appear light).

7 = Interpolation

Specifies the conversion filter for the interpolation of the color. As with the Intensity filter, the result is to filter out all but the intensity component of the pixel. The higher a pixel's intensity value in the input image, the lighter its appearance in the output image (for example, a white with an intensity value of 255 will appear light). However, the Interpolation filter determines the weighted average intensity of the RGB components and is a non-standard conversion filter.

Note:

Interpolation is a weighted average of the red, green and blue (RGB) components of a pixel using the following formula:

Interpolation value = 0.25xR + 0.50xG + 0.25xB

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input image region will be hidden, except when the cell containing the ColorToGrayscaleFilter function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

ColorToGreyscaleFilter Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid. For more information, see Structures.

ColorToGreyscaleFilter Example

In this example, the object in the input image is a yellow Cognex sensor, which is also used in the example for GreyscaleDistance. Random samplings of the image (achieved by toggling off the Overlay view by choosing Overlay on the View menu, moving the cursor over the sensor and viewing the RGB information in the status bar in the bottom-left corner of the window) reveal RGB values of 205-185-124, 193-177-110, 175-154-39, 133-104-2 and 115-91-6 for the sensor. For more information on GreyscaleDistance, see GreyscaleDistance.

After inserting the function into the In-Sight spreadsheet, the user defines the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image. The user moves or resizes the box using the cursor and clicks the green "checkmark" icon in the In-Sight toolbar (or presses the Enter key on the keyboard) to confirm the selection and return to the property sheet.

Selecting a conversion filter, accepting the default settings of the other parameters and clicking OK in the property sheet completes the configuration for this example and applies the function to the input image.

Below are three output images of the red, green and blue filters applied, respectively. As expected, the yellow of the sensor is brightest in the red-filtered image because red is the strongest color component in the yellow sensor.(The maximum red value for the image is 210, the mean is 116 and the median is 127.) The closer the input pixel value is to the filter's value, the brighter the output pixel.

The yellow of the sensor is slightly darker in the green-filtered image because it contains less green (maximum of 199, mean of 112 and median of 125), compared with red.

The yellow of the sensor is darkest in the blue-filtered image because it contains little blue (maximum of 197, mean of 101 and median of 121), compared with red.


CompareImage

CompareImage compares a template image with an input image to produce a greyscale output image where every pixel represents the normalized difference.

CompareImage Overview

CompareImage is designed to extract a template from the current image when the ForceTrain checkbox in the property sheet is selected. After the user deselects the checkbox, CompareImage can map the pixels from the template to the input image for comparison and for producing the greyscale output image. Pixels that do not match the template image within a certain tolerance are displayed as bright or white pixels.

CompareImage Inputs

Syntax: CompareImage(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,ForceTrain,Edge Range,Interpolation,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

ForceTrain

Specifies when the template is extracted from the current image: either when the ROI dimensions are modified, or when the ForceTrain parameter is selected.

0 = OFF (default) | The template is extracted from the current image only when the ROI dimensions are modified. Chosen once the user has selected (or "trained") a template image, this disables the "training" parameter and prevents the template from being overwritten.
1 = ON | The template is extracted from the current image. This is chosen if the user is still in the process of selecting (or "training") a template image.

Edge Range

Specifies the number of pixels (0–24; default = 3) around an edge that will be tolerated during the image comparison. The higher the number, the less rigorous the edge matching between the template and the input image (in other words, the less likely imperfectly matched edges will be depicted as differences in the output image).

Interpolation

Specifies the type of pixel comparison to perform when mapping the template to the input image to produce the output image of the differences.

0 = Nearest Neighbor (default) | Each pixel in the template is compared with its nearest pixel in the input image to calculate the normalized greyscale difference for each pixel. This is a faster, but less accurate, method.
1 = Bilinear | Each pixel in the template is compared with a weighted average (which represents the greyscale value of the four nearest pixels in the input image) to calculate the normalized greyscale difference for each pixel. This is a more accurate, but slower, method.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The available graphics items will be hidden, except when the cell containing the CompareImage function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The graphics items associated with the input image region will be displayed at all times.
3 = show all: input graphics and template image | The graphics items associated with the input image region will be displayed at all times; however, while in the CompareImage property sheet, the template image will also be displayed.

CompareImage Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid. For more information, see Structures.

CompareImage Example

In this example, the goal is to use CompareImage to compare the template image of a "good" gasket with input images of gaskets on a production line.

  1. After inserting CompareImage into the spreadsheet, define the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image.
  2. Move or resize the box using the cursor, and click the OK [image] button on the Job Edit toolbar (or presses the Enter key) to confirm the selection and return to the property sheet.
  3. Now you can fixture the tool to another data structure. In fixturing, you can identify a distinctive feature that appears on all instances of the object and designate it as a reference point for subsequent vision tools. This allows precise comparisons or inspections to be made, even if the object is slightly rotated or shifted on the production line. To fixture the function, click the word "Fixture" in the property sheet and click either the Absolute Reference [image] or Relative Reference [image] button on the property sheet's toolbar. The property sheet disappears, revealing the In-Sight spreadsheet.
  4. Move the cursor to select the Row, Column and Angle cells from another data structure in the spreadsheet (for example, FindPatterns) as the reference for the fixture, and click the OK [image] button on the Job Edit toolbar (or press the Enter key) to confirm the selection and return to the property sheet.

  5. Next, verify the ForceTrain checkbox in the property sheet is selected, so that a template image (below) can be extracted automatically when an image acquisition is manually triggered.

    Tip: Simply selecting the ForceTrain checkbox triggers the image acquisition, so if the current image is acceptable, the you can skip setting up the image and manually triggering the acquisition.

    Once a template is selected, deselect the checkbox to prevent overwriting the template.

  6. You can now accept the default settings of the other parameters and click OK in the property sheet to complete the configuration for this example and apply the function to the input image.

    During run time, the tool compares the template image with the input image. A "bad" input image might consist of a gasket marred by white marks (below).

    Differences between the two are displayed as bright pixels in the greyscale output image (below).

    Another tool (for example, ExtractBlobs; see below) can reference the output image to make a decision about whether the gasket passes or fails inspection.


ComputeImageSharpness

ComputeImageSharpness computes a measure of the relative focus of an input image as part of an iterative process for refocusing an In-Sight vision system lens.

ComputeImageSharpness Overview

Called the image sharpness score, this measure indicates the degree to which the image, or a region of interest (ROI), includes the smallest resolvable features in a "scene" (that is, the object and its background as captured in the image).

Operation is simple - an image is acquired, and the ComputeImageSharpness tool obtains the image sharpness score. Then, the lens is refocused, nothing else is changed within the scene and a new image is acquired and scored. The higher the score, the sharper the focus. This process is repeated until the focus is acceptable to the user.

Note: A single image sharpness score conveys no useful information about the absolute sharpness of an image; it must be compared with another image sharpness score from the same, exact scene. The scenes must be identical.

ComputeImageSharpness Inputs

Syntax: ComputeImageSharpness(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Operation,Smoothness,Show)

Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

Operation

Gradient Energy: Computes image sharpness based on the energy in the local grey-level gradient of the image or the ROI. The local grey-level gradient represents the rate of change in greyscale values for a given area. An abrupt change in greyscale results in a large magnitude in the grey-level gradient and a higher image sharpness scare.

Smoothness

Specifies an image-smoothing operation to help eliminate high-frequency noise that might be present in the ROI. There are three settings:

0 = None (default) | No smoothing takes place; provides the fastest performance.
1 = Smoothing Level 1 | A degree of smoothing is applied to the ROI; eliminates very-high-frequency noise in the ROI.
2 = Smoothing Level 2 | A further degree of smoothing is applied to the ROI; eliminates high-frequency and very-high-frequency noise in the ROI.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The available graphics items will be hidden, except when the cell containing the ComputeImageSharpness function is highlighted in the spreadsheet.
1 = input graphics only | The graphics items associated with the input image region will be displayed at all times.

ComputeImageSharpness Outputs

Returns

An image sharpness score as a floating point value, or #ERR if any of the input parameters are invalid.

ComputeImageSharpness Example

In this example, the object in the input image is a Cognex vision system.

  1. Adjust the lens focus in Live Video mode, which is entered clicking the Live Video [image] button on the Job Display toolbar and exited either by pressing any key on the keyboard or by clicking the Live Video button again.
  2. After exiting Live Video mode, the insert the function into the In-Sight spreadsheet and defines the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image.
  3. Move and resize the box using the cursor, and click the OK [image] button on the Job Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the ROI.)

  4. Accept the default settings of the other parameters and click OK in the property sheet to complete the configuration for this example and apply the function to the input image.

    The two images below show a blurry image of the Cognex vision system and an Overlay view indicating that the image sharpness score is 3.317.

    After adjusting the focus on the lens in Live Video mode, the image is less blurry. Exit Live Video mode and view the new image sharpness score of 8.107:

    Because the image is still blurry, you will need to continue adjusting the focus in Live Video mode and comparing the image sharpness scores until the object is in sharp focus. If the focus remains inadequate, you might need to change the lens, the distance between the lens and the object or some other hardware parameter.


Filter

Produces a color or greyscale output image where every pixel is the result of an image-enhancement technique in the input image or ROI.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

A multipurpose function, Filter produces a color or greyscale output image that is used to enhance low contrast images and/or expose features in an image. This function helps to accentuate the desired features, and minimize the undesired features, for most parts. When used effectively, this function makes inspection applications more reliable and repeatable.

The Filter function offers a full range of both local and global image-enhancement techniques; the image-enhancement technique is defined by selecting a Filter Type. For more information, see When Image Processing Is Used?.

Use the Filter Function

Setting up the Filter function involves identifying the image-enhancement technique by selecting a Filter Type to be used to enhance the image.

To begin, first load an image. Insert the Filter function into the Spreadsheet, and adjust its Region to enclose the area of the image that will be enhanced. When configuring the Region, ensure that it does only encompasses areas of the image that need to be enhanced. Encompassing areas that do not require enhancement will affect both how the image-enhancement technique is applied, and the execution time of the function.

Next, select the appropriate Filter Type. Depending on the selected Filter Type, additional parameters will be enabled to further define how the technique is applied. Adjust the enabled parameters to achieve the desired image-enhancement effect.

Note:
  • If the area of the image that requires enhancement will exhibit motion, use a fixture to ensure the Region moves accordingly with the area. For more information, see Fixtures or Region.
  • Before beginning, collect a database of images of the inspection; the images may be loaded using the Record/Playback Options dialog.
  • After configuring the function, load additional images, and adjust parameters, as necessary, to ensure that the image-enhancement technique is being applied correctly across the entire range of images.

Filter Inputs

Syntax: Filter(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Filter Type,Kernel Rows,Kernel Columns,Auto Threshold,Threshold,Min,Max,Gain,Smoothness,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

 This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

Filter Type

Specifies the type of image-enhancement technique to perform; the result is displayed in a greyscale output image.

0 = Binarize (default)

Specifies a black-and-white ("binary") threshold operation that compares each input pixel with the threshold level to determine whether the output pixel is white or black. Input pixel values equal to or above the Threshold parameter value are white; values below the threshold are black.

Note: When a color input image is used, the output image will be a greyscale image.

1 = Bottom Hat

Specifies a "bottom hat" filtering operation that filters out everything except dark features that are smaller than the size of the kernel neighborhood. The result is an output image that displays these dark features as bright pixels on an otherwise dark background.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

2 = Clip

Specifies a "clipping" operation that eliminates the extreme ends of the greyscale spectrum so that the features in the output image are more uniform. This operation compares the greyscale value of each input pixel to the Min and Max parameter values:

  • If the input pixel value is equal to or exceeds the minimum or the maximum, the output pixel is assigned ("clipped" to) the minimum or maximum value, respectively.
  • If the input pixel value is within the minimum and maximum, the output pixel is assigned the value of the input pixel.

3 = Close

Specifies a "closing" operation that performs a dilation followed by an erosion to filter out dark features that are smaller than the size of the kernel neighborhood. Closing an image reduces or completely removes dark areas of the image.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

4 = Dilate

Specifies a "dilation" operation that enhances the bright features of the image while suppressing the darker features. The result is an output image with larger areas of bright pixels. Useful for removing dark specks.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

5 = Edge Magnitude

Specifies an operation that displays the difference between a dilation and an erosion of the input image. The result is an output image where edges are represented by bright pixels. Though similar to Gradient Full, this operation is more complex (and slower), allowing diagonally oriented edges to be represented.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

6 = Equalize

Specifies a histogram equalization operation that extracts the histogram of the input image and spreads out the most frequent greyscale values to create a more even distribution. The result is an output image with increased contrast. This type of filter is useful in environments where the lighting can vary slightly from one image to the next, or when some aspects of the object being inspected can slightly vary.

7 = Erode

Specifies an "erosion" operation that reduces the bright features of the image. The result is an output image with larger areas of dark pixels. Useful for removing light specks, noisy pixels and/or small defects.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

8 = Fill Dark Holes

Specifies a "pixel-filling" operation, where dark pixels surrounded by light pixels are converted to light pixels. The result is an output image where dark holes are filled.

9 = Fill Light Holes

Specifies a "pixel-filling" operation, where light pixels surrounded by dark pixels are converted to dark pixels. The result is an output image where light holes are filled.

10 = Gradient Full

Specifies a "vertical and horizontal gradient" operation that results in an output image where both vertically and horizontally oriented edges are represented by bright pixels. Though similar to Edge Magnitude, this operation is simpler (and faster) and does not represent diagonally oriented edges.

11 = Gradient Horizontal

Specifies a "horizontal gradient" operation that results in an output image where horizontally oriented edges are represented by bright pixels.

12 = Gradient Vertical

Specifies a "vertical gradient" operation that results in an output image where vertically oriented edges are represented by bright pixels.

13 = Greyscale Distance

Specifies the greyscale value of each output pixel as the difference between the greyscale value of each input pixel and the threshold level (for example, if the input pixel value is 100 and the threshold is 25, then the output pixel value will be 75), which is determined by the Threshold parameter.

14 = High Pass

Specifies a "high-pass" operation that results in an output image where edges are enhanced relative to areas with more consistent greyscale gradient. This type of filter is useful in accentuating fine features.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

15 = Invert

Specifies an inversion of pixel values based on the 256-step greyscale that results in an output image that is a "negative" of the input image (for example, inverting an input pixel value of 10 results in an output pixel value of 245).

17 = Local Median

Specifies an operation that computes the median pixel value of the pixel values in the kernel neighborhood, then uses this result as the output image pixel value.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

18 = Local Median Normalization

Specifies a means to subtract the background from an image; this operation subtracts the local median of the input image from the input image, shifts the result right by one, and then adds 128 to produce the output pixel value.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

19 = Low Pass

Specifies a "low-pass" operation that results in an output image in which edges are smoothed or blurred.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

20 = Max (Top Hat/Bottom Hat)

Specifies an operation that uses the maximum of Top Hat and Bottom Hat operations.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

21 = Open

Specifies an "opening" operation that performs an erosion followed by a dilation to filter out bright features that are smaller than the size of the kernel neighborhood. The result is an output image with slightly decreased overall brightness; removing small amounts of bright pixels and enhancing the remaining bright features.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

22 = Optical Density

Specifies an inversion of pixel values based on a Output pixel value = 100 * log (255) - 100 * log (input pixel value) logarithmic scale. The result is an output image that reveals the density of objects and features in the input image by measuring the amount of light that passes through them. Denser objects and features are represented by lighter pixels in the output image.

23 = Sharpen

Specifies a "sharpness" operation that is used to enhance edges. The operation evaluates the contrast between adjacent pixels, and increases the contrast when the contrast is high. A large contrast difference between adjacent pixels usually represents an edge; however, this operation should not be used to locate edges. The effects that the operation will have are dependent upon the image content and the resolution.

  • The Smoothness parameter is used to identify the edges by creating a Gaussian kernel.
  • The Gain parameter dictates the strength of the sharpening, instructing the filter to ignore a certain amount of difference between pixels when sharpening so that lightly textured areas will not be over-sharpened.

24 = Stretch

Specifies a greyscale stretching operation that linearly "scales up" or "stretches" the greyscale values (based on the Min and Max parameter settings) in the input image to the full 256-step greyscale, resulting in an output image with increased contrast. If the input pixel value is equal to or exceeds the minimum or maximum, the output pixel is assigned to 0 or 255, respectively. For input pixel values within the minimum and maximum, they will be linearly stretched to the 0 to 255 range. For example, if the Min is 50 and the Max is 180, the operation subtracts 50 from each pixel's intensity, making the range 0 to 130. Then each pixel intensity is multiplied by 255/130, creating the range of 0 to 255.

25 = Threshold Range

Specifies a black-and-white ("binary") threshold operation that compares each input pixel with two threshold values (Min and Max) to determine whether the output pixel is background or foreground. If the input pixel value is within the minimum and maximum, the output pixel retains its value, otherwise, the output pixel is set to the background level.

Note: If the minimum value is greater than the maximum value, the background is inverted.

26 = Top Hat

Specifies the "top hat" filtering operation, which filters out everything except bright features that are smaller than the size of the kernel neighborhood. The result is an output image that displays these bright features as bright pixels on an otherwise dark background.

Note: This operation enables the Kernel Rows and Kernel Columns parameters. The kernel must be constructed from odd integer values.

Kernel Rows

Specifies the number of rows of the kernel. A kernel is a rectangular array of numbers that defines the processing neighborhood for operations performed on each pixel location of an image. The greyscale values of a pixel's neighbors defines the greyscale value for that pixel location in the output image.

Filter Type | Parameter Range | Default Value
Bottom Hat, Close, Dilate, Edge Magnitude, Erode, High Pass, Local Median, Low Pass, Max (Top Hat/Bottom Hat), Open, and Top Hat. | 1 - 25 | 3
Local Median Normalization | 1 - 99 | 3
Note:
  • This parameter is enabled when the Filter Type is set to Bottom Hat, Close, Dilate, Edge Magnitude, Erode, High Pass, Local Median, Local Median Normalization, Low Pass, Max (Top Hat/Bottom Hat), Open, or Top Hat.
  • The kernel is unweighted.
  • The kernel must be constructed from odd integer values. A typical kernel is 3 x 3, but the size is arbitrary.

Kernel Columns

Specifies the number of columns of the kernel. A kernel is a rectangular array of numbers that defines the processing neighborhood for operations performed on each pixel location of an image. The greyscale values of a pixel's neighbors defines the greyscale value for that pixel location in the output image.

Filter Type | Parameter Range | Default Value
Bottom Hat, Close, Dilate, Edge Magnitude, Erode, High Pass, Local Median, Low Pass, Max (Top Hat/Bottom Hat), Open, and Top Hat. | 1 - 25 | 3
Local Median Normalization | 1 - 99 | 3
Note:
  • This parameter is enabled when the Filter Type is set to Bottom Hat, Close, Dilate, Edge Magnitude, Erode, High Pass, Local Median, Local Median Normalization, Low Pass, Max (Top Hat/Bottom Hat), Open, or Top Hat.
  • The kernel is unweighted.
  • The kernel must be constructed from odd integer values. A typical kernel is 3 x 3, but the size is arbitrary.

Auto Threshold

Specifies whether or not the function will automatically determine a threshold level when the Filter Type is set to Binarize, Greyscale Distance, or Threshold Range.

Note: This parameter is enabled by default. To use the Threshold parameter, disable this parameter.
  • When enabled, and the Filter Type is set to Binarize, the function automatically computes a threshold level based on the greyscale values within the specified region.
  • When enabled, and the Filter Type is set to Greyscale Distance, the function will automatically compute a threshold value based on the mean greyscale value within the specified region.
  • When enabled, and the Filter Type is set to Threshold Range, the following is automatically applied:
    • If the pixel values are less than the Min parameter setting, or the pixel values are greater than the Max parameter setting, the pixel values will be set to background.
    • If the pixel values are within the Min and Max parameter settings, the pixel values will be set to foreground.

Threshold

Specifies the threshold levels (0 to 255; default = 128) when the Filter Type is set to Binarize, Greyscale Distance, or Threshold Range.

Note:
  • The Auto Threshold parameter is enabled by default; disable it to enable this parameter.

Min

 Specifies the minimum greyscale value (0–255; default = 128) when the Filter Type is set to Clip, Stretch or Threshold Range.

Max

 Specifies the maximum greyscale value (0–255; default = 128) when the Filter Type is set to Clip, Stretch or Threshold Range.

Gain

 Specifies a gain value (0 to 10; default = 1) when the Filter Type is set to Sharpen. This parameter dictates the strength of the sharpening that will be performed by controlling the amount of edge contrast enhancement. Pixels around an edge are driven to their minimum or maximum values to create a sharper appearance of the edge.

Smoothness

Specifies the smoothness value (1 to 4; default = 1) for the Gaussian kernel when the Filter Type is set to Sharpen. Smoothness controls the standard deviation of the Gaussian kernel; higher smoothness values result in a wider "aperture" for the smoothing operation, helping to sharpen features.

Note: Gaussian refers to a bell-shaped curve that is applied as a weighted average to the pixels in the ROI.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input image region will be hidden, except when the cell containing the Filter function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

Filter Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

Note:
  • The contents of the processed image region in the Image data structure are not saved with the job.
  • For more information about the values returned by the function, see Image.


FindCircleDefects

FindCircleDefects converts each pixel within an annular (ring-like) region in an input image to black or white based on a user-set threshold, with white indicating non-circular or non-radial features. The user defines and positions the annulus over the image, and chooses whether the function calculates pixel gradient in either a circular or radial direction. Values equal to or exceeding the threshold level are displayed as white pixels in the black-and-white output image.

FindCircleDefects Inputs

Syntax: FindCircleDefects(Image,Fixture.Row,Fixture.Columm,Fixture.Theta,Annulus.X,Annulus.Y,Annulus.Inner Radius,Annulus.Outer Radius,Defect Type,Deviation,Accept Thresh,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Annulus

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an annular image region that can be translated and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
Inner Radius | The size of the inner radius.
Outer Radius | The size of the outer radius.
Note: The Fixture and Annulus parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.

Defect Type

Specifies the type of defect to which the function is sensitive: circular or radial. Pixels that vary in greyscale value from surrounding pixels indicate possible defects.

0 = Non-circular features (default) | Specifies calculating pixel gradient in the annulus in a circular direction to detect deviations from a circle.
1 = Non-radial features | Specifies calculating pixel gradient in the annulus in a radial direction to detect deviations from radial features.

Deviation

Specifies the degree of tolerance in the defect detection.

0 = Off (default) | Specifies that the object is circular and centered in the annulus; a less tolerant setting.
1 = On | Specifies that the object can be oval or off-centered in the annulus; a more tolerant setting.

Accept Thresh

Specifies the defect threshold, in greyscale value. (0–255; default = 30)

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The available graphics items will be hidden, except when the cell containing the FindCircleDefects function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The graphics items associated with the input image region will be displayed at all times.

FindCircleDefects Outputs

Returns | An Image data structure that stores the black-and-white ("binary") image, or #ERR if any of the input parameters are invalid.
Results | When FindCircleDefects is initially inserted into a cell, a result table is created in the spreadsheet.

FindCircleDefects Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Image.

DarkCount | GetDarkPixelCount(Image) | Returns the number of pixels below the defect threshold; the pixels are displayed as black.
BrightCount | GetBrightPixelCount(Image) | Returns the number of pixels equal to or above the defect threshold; the pixels are displayed as white.

Additional data elements can be accessed using the following Vision Data Access function:

Area

GetArea(Image)

Returns the area of the region.

FindCircleDefects Example

In this example, the synthetic circular (left) and radial (right) objects shown below are used to demonstrate FindCircleDefect's functionality. Both objects are medium-grey in color and feature thick, dark inner and outer borders.

After inserting the function into the In-Sight spreadsheet, the user defines the annulus by double-clicking on the word "Annulus" in the property sheet, which disappears to reveal the red annulus overlaid on the image. The user moves or resizes the annulus using the cursor, and clicks the OK [image] button on the Job Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the annulus.) Below are images of the objects with their annuli.

Selecting a defect type (non-circular or non-radial), choosing "On" or "Off" for the deviation tolerance, accepting the default settings of the other parameters and clicking OKin the property sheet completes the configuration for this example and applies the function to the input image.

Below are black-and-white output images of the circular object, with the function set to detect non-circulardefects, the Accept Thresh parameter at the default value of 30 and the deviation tolerance at "Off" (left) and "On" (right). Notice how much stricter the "Off" setting (left) is, marking pixels in the outer edge of the circular object as possible defects, even though they appear to be part of the smooth circular curve.

Below is a black-and-white output image of the same circular object with the function now set to detect non-radialdefects. The function marks the inner and outer edges of the outer border as possible radial defects.

Below are black-and-white output images of the radial object, with the function set to detect non-radialdefects, the Accept Thresh parameter at 70 and the deviation tolerance at "Off" (left) and "On" (right). Again, notice how much stricter the "Off" setting (left) is, marking the outer edges of the radial features as possible defects.

Below is a black-and-white output image of the same radial object with the tool now set to detect non-circulardefects. The function marks all radial features within the annulus as possible circular defects.

In a real-world application, the user would next reference another tool to the output image, so that a decision could be made regarding the results.

For more information, see Image.


GreyscaleDistance

Available for color In-Sight sensors and color-enabled emulators only, GreyscaleDistance converts each pixel of a color image or region of interest (ROI) to a greyscale value or to black and white based on a variety of user-set color parameters: color representation (red, green and blue, or hue, saturation and intensity) and user-entered values for RGB or HSI color and threshold. For more information, see Color Components of a Pixel. The greyscale image is derived from the Euclidean distance of the color of each pixel.

Closed More information on Euclidean distance

Each pixel is made up of three separate color components: RGB or HSI. GreyscaleDistance calculates each pixel's overall RGB or HSI value and finds its nearest greyscale match by using Euclidean distance. Euclidean distance, which is defined as the "ordinary" distance between two points that can be measured with a ruler, is what most people mean when they talk about "distance." The Euclidean distance is calculated by taking the square root of the sum of the squares of the differences of the color components of a pixel. The mathematical formula is:

Where:

x0 = The user-specified red/hue value in the Color section of the property sheet.

x1 = The actual red/hue value of an input pixel.

y0 = The user-specified green/saturation value in the Color section of the property sheet.

y1 = The actual green/saturation value of an input pixel.

z0 = The user-specified blue/intensity value in the Color section of the property sheet.

z1 = The actual blue/intensity value of an input pixel.

The D value can range from 0 to 442, with 0 representing an exact match and 442 indicating no match. Each D value is then divided by [image] 3, which is the square root of the number of components, and inverted to the greyscale spectrum, where 0 is black (no match) and 255 is white (exact match).

Note: Although similar to the ColorToGreyscaleFilter function, GreyscaleDistance provides users with more control and flexibility. One consequence is that "impure" colors (that is, those containing grey or white) will convert better with GreyscaleDistance than with ColorToGreyscaleFilter, which contains filters of only "pure" colors. Users might need to experiment with both to determine the best color-conversion function for their applications. For more information, see ColorToGreyscaleFilter.

GreyscaleDistance Inputs

GreyscaleDistance(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Color Representation,Color.Red/Hue,Color.Green/Saturation,Color.Blue/Intensity,Threshold.Red/Hue,Threshold.Green/Saturation,Threshold.Blue/Intensity,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid color Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Note: AcquireImage is the only function that returns a valid color Image data structure.

Fixture

Defines the ROI relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a fixture ensures that if the fixture is rotated or translated, the ROI will be rotated or translated in relation to the fixture.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | Specifies the row offset, in image coordinates.
Column | Specifies the column offset, in image coordinates.
Theta | Specifies the orientation, in image coordinates.

Region

Also known as the region of interest or ROI, specifies the region of the image that undergoes image processing; creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, clicking the Maximize Region button will automatically stretch the region to cover the entire image.
X | Specifies the x-offset of the origin, in fixture coordinates.
Y | Specifies the y-offset of the origin, in fixture coordinates.
High | Specifies the dimension along the region's x-axis.
Wide | Specifies the dimension along the region's y-axis.
Angle | Specifies the orientation, in fixture coordinates.

Color Representation

Specifies which color representation to use for the color conversion.

0 = RGB (default) | Red, Green, Blue
1 = HSI | Hue, Saturation, Intensity

Color

Specifies which color to use for the color conversion, depending on the color representation chosen. All three color values (and threshold levels) will affect the appearance of a pixel in the output image. For example, an RGB of 255-0-0 with all threethresholds set at -1 will display all "pure" red pixels as white in the output image, and all other colors as darker greyscale values, depending on their Euclidean distance from 255-0-0 (for example, white will appear dark).

Red/Hue | 0 - 255 (default = 0): Specifies the red/hue component of the color.
Green/Saturation | 0 - 255 (default = 0): Specifies the green/saturation component of the color.
Blue/Intensity | 0 - 255 (default = 0): Specifies the blue/intensity component of the color.

Threshold

Specifies black-and-white ("binary") thresholds for each color coordinate, depending on the color representation chosen.

Note:
  • The default is -1 for all three threshold values, which will produce a greyscale output image based on the Euclidean distance.
  • If any Threshold parameter is set to an integer greater than -1, then the output will be a black-and-white image based on the threshold value that is specified.
  • The Threshold parameter represents a "±" value: The thresholds are subtracted from and added to the color values specified in the Color section above, creating minimum and maximum thresholds for the RGB or HSI components. For example, if the user specifies RGB or HSI values of 200-100-50 and threshold values of 20-10-5, the maximum and minimum thresholds will be 220-110-55 and 180-90-45. Pixels with RGB or HSI values equal to or within the thresholds will display as white; those that are outside the thresholds will display as black.

Red/Hue
  • -1 = auto (default): Enables an automatic conversion routine based on the Euclidean distance.
  • 0 - 255: Directly specifies the binary threshold for the red/hue component of the color.

Green/Saturation
  • -1 = auto (default): Enables an automatic conversion routine based on the Euclidean distance.
  • 0 - 255: Directly specifies the binary threshold for the green/saturation component of the color.

Blue/Intensity
  • -1 = auto (default): Enables an automatic conversion routine based on the Euclidean distance.
  • 0 - 255: Directly specifies the binary threshold for the blue/intensity component of the color.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all | The input image region will be hidden, except when the cell containing the GreyscaleDistance function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

GreyscaleDistance Outputs

Returns | An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.
Results | When GreyscaleDistance is initially inserted into a cell, a result table is created in the spreadsheet.

GreyscaleDistance Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table.

DarkCount | GetDarkPixelCount(Image) | The number of pixels below the binary threshold level.
BrightCount | GetBrightPixelCount(Image) | The number of pixels equal to or above the binary threshold level.
Note: If all three threshold values are set to -1 (default), the two preceding functions will return #ERR.

GreyscaleDistance Example

In this example, the object in the input image is a yellow Cognex vision system. Random samplings of the image (achieved by toggling off the Overlay view by clicking Overlay on the View menu, moving the cursor over the sensor and viewing the RGB information in the status bar in the bottom-left corner of the window) reveal RGB values of 205-185-124, 193-177-110, 175-154-39, 133-104-2 and 115-91-6 for the sensor.

This example uses a simple configuration of GreyscaleDistance that produces a greyscale output image.

After inserting the function into the In-Sight spreadsheet, the user defines the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image. The user moves or resizes the box using the cursor, and clicks the OK [image] button on the Job Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the ROI.)

Selecting RGB as the color representation, entering 205-185-124 in the RGB fields in the Color section of the property sheet, accepting the default settings of the other parameters and clicking OK in the property sheet completes the configuration for this example and applies the function to the input image.

Below is the output image produced by GreyscaleDistance. Because the RGB values of 205-185-124 are an exact match of some areas of the sensor, the sensor is represented by very bright pixels.

Compare the image above with the image below, which was produced by using the red filter in ColorToGreyscaleFilter. Although the sensor is bright in the below image, it lacks the increased contrast of the above image.


ImageMath

A multipurpose function, ImageMath produces a greyscale or black-and-white output image where every pixel is the result of an arithmetic operation—for example, addition, subtraction or averaging—performed between two input images. For more information, see Image.

Note:
  • From In-Sight firmware 5.2.0 and later, the function's algorithm has been changed to use a newer algorithm. Due to this change, the Display Row and Display Column parameters have been added to this function, and the Results Alignment parameter, the Advanced Options parameters and the AND, OR and XOR options (Operation parameter) have been removed from this function.
  • When loading a job containing an ImageMath function configured on the In-Sight firmware 5.1.x or earlier to an In-Sight vision system running firmware version 5.2.0 or later, the Result Alignment parameter and the Advanced Options parameters are automatically removed from the function, and the Display Row parameter and the Display Column parameters are set to the default value (0, 0). If the ImageMath function is configured to use AND, OR or XOR options, the function will return #ERR.
  • When attempting to load a job containing an ImageMath function configured on the In-Sight firmware 5.2.0 or later to an In-Sight vision system running firmware version 5.1.x or earlier, an error message will be displayed and the job load will fail.
  • The ImageMath function configured on the In-Sight firmware 5.1.x or earlier can pass calibration through to any subsequent tools if Image 1 Origin or Image 2 Origin is selected as the Results Alignment option (if Sensor Origin is selected, the results will be in pixels). For more information, see Calibrate Functions. However, the ImageMath function configured on the In-Sight firmware 5.2.0 or later cannot pass through calibration. To convert pixel measurements into real-world coordinates, you have a couple of options.
    • Use the Transform function for the tool (e.g. TransBlobsToWorld). For more information, see TransBlobsToWorld.
    • Pass the ImageMath function through a CalibrateImage function with the desired calibration, and then use the CalibrateImage as an input to the subsequent tools. For more information, see CalibrateImage.

ImageMath Inputs (In-Sight 5.2.0 or Later)

Syntax: ImageMath(Image 1,Image 2,Operation,Display Row,Display Column,Show)

Parameter Description

Image 1

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Image 2

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Operation

Specifies the image-processing operation that will produce a greyscale or black-and-white output image.

0 = Difference (default)

Absolute value of Image 1 – Image 2. This parameter calculates the difference in greyscale values between Image 1 and Image 2; order of images is irrelevant.

Image 1 | Image 2 | Output Image

1 = Subtract

Image 1 – Image 2. This parameter subtracts the greyscale values of Image 2 from those of Image 1; order of images is relevant.

Image 1 | Image 2 | Output Image

2 = Add

Image 1 + Image 2. This parameter adds the greyscale values of Image 1 and Image 2.

Image 1 | Image 2 | Output Image

3 = Max

Maximum value of Image 1 vs. Image 2. This parameter compares Image 1 and Image 2, and selects the pixel with the highest greyscale value.

4 = Min

Minimum value of Image 1 vs. Image 2. This parameter compares Image 1 and Image 2, and selects the pixel with the lowest greyscale value.

5 = Average

Average value between Image 1 and Image 2. This parameter adds the greyscale values of Image 1 and Image 2, and divides by two.

Display Row

Specifies the Row coordinate (default = 0) where the output image will be displayed, relative to the upper left-hand corner.

Display Column

Specifies the Column coordinate (default = 0) where the output image will be displayed, relative to the upper left-hand corner.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The available graphics items will be hidden, except when the cell containing the ImageMath function is highlighted in the spreadsheet.
1 = results graphics only | The processed image will be displayed at all times.

ImageMath Inputs (In-Sight 5.1.x or Earlier)

Syntax: ImageMath(Image 1,Image 2,Operation,Results Alignment,Advanced Options.Divisor,Advanced Options.Greyscale Offset,Show)

Parameter Description

Image 1

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Image 2

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Operation

Specifies the image-processing operation that will produce a greyscale or black-and-white output image.

0 = Difference (default) | Absolute value of Image 1 – Image 2. This parameter calculates the difference in greyscale values between Image 1 and Image 2; order of images is irrelevant.
1 = Subtract | Image 1 – Image 2. This parameter subtracts the greyscale values of Image 2 from those of Image 1; order of images is relevant.
2 = Add | Image 1 + Image 2. This parameter adds the greyscale values of Image 1 and Image 2.
3 = Max | Maximum value of Image 1 vs. Image 2. This parameter compares Image 1 and Image 2, and selects the pixel with the highest greyscale value.
4 = Min | Minimum value of Image 1 vs. Image 2. This parameter compares Image 1 and Image 2, and selects the pixel with the lowest greyscale value.
5 = Average | Average value between Image 1 and Image 2. This parameter adds the greyscale values of Image 1 and Image 2, and divides by two.
6 = AND | Compares Image 1 and Image 2, and produces a black-and-white image based on the logical "AND" operation. The output pixel is white if both input pixel values are greater than 0, and black if either pixel value is equal to 0.
7 = OR | Compares Image 1 and Image 2, and produces a black-and-white image based on the logical "OR" operation. The output pixel is white if either input pixel value is greater than 0, and black if neither pixel value is greater than 0.
8 = XOR | Compares Image 1 and Image 2, and produces a black-and-white image based on the logical "exclusive OR" operation. The output pixel is white if one input pixel value is greater than 0 and the other is equal to 0, and black if both pixel values are greater than 0 or both are equal to 0.

Results Alignment

Specifies the location of the output image after it has undergone the image-processing operation.

0 = Image 1 Origin (default) | Specifies Image 1 as the origin location of the output image; the resulting image overlays Image 1.
1 = Image 2 Origin | Specifies Image 2 as the origin location of the output image; the resulting image overlays Image 2.
2 = Sensor Origin | Specifies Row 0, Column 0 of AcquireImage as the origin location of the output image; the resulting image is placed in the top-left corner of the image.

Advanced Options

Specifies the additional mathematical modifications that can be applied to a greyscale output image. The order of operation is (1) divide and (2) offset.

Divisor | Specifies the value to divide into each output pixel's greyscale value. (default = 1) This changes the intensity of the pixel values, and can be used to "scale down" pixel values that exceed 255.
Greyscale Offset | Specifies an offset value to apply to each output pixel's greyscale value. (default = 0) Negative and positive offsets decrease and increase, respectively, the brightness of the output.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The available graphics items will be hidden, except when the cell containing the ImageMath function is highlighted in the spreadsheet.
1 = results graphics only | The processed image will be displayed at all times.

ImageMath Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

ImageMath Example

In this example, the goal is to produce an output file of only the holes in a gasket. Later, the holes will be referenced by another tool so that decisions can be made regarding the holes.

For Image 1, the user acquires an image of the complete gasket (below).

The user would like Image 2 to be a copy of Image 1, but with all the white holes filled. To produce this, the user inserts the Filter function into the spreadsheet and, in the property sheet, maximizes the ROI by selecting the word "Region" and clicking the Maximize Region [image] button in the property sheet's toolbar. Maximizing the ROI ensures that the ROIs of Image 1 and Images 2 are the same size. For more information, see Filter.

Selecting "Fill Light Holes" from the Operation pull-down menu, accepting the default settings of the other parameters and clicking OK in the Filter property sheet completes the configuration for this example and applies the function to the input image (see result, below).

The user then inserts the ImageMath function into the spreadsheet and, in the property sheet, accepts A0 as Image 1. Now, the Filter output image must be referenced as the source for Image 2. The user double-clicks on the words "Image 2" in the property sheet, which disappears to reveal the In-Sight spreadsheet. The user clicks on the Image data structure returned by Filter and clicks the OK [image] button on the Job Edit toolbar to confirm the selection and return to the ImageMath property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking on the Image data structure.)

Selecting "Differences" from the Operation pull-down menu, accepting the default settings of the other parameters and clicking OK in the ImageMath property sheet completes the configuration for this example and applies the function to the input image.

The result is an output image of only the holes in the gasket (below).


LineScanDistortion

Corrects for lens distortion based on the output of a TrainLineScanDistortion function, for use with In-Sight 5604 and In-Sight 9902L line scan vision systems. LineScanDistortion, referencing the calculation of a TrainLineScanDistortion function, outputs an Image data structure that corrects for lens distortion on line scan vision systems. The output Image data structure can be referenced by other In-Sight Vision Tools. For more information, see TrainLineScanDistortion, Structures, or Vision Tools.

LineScanDistortion Inputs

Syntax: LineScanDistortion(Image,Trained Distortion,Show)

Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Trained Distortion

This argument must reference a spreadsheet cell that contains a valid TrainLineScanDistortion data structure.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all | The input image region will be hidden, except when the cell containing the LineScanDistortion function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

LineScanDistortion Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.


NeighborFilter

A multipurpose function, NeighborFilter produces a greyscale output image where every pixel is the result of a "local" image-enhancement technique - for example, shrinking, expanding, filling, smoothing or edge enhancement - applied to a set of adjacent pixels ("neighbors") in the input image or region of interest (ROI). The set of pixels is called the "processing neighborhood" and is rectangular in shape, with its height and width defined by the Number of Rows and Number of Columns parameters, respectively. Many of the NeighborFilter operations process (or morph) features in the processing neighborhood based on characteristics of their shape.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • In-Sight vision systems running In-Sight firmware 5.1.0 and later have had this function consolidated into the Filter function. For more information, see Filter.
  • If attempting to load a job containing the PointFilter or NeighborFilter functions to an In-Sight vision system running In-Sight 5.1.x firmware, and the function is password-protected using the Format Cells dialog’s Protection tab, the job load will fail. Load the job to an In-Sight vision system running In-Sight firmware 4.x.x and modify the job. For more information on accessing or removing password-protected cells, see Licensing.

NeighborFilter Inputs

Syntax: NeighborFilter(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Operation,Number of Rows,Number of Columns,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

Operation

Specifies the operation to perform on the processing neighborhood; the result is displayed in a greyscale output image. Some of the operations enhance edges, which are areas in an image where pixel greyscale values change sharply.

0 = Bot Hat

Specifies the "bottom hat" filtering operation, which filters out everything except dark features that are smaller than the size of the processing neighborhood. The result is an output image that displays these dark features as bright pixels on an otherwise dark background.

1 = Close

Specifies a "closing" operation, which performs a dilation followed by an erosion to filter out dark features that are smaller than the size of the processing neighborhood. The result is an output image with slightly increased overall brightness.

9 = Convolution

Specifies a "convolution" operation, which changes the values of individual pixels based on the values of surrounding pixels. This parameter is designed to be highly flexible, allowing users to produce a variety of results (a custom low-pass filter, a custom dilation operation and so forth).

Note: The Kernel button opens the Convolution Kernel dialog, which allows the user to specify the weight of each pixel value in the processing neighborhood.

2 = Dilate

Specifies a "dilation" operation, which increases bright features and shrinks dark features. The result is an output image with larger areas of bright pixels. Useful for removing dark specks.

3 = Edge Magnitude

Specifies an operation that displays the difference between a dilation and an erosion of the input image. The result is an output image where edges are represented by bright pixels. Though similar to Gradient Full, this operation is more complex (and slower), allowing diagonally oriented edges to be represented.

4 = Erode

Specifies an "erosion" operation, which shrinks bright features and increases dark features. The result is an output image with larger areas of dark pixels. Useful for removing light specks.

14 = Fill Dark Holes

Specifies a "pixel-filling" operation, where dark pixels surrounded by light pixels are converted to light pixels. The result is an output image where dark holes are filled.

13 = Fill Light Holes

Specifies a "pixel-filling" operation, where light pixels surrounded by dark pixels are converted to dark pixels. The result is an output image where light holes are filled.

10 = Gradient Vertical

Specifies a "vertical gradient" operation, which results in an output image where vertically oriented edges are represented by bright pixels.

11 = Gradient Horizontal

Specifies a "horizontal gradient" operation, which results in an output image where horizontally oriented edges are represented by bright pixels.

12 = Gradient Full

Specifies a "vertical and horizontal gradient" operation, which results in an output image where both vertically and horizontally oriented edges are represented by bright pixels. Though similar to Edge Magnitude, this operation is simpler (and faster) and does not represent diagonally oriented edges.

5 = High Pass

Specifies a "high-pass" operation, which results in an output image where edges are enhanced relative to areas with more consistent greyscale gradient.

6 = Low Pass (default)

Specifies a "low-pass" operation, which results in an output image where edges are "smoothed" or blurred.

7 = Open

Specifies an "opening" operation, which performs an erosion followed by a dilation to filter out bright features that are smaller than the size of the processing neighborhood. The result is an output image with slightly decreased overall brightness.

8 = Top Hat

Specifies the "top hat" filtering operation, which filters out everything except bright features that are smaller than the size of the processing neighborhood. The result is an output image that displays these bright features as bright pixels on an otherwise dark background.

Number of Rows

Specifies the height (1–25; default = 3) of the processing neighborhood.

Note: When Convolution is selected as the Operation, Number of Rows is used to define the height of the kernel, in pixels.

Number of Columns

Specifies the width (1–25; default = 3) of the processing neighborhood.

Note: When Convolution is selected as the Operation, Number of Columns is used to define the width of the kernel, in pixels.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input image region will be hidden, except when the cell containing the NeighborFilter function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

NeighborFilter Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

Note: The contents of the processed image region in the Image data structure are not saved with the job.

NeighborFilter Example

In this example, the goal is to use the Dilate operation of NeighborFilter to remove black specks surrounding a sequence of five numbers in the input image (below).

After inserting NeighborFilter into the spreadsheet, the user defines the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image. The user moves or resizes the box using the cursor, and clicks the OK [image] button on the Job Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the ROI.)

Selecting "Dilate" from the Operation pull-down menu, accepting the default settings of the other parameters and clicking OK in the property sheet completes the configuration for this example and applies the function to the input image.

In the two images below, both the original input image and the new output image are referenced by the OCV/OCR tool, which "verifies" the numbers and displays a score for each number that indicates its confidence in the result. For more information, see OCV/OCR.

In the original input image (no dilation), the maximum OCV/OCR score is 100.000 (for the number "2") and the minimum is 82.154 (for the number "1"). The number "1" is below OCV's default Accept Threshold of 90, and the text string fails the verification.

In the new output image (dilation applied), many of the black specks are removed from around the numbers and the numbers are easier to read. The maximum OCV/OCR score is 100.000 (for the number "8"), and the minimum is 91.518 (for the number "9"). All of the numbers are above OCV's default threshold of 90, and the text string passes the verification.

If the numbers are too thin, an "Erode" operation can be applied to shrink bright features and increase dark features.

For more information, see Image.


PointFilter

A multipurpose function, PointFilter produces a black-and-white or greyscale output image where every pixel is the result of a "global" image-enhancement technique - for example, thresholding, inversion, histogram equalization or greyscale stretching or clipping - applied to each pixel in the input image or region of interest (ROI).

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • In-Sight vision systems running In-Sight firmware 5.1.0 and later have had this function consolidated into the Filter function. For more information, see Filter.
  • If attempting to load a job containing the PointFilter or NeighborFilter functions to an In-Sight vision system running In-Sight 5.1.x firmware, and the function is password-protected using the Format Cells dialog’s Protection tab, the job load will fail. Load the job to an In-Sight vision system running In-Sight firmware 4.x.x and modify the job. For more information on accessing or removing password-protected cells, see Licensing.

PointFilter Inputs

Syntax: PointFilter(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Operation,Minimum,Maximum,Threshold,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Fixture

Defines the ROI relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a fixture ensures that if the fixture is rotated or translated, the ROI will be rotated or translated in relation to the fixture.

Note: The default setting is (0,0,0), the top leftmost corner of the image. For more information, see Fixture or Vision Tools.
Row | Specifies the row offset, in image coordinates.
Column | Specifies the column offset, in image coordinates.
Theta | Specifies the orientation, in image coordinates.

Region

Also known as the region of interest or ROI, specifies the region of the image that undergoes image processing; creates a rectangular image region that can be transformed and rotated. With this parameter selected, clicking the Maximize Region button will automatically stretch the region to cover the entire image.

X | Specifies the x-offset of the origin, in fixture coordinates.
Y | Specifies the y-offset of the origin, in fixture coordinates.
High | Specifies the dimension along the region's x-axis.
Wide | Specifies the dimension along the region's y-axis.
Angle | Specifies the orientation, in fixture coordinates.

Operation

Specifies the "pixel-by-pixel" image-processing operation that will produce a greyscale or black-and-white output image.

Note: Parameters not applicable to the selected operation are dimmed or "greyed-out."

0 = Binarize (default)

Specifies a black-and-white ("binary") threshold operation that compares each input pixel with the threshold level to determine whether the output pixel is white or black. Input pixel values equal to or above the threshold value are white; values below the threshold are black.

1 = Clip

Specifies a "clipping" operation, which eliminates the extreme ends of the greyscale spectrum so that the features in the output image are more uniform. This operation compares the greyscale value of each input pixel to a minimum and a maximum:

  • If the input pixel value is equal to or exceeds the minimum or the maximum, the output pixel is assigned ("clipped" to) the minimum or maximum value, respectively.
  • If the input pixel value is within the minimum and maximum, the output pixel is assigned the value of the input pixel.

2 = Equalize

Specifies a histogram equalization operation, which extracts the histogram of the input image and spreads out the most frequent greyscale values to create a more even distribution. The result is an output image with increased contrast.

7 = Greyscale Distance

Specifies the greyscale value of each output pixel as the difference between the greyscale value of each input pixel and the threshold level (for example, if the input pixel value is 100 and the threshold is 25, then the output pixel value will be 75).

4 = Invert

Specifies an inversion of pixel values based on the 256-step greyscale (for example, inverting an input pixel value of 10 results in an output pixel value of 245). The result is an output image that is a "negative" of the input image.

6 = Threshold Range

Specifies a black-and-white ("binary") threshold operation that compares each input pixel with two threshold values (minimum and maximum) to determine whether the output pixel is white or black:

  • If the input pixel value is equal to or exceeds the minimum or the maximum, the output pixel is white.
  • If the input pixel value is within the minimum and maximum, the output pixel is black.

5 = Optical Density

Specifies an inversion of pixel values based on a Output pixel value = 100 * log (255) - 100 * log (input pixel value) logarithmic scale. The result is an output image that reveals the density of objects and features in the input image by measuring the amount of light that passes through them. Denser objects and features are represented by lighter pixels in the output image.

3 = Stretch

Specifies a stretching operation. This operation linearly "scales up" or "stretches" the greyscale values in the input image to the full 256-step greyscale. The result is an output image with increased contrast.

Minimum

Specifies the minimum greyscale value (0–255; default = 0) for the Clip and Threshold Range operations.

Maximum

Specifies the maximum greyscale value (0–255; default = 255) for the Clip and Threshold Range operations.

Threshold

Specifies the threshold levels for the Binarize and Greyscale Distance operations.

-1 (default) | Automatically computes a threshold level based on the greyscale values within the specified region.
0–255 | Directly specifies the threshold, from 0 to 255.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input image region will be hidden, except when the cell containing the PointFilter function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

PointFilter Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

PointFilter Example

In this example, various filters from PointFilter are applied to enhance the input image of a container of dental floss (below).

After inserting PointFilter into the spreadsheet, the user defines the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image. The user moves or resizes the box using the cursor, and clicks the OK [image] button on the Job Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the ROI.)

Selecting a filter from the Operation pull-down menu, accepting the default settings of the other parameters and clicking OK in the property sheet completes the configuration for this example and applies the function to the input image.

Below is the output image produced by the Binarize operation. All input pixel values equal to or above the user-set threshold are displayed as white; all values below the threshold are black.

Below is the output image produced by the Clip operation. The minimum and maximum values are set at 40 and 125, respectively. Compared with the input image, the output image below displays slightly decreased contrast, while still differentiating the object from its background. This operation is useful if glare or bright areas in the image make it difficult to extract the desired data.

Below is the output image produced by the Stretch operation, which is the opposite of the Clip operation. The minimum and maximum are scaled to the full greyscale range, with values of 0 and 255, respectively. As a result, the output image displays greater contrast than the input image.

For more information, see Property Sheet, Image, or Image.


ScaleImage

ScaleImage resamples the pixels in an input image or region of interest (ROI) to produce a reduced, enlarged, unrotated or unbent version of the image. The function displays the resampled image in the upper-left corner of the In-Sight spreadsheet.

ScaleImage Inputs

Syntax: ScaleImage(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Sample Type,Sample Ratio.X Ratio,Sample Ratio.Y Ratio,Display Row,Display Column,Show)

Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Sample Type

Specifies the pixel-resampling technique.

0 = Interpolate Points (default)

Specifies using a weighted average value of the pixel region to resample the image.

Sample Ratio

Specifies the sample ratio in the (X,Y) direction of the region.

Note: Values between 100 and 1000 specify upsampling. For example, if both the ratios are specified as 200, the resampled image will be twice as large as the specified Region.
X Ratio | Specifies the ratio (10–1000; default = 50) in the X direction of the region.
Y Ratio | Specifies the ratio (10–1000; default = 50) in the Y direction of the region.

Display Row

Specifies the Row coordinate (default = 0) where the rescaled image will be displayed, relative to the upper left-hand corner.

Note:
  • Specifying a value of -1 will ensure that the function places the scaled image at the same row coordinate as the input image:
    • For acquired images, the Start Row specified in the AcquireImage function will be used. Therefore, if a ScaleImage function is configured with a Display Row and Display Column parameter settings of 0,0, and the image was a partial acquisition, the ScaleImage function would display its output above the acquired image. For more information, see AcquireImage.
    • For images output by other Vision Tools, such as an Image tool like the PointFilter function, the row coordinate that defines the input image will be used. For example, if the PointFilter function is defined at the Col/Row coordinates of 100,100, the referencing ScaleImage function with the -1 parameter setting would display at the Row coordinate of 100. For more information, see PointFilter.
  • For jobs created between firmware release 4.7.1 through 4.8.4 that contain a ScaleImage function, the Display Row value will be automatically set to -1 when loaded on an In-Sight vision system and/or emulator running 4.9.0 firmware. For jobs created prior to 4.7.1, the Display Row value will be automatically set to 0.

Display Column

Specifies the Column coordinate (default = 0) where the rescaled image will be displayed, relative to the upper left-hand corner.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input region boundary and resampled image will be hidden, except when the cell containing the ScaleImage function is highlighted in the spreadsheet.
1 = result graphics only | The resampled image will be displayed at all times.
2 = input graphics only | The input region boundary will be displayed at all times.

ScaleImage Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

ScaleImage Example

In this example, the object in the input image is a bottle. The purpose of this example is to scale the size of the bottle to 50%.

After inserting the function into the In-Sight spreadsheet, the user defines the ROI by double-clicking on the word "Region" in the property sheet, which disappears to reveal the red ROI box overlaid on the image. The user moves or resizes the box using the cursor, and clicks the OK [image] button on the Job Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the ROI.)

Typing "50" in both the X Scale and Y Scale fields, accepting the default settings of the other parameters and clicking OK in the property sheet completes the configuration for this example and applies the function to the input image.

Below is a 50% scaled image of the bottle.

The user can also use ScaleImage to "unbend" or "unrotate" objects, which can make it easier to reference other tools to the processed output image. In this example, the object is a slightly curved segment, which is shown with the Overlay removed (achieved by clicking Overlay on the View menu). The segment will also be scaled to 50% in size, so that both the input image and output image can easily fit in the same view.

After inserting the function, defining the ROI and specifying "50" in both the X Scale and Y Scale fields in the property sheet (described earlier in the bottle example), the user incrementally changes the values in the Angle and Curve fields under the Region parameter until the object is straight. Accepting the default settings of the other parameters and clicking OK in the property sheet completes the configuration for this example and applies the function to the input image. Below is an image of the bent object in the middle and the smaller and "unbent" version in the upper-left corner.

In this example, an angle of 17.390 and a curve of -36.389 were needed to straighten the curved segment.


ScaleColorImage

ScaleColorImage resamples the pixels in an input image or region of interest (ROI) to produce a reduced, enlarged, unrotated or unbent version of a color image. The function displays the resampled image in the upper-left corner of the In-Sight spreadsheet.

ScaleColorImage Inputs

Syntax: ScaleColorImage(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Sample Type,Sample Ratio.X Ratio,Sample Ratio.Y,Display Row,Display Column,Show)

Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Sample Type

Specifies the pixel-resampling technique.

0 = Interpolate Points (default)

Specifies using a weighted average value of the pixel region to resample the image.

Sample Ratio

Specifies the sample ratio in the (X,Y) direction of the region.

Note: Values between 100 and 1000 specify upsampling. For example, if both the ratios are specified as 200, the resampled image will be twice as large as the specified Region.
X Ratio | Specifies the ratio (10–1000; default = 50) in the X direction of the region.
Y Ratio | Specifies the ratio (10–1000; default = 50) in the Y direction of the region.

Display Row

 Specifies the Row coordinate (default = 0) where the rescaled image will be displayed, relative to the upper left-hand corner.
Note: Specifying a value of -1 will ensure that the function places the scaled image at the same row coordinate as the input image:
  • For acquired images, the Start Row specified in the AcquireImage function will be used. Therefore, if a ScaleColorImage function is configured with a Display Row and Display Column parameter settings of 0,0, and the image was a partial acquisition, the ScaleColorImage function would display its output above the acquired image. For more information, see AcquireImage.
  • For images output by other Vision Tools, such as a Color tool like the ExtractColor function, the row coordinate that defines the input image will be used. For example, if the ExtractColor function is defined at the Col/Row coordinates of 100,100, the referencing ScaleColorImage function with the -1 parameter setting would display at the Row coordinate of 100. For more information, see ExtractColor.

Display Column

 Specifies the Column coordinate (default = 0) where the rescaled image will be displayed, relative to the upper left-hand corner.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input region boundary and resampled image will be hidden, except when the cell containing the ScaleColorImage function is highlighted in the spreadsheet.
1 = result graphics only | The resampled image will be displayed at all times.
2 = input graphics only | The input region boundary will be displayed at all times.

ScaleColorImageOutputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.


SceneCorrection

The SceneCorrection function helps to correct images that contain uneven lighting or shading, to produce an output image that appears to contain uniform lighting. The function produces a greyscale output image where every pixel is the result of a "local" image-enhancement technique - "mean intensity"- applied to a set of adjacent pixels ("neighbors") within the region of interest (ROI). The set of pixels is called the "processing neighborhood" and is rectangular in shape, with its height and width defined by the Number of Rows and Number of Columns parameters, respectively.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • For In-Sight vision systems running In-Sight firmware 5.1.0 and later, this function is consolidated into the Filter function (High Pass Filter Type). For more information, see Filter.

SceneCorrection Inputs

Syntax: SceneCorrection(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Operation,Number of Rows,Number of Columns,Timeout,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

Operation

Specifies the operation to perform on the processing neighborhood; the result is displayed in a greyscale output image.

0 = Mean Intensity

Specifies a "mean intensity" operation, which results in a greyscale averaging of the image. This filter simulates removing uneven lighting or shading from an image by comparing each pixel's intensity value to the average intensity of the pixels within the processing neighborhood. Areas of the image that show little or no variation will be rendered a neutral grey, regardless of the original intensity. Pixels that are darker than their surrounding pixels will be shaded darker than the neutral grey, according to how much darker they are than their surroundings. Similarly, pixels that are lighter than their surrounding pixels will be shaded lighter than the neutral grey. Edges and sharp transitions will be preserved, similar to a "high-pass" operation.

Number of Rows

Specifies the height (1–Max Image Height; default = 11) of the processing neighborhood. This value must be set as an odd number.

Note:
  • The processing neighborhood must be constructed of odd numbers, e.g. Number of Rows = 13 and Number of Columns = 13, or Number or Rows = 15 and Number of Columns = 21, etc. Even numbers may not be entered and will automatically be rejected.
  • The maximum height is the maximum height of the In-Sight vision system's image area (e.g. 480 pixels for a vision system with a 640 x 480 resolution).

Number of Columns

Specifies the width (1–Max Image Width; default = 11) of the processing neighborhood. This value must be set as an odd number.

Note:
  • The processing neighborhood must be constructed of odd numbers, e.g. Number of Rows = 13 and Number of Columns = 13, or Number or Rows = 15 and Number of Columns = 21, etc. Even numbers may not be entered and will automatically be rejected.
  • The maximum width is the maximum width of the In-Sight vision system's image area (e.g. 640 pixels for a vision system with a 640 x 480 resolution).

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 0), that the function will attempt to calculate the correct filter before execution is halted and an #ERR is returned. Set the parameter to 0 to specify no timeout.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input image region will be hidden, except when the cell containing the SceneCorrection function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input graphics only | The input image region will be displayed at all times.

SceneCorrection Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

Note: The contents of the processed image region in the Image data structure are not saved with the job.


SurfaceFX

The SurfaceFX function performs feature enhancement, utilizing lighting to create a high contrast image which enhances three dimensional features on an object, for feature extraction and inspection by other Vision Tools.

The function removes noise and/or clutter from the surface's background, isolating surface features that are engraved, embossed, stamped, etched, recessed or raised, as well as defects (such as chips, dents, wrinkles, punctures and tears). Once a contrast image is generated, other Vision Tools (such as OCRMax, TrainPatMaxRedLine and FindPatMaxRedLine, DetectBlobs, SurfaceFlaw and InspectEdge) can be used for inspections and defect detection.

The SurfaceFX algorithm requires four images to be acquired, in sequence, from four individual, low angular (less than 45°) light sources. The light sources should be spaced evenly around the circumference of a circle, with the object placed under the center of the lights. During the acquisition phase, the object should remain stationary, and the lighting and image acquisition sequence must be clockwise; starting from the right quadrant of the object, followed by the bottom quadrant, then the left quadrant, and finally the top quadrant.

The algorithm will then produce a surface irregularity image, with the raised features displayed in white, and indented features displayed in black.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 5.4.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

SurfaceFX Inputs

Syntax: SurfaceFX(Right,Bottom,Left,Top,Sigma,Brightness,Contrast,Show)

Right, Bottom, Left, Top

These arguments must reference a spreadsheet cell that contains a valid Image or LatchImage data structure, with low angular (less than 45°) lighting from the right, bottom, left or top of the object.

  • Right = Input Image or LatchImage data structure 0, with illumination from the right (towards decreasing X)
  • Bottom = Input Image or LatchImage data structure 1, with illumination from below (towards decreasing Y)
  • Left = Input Image or LatchImage data structure 2, with illumination from the left (towards increasing X)
  • Top = Input Image or LatchImage data structure 3, with illumination from above (towards increasing Y)
Note:
  • The SurfaceFX function operates on the entire input Image data structure, whether that is an image acquired by an In-Sight camera, or an Image data structure output by another Vision Tool. Therefore, all of the input Image data structures must have the same size. Otherwise, the tool will report #ERR. For example, if each of the acquired images was processed by a Filter function, (which outputs an Image data structure) before being passed into the Surface FX function, the SurfaceFX function will use the area of the acquired image defined by the Filter function's Region parameter, and all of the Filter function's Region parameters must be set to the same dimensions and angle.
  • If using an Image data structure that is output by another Vision Tool, the function providing the Image data structure must have a rectangular image region, without curvature, and cannot use an External Region or an EditCompositeRegion. Also, the defined Region cannot undergo any curvature, or the SurfaceFX function will result in a #ERR.
  • The input Image data structures may be rotated, but the rotation of each input must be the same. Otherwise, the function will report #ERR.
  • The input Image data structures should have the same location and/or offset, but they may exhibit slight lateral movement. However, an excessive amount of lateral movement will result in a poor surface irregularity output image.
  • All four input Image data structures must be present, or the function will report #ERR.

Sigma

Specifies the smoothness value (0–10; default = 1) to help eliminate high-frequency noise in the output image.

Brightness

Specifies the average intensity (0–255; default = 128) of the background in the output image.

Contrast

Specifies the intensity difference (0–100; default = 10) between surface features and the background pixels in the output image.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The available graphics items will be hidden, except when the cell containing the SurfaceFX function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.

SurfaceFX Outputs

Returns

An Image data structure containing the processed surface irregularity image, or #ERR if any of the input parameters are invalid.

SurfaceFX Example

In this example, the goal is to use the SurfaceFX function to generate an output image with enhanced surface features that will be passed to a SurfaceFlaw function for further inspection. SurfaceFX requires external light sources, with a control over the light sources, to combine the lighting and image acquisition sequence. Each image should have low angular (less than 45°) lighting coming from a single quadrant of the image plane (right, bottom, left and top). As each quadrant is illuminated, an image should be acquired. Once all four images are acquired, the images can be passed into the SurfaceFX function. These images can be stored via disabling cells or using latched images.

  • This example uses four LatchImage functions that have the Event parameter set to a corresponding Button function (Latch1, Latch2, Latch3, Latch4). For more information, see LatchImage and Button.
  • Their Region parameter shares a common EditRegion function, so that each image passed into the SurfaceFX function will have the same shape and orientation. For more information, see EditRegion.
  • The images stored by the LatchImage functions are acquired with lighting from the four different directions (right, bottom, left and top) and then passed to a SurfaceFX function (A11).
  • A SurfaceFlaw function with the Image parameter referencing the Image data structure output by the SurfaceFX function performs the inspection of the object. For more information, see SurfaceFlaw

  1. For the first image, lighting from the right side is activated and an image is acquired. The Latch1 Button (cell A5) is then pressed to store the acquired image in the LatchImage cell at B5.

  2. For the second image, lighting from the bottom side is activated and an image is acquired. The Latch2 Button (cell A6) is then pressed to store the acquired image in the LatchImage cell at B6.

  3. For the third image, lighting from the left side is activated and an image is acquired. The Latch3 Button (cell A7) is then pressed to store the acquired image in the LatchImage cell at B7.

  4. For fourth image, lighting from the top side is activated and an image is acquired. The Latch4 Button (cell A8) is then pressed to store the acquired image in the LatchImage cell at B8.

  5. The SurfaceFX function then runs based on the four LatchImage data structures as input images, generating an output image with enhanced features that highlight indentations on the surface (below).

  6. Finally, the SurfaceFlaw function uses the SurfaceFX output image as its input image, detecting areas of local intensity and size variations to identify flaws in the image (below).


TrainLineScanDistortion

Calculates an image region for lens distortion for use with the LineScanDistortion function and In-Sight 5604 or In-Sight 9902L line scan vision systems. TrainLineScanDistortion calculates the lens distortion by processing an image of evenly spaced, alternating black and white columns, and either using the entire image or a specific region of interest in the image, the function calculates the distortion present in the image. The LineScanDistortion function then references the TrainLineScanDistortion output and utilizes this calculation to correct for the lens distortion. For more information, see LineScanDistortion.

TrainLineScanDistortion must be used with a 50% duty cycle image (alternating columns of black and white), such as the image file installed with the In-Sight Explorer software. To load the image file, navigate to the Line Scan Distortion folder of your In-Sight Explorer Calibration Grids directory (Program Files (x86) > Cognex > In-Sight > In-Sight Explorer x.x.x > Calibration Grids > Line Scan Distortion), and choose the LineScanDistortionTrainSample.bmp file. Cognex recommends you print the image file and have the line scan vision system acquire an image of the printed file.

Note:
  • When using TrainLineScanDistortion function, the physical and optical set-up (the lens, line scan vision system and the physical relationship between the vision system and the scene being acquired) must be the same for both the correction training and run-time operation. If any of these items are altered, the system must be re-trained. Therefore, it is recommended the same vision system and lens be used to both train and process run-time images. The vision system and lens must also retain their original set up and settings. For example, changing the acquisition format (by altering the resolution) or moving the vision system will invalidate the correction.
  • The TrainLineScanDistortion function should only be used during the system's setup. By default, the function is disabled to prevent it from re-training at every image acquisition.

TrainLineScanDistortion Inputs

Syntax: TrainLineScanDistortion(Image,Region.X,Region.Y,Region.High,Region.Wide)

Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes image analysis; creates a rectangular image region that can be transformed. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.
X | The x-offset of the origin, in image coordinates.
Y | The y-offset of the origin, in image coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.

TrainLineScanDistortionOutputs

Returns

A TrainLineScanDistortion data structure containing the calculated lens distortion correction, or #ERR if any of the input parameters are invalid.


WhiteBalance

Available for color In-Sight sensors and color-enabled emulators only, WhiteBalance removes color casts in a color image by calculating the image's red, green and blue (RGB) values and correcting them according to color tables stored in the In-Sight job. As a result, items that are white in the real world, for example, will appear white in the image.

The user must create the color tables by acquiring an image of a "neutral" reference (that is, one that has equal RGB values; for example, 18-18-18), while ensuring that the image does not approach saturation (255-255-255). The recommended method is to acquire an image of a blank sheet of paper.

WhiteBalance generates a histogram of each color channel (red, green and blue) and "equalizes" the color values by considering the highest value as the baseline and dividing it by each color value to produce scale factors, which are then used to create the color tables (for example, an RGB of 200-100-50 will yield scale factors of 1-2-4).

The color tables for the current sensor settings are saved in the job file. To ensure that the proper WhiteBalance information is applied, load the job before loading or acquiring an image.

Note: The WhiteBalance function references the White Balance Region in the AcquireImage property sheet, and uses the parameters of this region when calculating the white balance. For more information, see AcquireImage.

WhiteBalance Inputs

WhiteBalance(Image)

Parameter | Description
Image | This argument must reference a spreadsheet cell that contains a valid color Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage. Note: AcquireImage is the only function that returns a valid color Image data structure.

WhiteBalance Outputs

Returns

A WhiteBal data structure, or #ERR if any of the input parameters are invalid.

Note: The WhiteBalance function is inserted into the spreadsheet with its cell state disabled. This ensures that the image is balanced only once and will not be balanced every time the spreadsheet updates.

WhiteBalance Example

In this example, the input image of an object (a sensor lens) has a dark blue cast (below) that must be corrected.

The user first removes the object from the field of view (FOV) and replaces it with a blank sheet of paper. Next, simply inserting WhiteBalance into the spreadsheet removes the blue cast from the image; the user then clicks OK in the property sheet to confirm adding this function to the job. To create the color tables that are stored in the job file, the user acquires an image of the paper. When the object is returned to the FOV and viewed onscreen, the blue cast is completely absent (below).


InspectEdge

The InspectEdge Vision Tools are composed of two groups of tools:

  • InspectEdge Functions
  • BeadFind and BeadInspect Functions

About the InspectEdge Functions

About the BeadFind and BeadInspect Functions

Use the Bead Analysis Tool

BeadFind

BeadInspect

InspectEdge

InspectEdgeForDefect

InspectEdgePosition

InspectEdgeWidth


About the InspectEdge Functions

The InspectEdge Vision Tools, InspectEdge, InspectEdgeForDefect, InspectEdgePosition and InspectEdgeWidth, are used to perform advanced edge analysis, measuring the location of edges, the location and spacing of edge pairs and the width of edges, to determine if there are defects or gaps in the edges. The InspectEdge Vision Tools provide detailed information about the precise locations of object features in images by locating edges or edge pairs utilizing an array of Calipers within a Region of Interest (ROI), in which edge peaks are detected, and the found edges are examined for deviations, such as defects or gaps, in the edges.

In-Sight vision systems perform detailed edge analysis using following functions:

  • InspectEdge: Creates Caliper arrays within a referenced ROI for advanced edge analysis. This function is the first step in edge analysis. For more information, see InspectEdge.
  • InspectEdgeForDefect: Creates an edge model and scoring criteria for the detection of deviations from the edge model, and creates a best-fit straight or circular line fit from the found edges. For more information, see InspectEdgeForDefect.
  • InspectEdgePosition: Creates an edge model and scoring criteria to determine the location of edges. Optionally creates a best-fit straight or circular line fit from the found edges. For more information, see InspectEdgePosition.
  • InspectEdgeWidth: Creates an edge model of edge pairs and scoring criteria to determine variances in the width of edge pairs. For more information, see InspectEdgeWidth.
Note: InspectEdgeForDefect, InspectEdgePosition and InspectEdgeWidth must reference a data structure output by an InspectEdge function.

Overview

The InspectEdge Vision Tools are utilized to perform advanced edge analysis, examining edges of objects for deviations, such as cracks, nicks, dents or crimps. These tools are typically used to develop detailed information about the precise locations of features within or outside an object, and to determine if there are defects on those features.

The InspectEdge function locates edges or edge pairs in the image using the edge mode method, in which edge peaks are detected within the individual Calipers using a 1D kernel. An edge model is created, using the InspectEdgeForDefect, InspectEdgePosition and/or InspectEdgeWidth functions, that defines the ideal edge or edge pairs, and subsequent edge candidates are compared to the edge model to determine if there are defects or gaps in the edge candidate.

Once you have determined the location and orientation of the edge or edge pair of interest in the image, the following steps are performed in applying the tools:

  • Specify a ROI and Calipers that enclose the edges or edge pairs of interest, and Calipers, Minimum Contrast and Edge Width parameter values that isolate the edges of interest, using the InspectEdge function.
  • Define an edge model that describe the edge or edge pair of interest using the InspectEdgeForDefect, InspectEdgePosition and/or InspectEdgeWidth functions.

InspectEdge Edge Detection

The first step in using the InspectEdge Vision Tools is to specify a region of interest within the image in which you want to apply the tool. The InspectEdge function relies on a carefully defined ROI to isolate the relevant edge information from the image.

You specify a ROI to determine where in the image the tool should detect the edge or edge pairs in one of the following ways:

  • Use the InspectEdge Region parameter to define the location, size, angle, bend and/or rotation. For more information, see Region.
  • Construct an external ROI, such as an EditMaskedRegion or EditPolylinePath. For more information, see EditMaskedRegion or EditPolylinePath.

When positioning your ROI, ensure that the edges of interest are parallel to the search direction of the ROI, and that the ROI encloses as much of the edge or edges as possible, while also excluding unnecessary or unwanted noise from the ROI.

Within the InspectEdge function's ROI, a Caliper array is used to produce a 1D representation of the portion of the image that contains the edges of interest. This 1D image will contain not only the edges of interest, but also other edges caused by noise and unwanted information in the original image. Applying the Caliper, Edge Width and Minimum Contrast parameters in InspectEdge to the 1D image increases the strength of the edges of interest while at the same time decreasing image noise.

Define Edge Models with InspectEdgeForDefect, InspectEdgePosition and/or InspectEdgeWidth

Once the InspectEdge function has located the edges in the image, the InspectEdgeForDefect, InspectEdgePosition and/or InspectEdgeWidth function(s) are used to create an edge model of the edges expected to be encountered during the inspection. The edge(s) in the image are called edge candidates, while the ideal edge is called the edge model. Creating an edge model involves defining the best-fit line type, type of edge to be detected (single edge or edge pairs), edge transitions, edge scoring rules, line-fit rules and the types of defects and/or gaps to inspect.

InspectEdgeForDefect is used to create a best-fit line based on the edge model, and inspect for deviations from the edge model. InspectEdgePosition is used to determine the position of edges in relation to the edge model, and report deviations from the model, while also optionally creating a best-fit line. InspectEdgeWidth is used to examine a pair of edges for deviations in the distance between them.

For all three of the functions, after the referenced InspectEdge function has divided the ROI into an array of Calipers, each Caliper is evaluated and the edges within are scored to determine which edge should be selected. For position defects, a line is fit based on each found edge, and defects are determined by comparing the found edge to the line fit for variances outside of tolerances. For width defects, the distance between the two edges found within the Caliper are calculated to determine their distance, and defects are determined by comparing the distance to the expected range.

Evaluate Results

For each edge pattern candidate in the image that fails to adequately match the edge model, the functions can return the following information, if specified:

  • The position of the edge pattern candidate relative to the line fit.
  • The size, area and position of any defects or gaps found in the edge pattern candidate.

In addition, you can use the other associated InspectEdge Vision Data Access functions to gather additional information to perform your own processing and analysis of the data generated by the InspectEdge Vision Tools. For more information, see InspectEdge.


About the BeadFind and BeadInspect Functions

A bead is an ink or glue path, or a welded seam, which is defined by its width, coverage, and its location. Typically, a bead path is a continuous pair of edges that define the boundary between two regions of different pixel values (a path does not always have to be a loop).

The BeadFind and BeadInspect functions are used to perform bead tracking and inspections, verifying whether or not a bead path is laid out consistently in the same location, with a uniform pattern of the same width, or detecting if there is any missing material in a bead path.

The BeadFind and BeadInspect functions can be used for detecting the following types of bead defects:

  • Bead not present
  • Bead gaps
  • Bead location deviations
  • Bead width defects
  • Bead coverage defects

In-Sight vision systems perform detailed bead analysis using the following functions:

  • BeadFind: Provides a simple method for users to find bead path candidates, edit and train a selected bead path. The trained bead path will be used as an input by the BeadInspect function. For more information, see BeadFind.
  • BeadInspect: Refines the bead training criteria and measurement rules based on BeadFind result to determine if there are positional defects, width defects or gaps in the bead. BeadInspect must reference a data structure output by a BeadFind function. For more information, see BeadInspect.
For more information about how to use the BeadFind and BeadInspect functions, see Use the BeadFind and BeadInspect Functions.
Note:
  • BeadFind and BeadInspect functions are only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • BeadFind and BeadInspect functions do not support color images. If a color image is loaded, it will be automatically converted to a greyscale image.


Use the BeadFind and BeadInspect Functions

This topic provides an overview of the BeadFind and BeadInspect functions and the basic steps of how to set up these two functions. For more information, see BeadFind and BeadInspect.

Note:
  • BeadFind and BeadInspect functions are only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • BeadFind and BeadInspect functions do not support color images. If a color image is loaded, it will be automatically converted to a greyscale image.

Overview

The operation of the BeadFind and BeadInspect functions involve two phases: setup time and run-time. The following figure outlines the basic workflow for the BeadFind and BeadInspect functions.

BeadFind Function

The BeadFind function consists of the following steps:

  1. Select a bead sample location

    2. After inserting the BeadFind function into the spreadsheet, move the Bead Sample Location’s red circle graphic to a spot on the bead. Ensure the circle graphic covers both sides of the bead.

  2. Find bead path candidates

    3. Click the Find Bead Paths button. The BeadFind function will start to find bead path candidates from the designated bead sample location automatically.

  3. Select the best bead path

    4. Once bead finding is completed, users can view the found bead path candidates and select the best bead path.

  4. Edit bead path (Optional)

    If the found bead path is not ideal, modify the selected bead path as necessary.

  5. Train selected bead path

    6. Click the Train Bead Path button to train the selected bead path.

BeadInspect Function

Once the sample bead is found and trained using the BeadFind function, the BeadInspect function is used to refine the bead analysis criteria and create measurement rules to identify bead defects during setup time. During run-time, bead paths will be compared to the trained model to determine if there are defects or gaps in the bead.

When refining the bead analysis criteria in the BeadInspect property sheet, users have two techniques for adjusting parameters to eliminate false defects, either by directly adjusting the parameters in the General tab or by accepting tool suggestions using the Fix button, next to each defect in the Defects tab.

For each bead inspection, the BeadInspect function will return the number of total defects and defect details will be listed in table format. By default the first 10 defects will be included in the table automatically. The table can be expanded to include more defects. In addition, users can use the other associated Vision Data Access functions to gather additional information to perform their own processing and analysis of the data generated by the BeadInspect function. For more information, see Bead.

Configure the BeadFind Function

  1. Load a sample image to the job.

    Tip:
    • BeadFind and BeadInspect functions work best with high contrast images with enhanced bead feature on a part.
    • The sample image used to set up the BeadFind tool must contain a known good bead free of defects.
  2. Insert the BeadFind function into the Spreadsheet.

  3. Select Bead Sample Location and click the Edit Graphic [image] button.

    Tip:
    • The bead sample location should be placed on a bead section that is representative of the entire bead.
    • The bead sample location should be placed on a straight section of a bead free of noise.
    • Do not select the bead sample location near holes or part edges.
    • If a bead path is partially found, try adjusting the size of the sample circle or moving the bead sample location to where the bead path is not currently traced, then find the bead again.

    • If the width of a bead varies significantly, try selecting a section of the bead that has the medium width as the bead sample location.

  4. In Interactive Graphics Mode, drag the red circle onto the bead to set up the bead sample location. For more information, see Interactive Graphics Mode.

    The red circle should be placed onto a bead section that is representative of the entire bead and the red circle needs to enclose both edges of the bead. After the Bead Sample Location is set, click the Enter key or [image] to go back to the property sheet.

  5. Click the Find Bead Paths button.

    The found bead path candidates will be displayed in blue, and the number of bead paths found will be displayed to the right of the Find Bead Paths button.

    Tip: If the bead is difficult to see, go to the Format > Format Cells... and adjust the Line width in the Graphics tab.

  6. Review the bead path candidates by selecting numbers in the Selected Bead Path box.

    In the following example, five bead path candidates are found and the number 3 bead path is the selected bead path.

  7. (Optional) If the selected bead path is not ideal, click the Edit Bead Path button to modify the bead path as necessary.

    By placing the mouse cursor over various parts of the polyline, the mouse cursor will automatically transform, enabling the following actions:

    Mouse Icon Description Right-click Context Menu

    Select a point on the polyline. The selected point will be highlighted in green. The point can be moved by dragging the mouse cursor, or deleted via the delete key or the right-click context menu.
    • Delete Point
    • Open Polyline Here

    Place mouse cursor over the polyline path. The selected location will be highlighted in green. A point can be added by clicking the mouse or via the right-click context menu.
    • Insert Point
    • Open Polyline Here

    Select multiple points by drawing a box over the points. The selected points will be highlighted in green. Once points are selected, they can be moved by dragging the mouse cursor, or deleted via the delete key or the right-click context menu.
    • Delete Points

  8. Once a bead path is selected and modified, click the Train Bead Path button to train the bead path. The trained bead path will be displayed in green.

  9. Click OK to exit the BeadFind tool.
Note: When the property sheet is closed, only the selected bead path will be saved. Other found bead paths, as well as edits to these bead paths, will be discarded.

Configure the BeadInsepct Function

  1. Insert the BeadInspect function into the Spreadsheet.
  2. Click on the BeadFind parameter in the Property Sheet. Press CTRL+SHIFT+A, or click the absolute reference [image] button to set the BeadFind parameter as a cell reference to the previously created BeadFind data structure. Then click OK.

  3. When BeadInspect is inserted into a cell, a results table with 0 defect is created in the spreadsheet.

    Note: Any trained bead is by definition a good bead. The initial parameters for the BeadInspect function therefore will be automatically set based on the referenced BeadFind function results to make sure no defects will be detected during the inspection of the trained bead path.

  4. Load a training image to the job.

    Once the image is loaded, the results table will get automatically updated with the latest inspection results.

  5. Review Defects.

    Open the BeadInspect Property Sheet and navigate to the Defects Tab to review defects. By default, the defect list is grouped by Defect Index.

    The following image illustrates an overview of eight bead defects found in the training image. The bead is defined as a bead with only one defect (Defect 5). All other detected defects are false defects which should be ignored during inspection. The BeadInspect parameters need to be adjusted during setup time to eliminate false defects so that the false defects will not be identified during future inspection.

    Note: The bead example below is for demonstration purposes only.

    Defect Types and Related Parameters:

    Defect Types | Related Parameters | Description

    Too Narrow

    Bead Width Min (%)

             Used to inspect the bead for sections that are too narrow.

    Too Wide

             Bead Width Max (%) Used to inspect the bead for sections that are too wide.

    Underfill

    Bead Coverage Min (%)

             Used to inspect underfill defects where too little material is applied to a section of the bead.

    Overfill

    Bead Coverage Max (%)

             Used to inspect overfill defects where too much material is applied to a section of the bead.
    Step Change | Bead Edge Step Max (%) | Used to inspect protrusions or notches along the edges of the bead. Select a higher Bead Edge Step Max value to increase tolerance for beads with coarse or uneven edges. Use a lower bead step value for beads with smoother edges

    Missing First Edge

    Missing Second Edge

    Missing Both Edges

    Contrast Threshold

             Used to inspect missing edges defects. Bead edges with contrast values below the Contrast Threshold will be identified as defects.
    Bead Edge Position Tolerance (%) | Used to inspect bead edges position changes. Bead edges that are outside of the Bead Edge Position Tolerance will not be found.

  6. Adjust BeadInspect parameters to eliminate false defects.

    The false defects can be automatically fixed using the Fix button in Defects Tab, or by manually adjusting the parameters associated with the defects in General Tab.

    Closed Fix Missing Edge Defects Using the Allow Fill Edges Option
    Note: The Allow Fill Edges option works only for Missing First Edge and Missing Second Edge defect types. It is not available if both edges are missing.

    1. Select Defect 0 from the defect list. When a defect is selected, the image will be panned and zoomed to the location of the defect in the image.

    2. Click Fix button and choose Allow Fill Edges from the suggested menu.

    3. A cyan box will be drawn to indicate the fill edge region in the image.

    4. Once a defect is fixed, Defect 0 will be removed from the defect list table.
    Closed Fix Defects Using the Update Parameter Option

    1. Select Defect 2 from the defect list.

      Three types of defects are reported at this section of the bead: Missing First Edge, Too Narrow and Underfill.

    2. Click Fix button and choose Update Bead Edge Position Tolerance (%) from the suggested menu.

      • The parameter associated with the Missing First Edge defect is Bead Edge Position Tolerance (%). The actual reported value is 40, which is above the specified Bead Edge Position Tolerance (%) value 33 listed in the General Tab.
      • This defect can be fixed by updating the Bead Edge Position Tolerance (%) value from 33 to 40.

    3. Once the Fix button is pressed, the Bead Edge Position Tolerance (%) value will be automatically updated to 40 so that the edge will be detected.

    4. Once this defect type is fixed, it will be removed from the Defect 2 list.

    5. Select the next defect in Defect 2 list.

    6. Click Fix button and choose Update Bead Width Min (%) from the suggested menu.

      • The parameter associated with the Missing First Edge defect is Bead Width Min (%). The actual reported value is 52.3, which is below the specified Bead Width Min (%) value 79 listed in the General Tab.
      • This defect can be fixed by lowering the Bead Width Min (%) value from 79 to 52.

    7. Once the Fix button is pressed, the Bead Width Min (%) value in the General Tab will be automatically updated so that the same edge section will not be identified as defects.

    8. Select the last defect left in the Defect 2 list.

    9. Click Fix button and choose Update Bead Coverage Min (%) from the suggested menu.

      • The parameter associated with the Missing First Edge defect is Bead Coverage Min (%). The actual reported value is 52, which is below the specified Bead Coverage Min (%) value 76 listed in the General Tab.
      • This defect can be fixed by lowering the Bead Width Min (%) value from 76 to 52.

    10. Once the Fix button is pressed, the Bead Coverage Min (%) value in the General Tab will be automatically updated so that the same edge section will not be identified as defects.
    11. Once all defect types in Defect 2 list are fixed, Defect 2 will be removed from the defect list table.
    Closed Fix a Group of Defects by Defect Types

    Instead of fixing each defect individually, users can also fix a group of defects by defect types.

    1. Open the BeadInspect Property Sheet and navigate to the Defects Tab. Click the [image] button to group defect list by Defect Type.

      In this example, defect 1 and 6 are reported with the same defect type and the related parameter is Bead Coverage Max (%). The expected Bead Coverage Max (%) value is 134, while the actual reported Bead Coverage Max (%) value for Defect 1 and Defect 6 are 157.7 and 140.

    2. To fix both defects, go to the General Tab, and update the Bead Coverage Max (%) value to 158.

    3. Once the value has been updated, the entire overfill defect type will be removed from the defect list table.

    Closed Use the Edit Inspection Areas

    When the Train Bead Path is executed in the BeadFind function, the mask or fill edges areas will be automatically calculated and added to the bead inspection image.

    To edit the preset inspection areas or add new inspection areas that can be masked out from inspection or allow fill edges, click The Edit Inspection Areas button in the general tab.

    To add a mask area:

    Note: The mask area should be used with caution. If an area is masked, it will be ignored in future inspections and defects in masked areas will not be reported.
    1. Choose the Mask Area from the menu.

    2. Select a position on the bead path where you want to create mask area.

    3. Drag the point to create a mask area.

    4. Move either point to adjust the mask area as necessary.

    To erase a mask area:

    1. Choose the Erase Mask Area from the menu.

    2. Select the mask area to be erased.

    3. The mask in selected area will be deleted.

    To add a fill edges area:

    Note: The Fill Edges Area option works only for Missing First Edge and Missing Second Edge defect types. This option is not available if both edges are missing.
    1. Choose the Fill Edges from the menu.

    2. Select a position on one of the bead edges (red polyline) where you want to create a fill edge area.

    3. Drag the point to create a fill edge area.

    4. Move either point to adjust the fill edge area as necessary.

    To erase a fill edges area:

    1. Choose the Erase Fill Edge from the menu.

    2. Select the fill edge area to be erased.

    3. The filled edge in selected area will be deleted.

  7. Once all false defects are eliminated, there will be only one defect listed in the defect list table in this example.

  8. Click OK to exit the BeadInspect spreadsheet.
  9. Load the next image and repeat steps 5 to 8 until all the necessary bead instances have been trained.
  10. Save the job.

Refine Inspection Settings

The best way to achieve optimal bead inspection performance is to use a large number of images of real parts, including parts with both good and bad beads. The images of the beads should be representative of all possible bead instances that could occur during run-time. This will help you refine the inspection settings, including the use of fill edge and/or mask areas as appropriate.

Performance Verification

It is important to verify that the BeadInspect function works as expected after setting up the BeadFind and BeadInspect functions. It is recommended to rerun the BeadInspect function with all previous images and a new set of images to make sure that all defects are correctly identified and no false defects are reported.

Run the BeadFind and BeadInspect Functions

During run-time, the In-Sight vision system will be placed Online and acquire images as defined by the job. When an image is acquired, the bead is automatically detected and compared against the trained bead model. The results will be output via the Vision Data Access functions, and the BeadInspect Defects tab will provide additional information about the bead defects.


BeadFind

The BeadFind function is used to find the center of a bead feature, and create a polyline that traces the path of the detected bead. The bead path found and trained by the tool is used as an input by a BeadInspect function to determine positional, width, or coverage defects in the bead.

Note:
  • BeadFind and BeadInspect functions are only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions. For more information on BeadInspect, see BeadInspect.
  • BeadFind and BeadInspect functions do not support color images. If a color image is loaded, it will be automatically converted to a greyscale image.

  • For more information about how to use the BeadFind and BeadInspect functions, see Use the BeadFind and BeadInspect Functions.

BeadFind Inputs

Syntax: BeadFind(Image,Fixture,Background Image,Bead Sample Location,Max Width Deviation (%),Bead Finding Tolerance,Bead Find Optimizations,Max Bead Paths to Find,Find Bead Paths,Selected Bead Path,Edit Bead Path,Bead Train Optimizations,Train Bead Path,Show Graphics)

Parameter | Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the bead path is defined. The default setting is (0,0,0), the top leftmost corner of the image.

Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.
Background Image

(Optional) Specifies a reference to a spreadsheet cell that contains an Image data structure of an image to be used for image subtraction.

A background image should be an image without any bead material. It is used to create a high contrast image between an image with and without bead material to enhance the bead material visibility on a part during the bead find analysis.

Note:
  • The subtracted image will not be generated until the Find Bead Paths button is clicked. To see the subtracted image, the Show Graphics Subtracted Image checkbox must be checked.
  • The subtracted image will not be saved with the job.
Closed Example:

Bead Sample Location

Specifies where the BeadFind function will begin to search bead path(s). The circle doesn't need to be placed in the center of a bead path, as long as the radius of the circle encloses both edges of the bead.

Closed Example:

Note: The value of the Radius parameter determines the width of the search calipers. If a section of the bead is wider than the search calipers, the bead search will fail.
X | The x-offset of the circle, in image coordinates (0 to sensor image height - 1; default = sensor image height / 2).
Y | The y-offset of the circle, in image coordinates (0 to sensor image width - 1; default = sensor image width / 2).
Radius | The radius of the circle, in image coordinates (0 to sensor image height / 2; default = 30).
Max Width Deviation (%)

Specifies the maximum allowable bead width change in percentage (1-100; default = 50). The bead search stops if the bead width deviation is above or below the threshold.

Closed Example:

In this example, the Max Width Deviation is set to 30. The bead search stops when the bead width deviation is above the threshold at the top and below the threshold at the bottom. Adjust the Max Width Deviation value to 70, the entire bead path is traced.
Bead Finding Tolerance

Specifies how aggressively to search for edges that comprise a bead (0-10; default = 3). A higher value allows bead finding to operate in areas of the image where the bead path is ambiguous.

0 = Least aggressive

...

10 = Most aggressive
Bead Find Optimizations

Specifies bead finding parameters that can be set manually or allowed to be automatically calculated by the tool.

Auto | Specifies whether or not the function will automatically determine the bead finding optimization parameters.
Bead Color | Specifies the bead color against the background color (Dark on Light or Light on Dark; default = Light On Dark).
Bead Width | Specifies the expected bead width in pixels (1 to sensor image width - 1; default = 10). Note: If the average bead width within the Bead Sample Location circle is out of the range of Bead Width +/- Max Width Deviation (%), the bead search will fail. For example, if the expected Bead Width is set to 12 and the Max Width Deviation (%) is set to 25%, the average bead width within the Bead Sample Location should range from 9 to 15. If the actual average bead width detected within the Bead Sample Location is 17, no bead path will be found.
Min Contrast | Specifies the minimum contrast value (1-255; default = 10) to be considered a bead edge. A lower value allows bead edges to be detected in low contrast images with noise.
Max Bead Paths to Find | Specifies the maximum number of possible bead path candidates to find (1 - 5; default = 5). The function will stop processing once the specified number of bead candidates are found.
Find Bead Paths

Click this button to start finding bead path candidates. The number of bead paths found will be displayed to the right of the button once the operation is completed. If no bead paths are found, 0 will be displayed.

Note: Pressing the Find Bead Paths button will clear all previous bead path information including modifications to the existing paths or trained bead path data. To restore the information, press Cancel button to exit property sheet without saving any changes in the property sheet.
Selected Bead Path

Specifies which of the possible bead path candidates will be used to display and to train the bead (0 to 4; default = 0).

Edit Bead Path

Click this button to switch to the Interactive Graphics Mode to manually adjust and optimize the points of the selected bead path before training. For more information on Interactive Graphics Mode, see Interactive Graphics Mode.

Note:
  • If no bead path is found or the Selected Bead Path value is greater than the number of found paths, the Edit Bead Path button will be disabled.

  • If a bead path is modified after training, the bead path needs to be retrained.

Closed Example:

By placing the mouse cursor over various parts of the polyline, the mouse cursor will automatically transform, enabling the following actions:

Mouse Icon Description Right-click Context Menu

Select a point on the polyline. The selected point will be highlighted in green. The point can be moved by dragging the mouse, or deleted via the delete key or the right-click context menu.
  • Delete Point
  • Open Polyline Here

Place mouse over the polyline path. The selected location will be highlighted in green. A point can be added by clicking the mouse or via the right-click context menu.
  • Insert Point
  • Open Polyline Here

Select multiple points by drawing a box over the points. The selected points will be highlighted in green. Once points are selected, they can be moved by dragging the mouse, or deleted via the delete key or the right-click context menu.
  • Delete Points
Bead Train Optimizations

Specifies training parameters for optimizing bead training.

Caliper Spacing | Specifies the density of the edge detection calipers that are placed along the bead path (1 - 10; default = 3). This value will dictate the minimum length of a possible defect. Set a higher value to decrease the number of calipers when only coarse defect detection is needed. To detect smaller defects, set a lower value to increase the number of calipers. Closed Example:
Smoothing Factor | Specifies how much influence uneven edges will have on the best fit line for the trained bead path (1 - 10; default = 3). Use a higher value to make the best fit bead path less sensitive to variations such as spikes along the edges of the bead. Use a lower value when the bead edges are very smooth. Closed Example:
Train Bead Path

Click this button to train bead path.

During training, detailed analysis of the bead characteristics are calculated. These calculations will be used to set initial values for a BeadInspect function that references this BeadFind tool.

Note: If the BeadFind tool is retrained, a referencing BeadInspect will be modified with updated bead characteristics.
Show Graphics

Specifies which BeadFind graphical overlays will be drawn on top of the image.

Bead Path

Displays the best fit line along the selected bead path either in blue if a bead path is not trained or in green if a bead path is trained.

Note: Once a bead path is found, bead path is always displayed while the BeadFind property sheet is open.
Closed Example:

Bead Edges

Displays the positions of the bead edges that have been detected along the bead path. If an edge is not found, yellow circles will be displayed to indicate where the edge is expected to be found.

Closed Example:

Bead Edges (Average)

Displays the average positions of bead edges that have been detected along the bead path.

Closed Example:

Calipers

Displays the calipers along the bead path. The calipers for the selected bead path candidate will be displayed in green. The calipers for the trained bead path will be displayed in one of the following colors:

  • Green: Both edges are found.
  • Yellow: Miss an edge and fill edge is used.
  • Black: Miss both edges and mask is applied.
Closed Example:

Subtracted Image

Displays the subtracted image created by subtracting an active image with a Background Image.

Note: The subtracted image will not be displayed until the Find Bead Paths button is clicked.
Closed Example:

BeadFind Outputs

Returns | A Bead data structure containing the information about detected beads in the image, or #ERR if any of the input parameters are invalid.
Results | When BeadFind is initially inserted into a cell, a results table is created in the spreadsheet. For example, this is the default BeadFind results table:


BeadInspect

The BeadInspect function is used to identify positional, width, or coverage defects in a bead. The BeadInspect tool has parameters to control the bead analysis criteria and measurement rules. The initial values for these rules are set from a valid Bead data structure returned by a BeadFind function. The tool compares the bead characteristics found in the currently acquired image against the bead analysis criteria. For more information on the BeadFind function, see BeadFind.

Note:
  • BeadFind and BeadInspect functions are only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • BeadFind and BeadInspect functions do not support color images. If a color image is loaded, it will be automatically converted to a greyscale image.

  • For more information about how to use the BeadFind and BeadInspect functions, see Use the BeadFind and BeadInspect Functions.

BeadInspect Inputs

General Tab

Syntax: BeadInspect(Image,Bead Find,Edit Inspection Areas,Bead Edge Position Tolerance (%),Contrast Threshold,Defect Limits,Show Graphics))

Parameter | Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.
Bead Find

Specifies a reference to a spreadsheet cell that contains a Bead data structure output by the BeadFind function.

Note:
  • The BeadFind function must be trained or the BeadInspect function will return #ERR.
  • If a BeadFind function is retrained, any linked BeadInspect function parameters, the masked region(s), the fill edge region(s) and any previous editing set in the Edit Inspection Areas will be reset.
Edit Inspection Areas | Click this button to enter Interactive Graphics Mode to edit areas that can be masked out from the inspection or allow fill edges.
Bead Edge Position Tolerance (%)

Specifies the maximum amount (1 to 200; default = 50) an edge can deviate from the trained edge position as a percentage of the average bead width at that location. Bead edges that are outside of this tolerance range will not be found.

Closed Example:

An edge must be found between the trained bead path (in green) and the Position Tolerance Boundary (in cyan). The Bead Edge Position Tolerance (%) value is measured from the trained edge position on either side of the expected edge.

The average bead width is considered 100%. The trained bead path is in the middle of the bead, which is 50% deviated from the trained edge position. If the position tolerance is less than 50%, there will be two dashed lines on either side of the bead path. If the position tolerance is 50% or greater, only one single dashed line will be displayed on either side of the bead path.
Contrast Threshold

Specifies the minimum valid edge contrast value (1 to 255; default = 10). Bead edges with contrast values below this threshold will be identified as defects.
Defect Limits

Specifies how defects will be defined and whether a particular type of defect should be detected.

Note: When a BeadFind tool is first referenced, the default values for parameters listed below will be automatically reset to let the current bead pass the inspection with no defects found.
Bead Width Min | Indicates whether the minimum width defect detection is enabled. This parameter is used to inspect the bead for sections that are too narrow.
Bead Width Min (%) | Specifies the minimum valid bead width (1 to 99; default = 50) in percentage compared to the corresponding section of the bead when it was trained. Bead edges found below this limit will be identified as defects. For example, a Minimum Bead Width of 50% allows each section of the bead to be half as wide as it was on the trained bead.
Bead Width Max | Indicates whether the maximum width defect detection is enabled. This parameter is used to inspect the bead for sections that are too wide.
Bead Width Max (%) | Specifies the maximum valid bead width (101 - 999; default = 150) in percentage compared to the corresponding section of the bead when it was trained. Bead edges found above this limit will be identified as defects. For example, a Maximum Bead Width of 200% allows each section of the bead to be twice as wide as it was on the trained bead.
Bead Coverage Min | Indicates whether the minimum coverage defect detection is enabled. This parameter is used to inspect the bead for sections that contain too few light pixels (for light-on-dark beads) or dark pixels (for dark-on-light beads) compared to the corresponding sections of the bead that was trained.
Bead Coverage Min (%) | Specifies the minimum bead coverage (1 to 99; default = 50) allowed at each section of the bead compared to the corresponding section of the bead that was trained. Use a lower value to allow beads that are much lighter (for dark-on-light beads) or much darker (for light-on-dark beads) than the trained bead.
Bead Coverage Max | Indicates whether the maximum coverage defect detection is enabled. This parameter is used to inspect the bead for sections that contain too many light pixels (for light-on-dark beads) or dark pixels (for dark-on-light beads) compared to the corresponding sections of the bead that was trained.
Bead Coverage Max (%) | Specifies the maximum bead coverage (101 to 999; default = 150) allowed at each section of the bead compared to the corresponding section of the bead that was trained. Use a higher value to allow beads that are much darker (for dark-on-light beads) or much lighter (for light-on-dark beads) than the trained bead.
Bead Edge Step Max | Indicates whether the maximum step change defect detection is enabled. This parameter is used to detect protrusions or notches along the edges of the bead.
Bead Edge Step Max (%) | Specifies the maximum position offset (1 to 100; default = 30) allowed for a bead edge compared to neighboring edges. Use a higher value to increase tolerance for beads with coarse or uneven edges. Use a lower value for beads with smoother edges.
Defect Length Min (Calipers) | Specifies the smallest defect size (1 to 10 adjacent calipers; default = 3) that will be reported as a defect in the inspection results. A value of 1 will include all defects. A value of 10 will report only defects comprised of 10 or more adjacent calipers.
Show Graphics

Specifies which BeadInspect graphical overlays will be drawn on top of the image.

Bead Path | Displays the trained bead path (in green) used for finding defects. It is the path from the referenced BeadFind function.
Bead Edges

Displays the found edges for the bead path in yellow.

Closed Example:

Position Tolerance Boundary

Displays the boundaries (in cyan dashed lines) for finding bead edges. Edges outside of this boundary will not be detected, resulting in defects. If the position tolerance is less than 50 there will be two dashed lines on either side of the bead path. If the position tolerance is 50 or greater there will be a single dashed line on either side of the bead path.

Closed Example:

Mask and Fill Edge Areas

Displays masked and fill edges areas along the bead path. Masked regions will be drawn in black. Fill edge regions will be drawn in cyan.

Fill Edges allow one side of the bead to go undetected in that area. The masked area will be ignored in future inspections and no defect in masked area will be reported.

Closed Example:

Bead Width Defects | Displays the bounding region for bead width defects (in red).
Bead Coverage Defects | Displays the bounding region for bead coverage defects (in red).
Bead Edge Step Defects | Displays the bounding region for bead edge step defects (in red).
Missing Edge Defects | Displays the bounding region for missing edge defects (in red).

Defects Tab

The Defects tab displays the overall results for bead inspection, and is divided into two sections: statistics and defect list.

Statistics

The statistics contain the following data and will be updated automatically after each image is loaded and/or after a change is made to the BeadInspect function.

  • Defect Count: Displays the total number of defects found in the bead.
  • Caliper Count: Displays the total number of calipers in the bead path.
  • Contrast (First Edge): Displays the minimum, maximum and average contrast value along the first edge of the bead.
  • Contrast (Second Edge): Displays the minimum, maximum and average contrast value along the second edge of the bead.
  • Bead Width: Displays the minimum, maximum and average width as a percentage of the bead.
  • Bead Coverage: Displays the bead coverage as a percentage of the bead.
  • Bead Position Shift (First Edge): Displays the minimum, maximum and average deviation of the first edge as a percentage of the bead width.
  • Bead Position Shift (Second Edge): Displays the minimum, maximum and average deviation of the second edge as a percentage of the bead width.
  • Bead Edge Step Max (First Edge): Displays the maximum step change as a percentage of the bead width along the first edge of the bead.
  • Bead Edge Step Max (Second Edge): Displays the maximum step change as a percentage of the bead width along the second edge of the bead.

Defect List

The following toolbar buttons allow you to customize the display of the defect results table:

Toolbar Button | Action
 | Expand all.
 | Collapse all.
 | Group by defect type.
 | Group by defect index. By default, the defect list table is grouped by defect index.
 | No grouping.
 | Zoom to selected defect. By default, this option is selected. The image will be automatically panned and zoomed to the location of the defect in the image.

Defect Results Table

For each defect, the defect table will display the following:

Parameter | Description
Index | Displays the defect index number.
Classification

Displays defect type. Defect Types:

  • Too Narrow
  • Too Wide
  • Underfill
  • Overfill
  • Missing First Edge
  • Missing Second Edge
  • Missing Both Edges
  • Step Change
  • No Bead Found
Parameter | Displays the BeadInspect parameter that is associated with the defect.
Actual | Displays actual value reported by the BeadInspect function.
Expected | Displays the allowed value range specified by the BeadInspect parameters.
Fix (button)

Provides the following tuning options to remove false defects from the defect results table.

Update {Parameter}

Updates the corresponding parameters associated with different defect types. If this option is selected, the related minimum or maximum parameters in Defect Limits will be updated with the actual value, and the defect will be removed from the defect results table.

Closed Defect Types and Related Parameters
Defect Types | Related Parameters | Description
Too Narrow | Bead Width Min (%) | Used to inspect the bead for sections that are too narrow.
Too Wide | Bead Width Max (%) | Used to inspect the bead for sections that are too wide.
Underfill | Bead Coverage Min (%) | Used to inspect underfill defects where too little material is applied to a section of the bead.
Overfill | Bead Coverage Max (%) | Used to inspect overfill defects where too much material is applied to a section of the bead.
Step Change | Bead Edge Step Max (%) | Used to inspect protrusions or notches along the edges of the bead. Select a higher Bead Edge Step Max value to increase tolerance for beads with coarse or uneven edges. Use a lower bead step value for beads with smoother edges
Missing First Edge Missing Second Edge Missing Both Edges | Contrast Threshold | Used to inspect missing edges defects. Bead edges with contrast values below the Contrast Threshold will be identified as defects.
 | Bead Edge Position Tolerance (%) | Used to inspect bead edges position changes. Bead edges that are outside of the Bead Edge Position Tolerance will not be found.
Allow Fill Edges

Fills edge within a defect that contains a missing edge. Fill Edges allow one side of the bead to go undetected in that area.

Note: Works only for Missing First Edge and Missing Second Edge defect types. This options is not available if both edges are missing.
Mask/Ignore

Masks the defect area from inspection. The masked area will be ignored in future inspections. No defect in masked area will be reported.

BeadInspect Outputs

Returns

A Bead data structure containing the information about detected beads in the image, or #ERR if any of the input parameters are invalid.

Results

When BeadInspect is initially inserted into a cell, a results table is created in the spreadsheet. For example, this is the default BeadInspect results table:

Note:
  • The Vision Data Access function will return #ERR if no defect is found.

  • The Vision Data Access function will return a single defect with Type integer value 256 if no bead path is detected.


InspectEdge

The InspectEdge function is used to perform advanced edge analysis. Within the function's referenced Region of Interest (ROI), an array of indexed, edge detecting sub-regions (called Calipers) develop detailed information about the precise location of features, by locating edges or edge pairs in an image. This information is used to determine the location of edges or features, the location and spacing of pairs of edges, and measure the width of objects in images.

InspectEdge Overview

After inserting the InspectEdge function, the ROI is established, either using the function's own internal region or as a reference to an external ROI, such as an EditMaskedRegion or EditPolylinePath, to determine where in the image the tool should detect the edge or edge pairs. For more information, see EditMaskedRegion or EditPolylinePath. The referenced ROI is segmented into individual Calipers, where each Caliper projects the pixels within it into a single convolution for edge analysis.

Once the ROI has been configured, the following steps are necessary to properly apply the function:

  • Specify Caliper, Minimum Contrast and Edge Width parameter values that isolate the edges of interest
  • Define an edge model that describe the edge or edge pair of interest using the InspectEdgeForDefect, InspectEdgePosition, and/or InspectEdgeWidth functions. For more information, see InspectEdgeForDefect, InspectEdgePosition, or InspectEdgeWidth.

With the InspectEdge function in place, multiple inspections can be performed using a single InspectEdge function as an input. For example, within one InspectEdge ROI, an InspectEdgeForDefect function could reference the function to determine positional defects, while an InspectEdgeWidth function performs a separate width measurement, and an InspectEdgePosition function determines a best-fit line for another edge.

Note: InspectEdge requires the longest execution time of the InspectEdge Vision Tools. Increasing the number of Calipers within the ROI will increase the function's computational time.

InspectEdge Inputs

Syntax: InspectEdge(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,External Region or Path,Caliper.Height,Caliper.Repeat Offset,Caliper.Initial Offset,Minimum Contrast,Edge Width,Fit All Calipers,Caliper Graph Index,Polyline Width,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes edge analysis; creates a rectangular image region that can be transformed and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image. The dashed yellow line indicates the direction in which the edge will be found.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region or Path

Specifies a reference to a spreadsheet cell that contains an Annulus, a Region, an EditAnnulus, an EditMaskedRegion, an EditPolylinePath or an EditRegion function. When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by the referenced region.

Note:
  • If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.
  • If this parameter references an EditPolylinePath, the function cannot be used as a reference to the InspectEdgeForDefect or InspectEdgePosition functions, which will return #ERR.

Caliper

Specifies the Caliper array within the ROI that will be used to define the size of the detectable defects and/or gaps. The size of the detectable defect or gap is determined by the number of edges that can be detected, which is determined by the number of Calipers placed along the edge. The Calipers are displayed within the ROI as red rectangles, and edges detected within the Caliper are displayed in green, when the InspectEdge cell is highlighted or the Show parameter is set to show all.

Note: Depending on the type of defect being examined, Calipers may be positioned to overlap. However, the more Calipers that are applied within the ROI will increase the function's execution time.

Height | Specifies the number of pixels, per Caliper, that are to be analyzed along the direction of the inspection. The valid range is 1 to the In-Sight vision system's image width; default value is 5.
Repeat Offset | Specifies the number of pixels between the start of each Caliper. The valid range is 0 to the In-Sight vision system's image width; default value is 5. The last Caliper may overlap the end of the Region, unless Fit All Calipers is enabled.
Initial Offset | Specifies an offset for the first Caliper in the Region. The valid range is 0 to the In-Sight vision system's image width; default value is 0.

Minimum Contrast

Specifies the minimum greyscale contrast transition (0 to 255; default = 5) to be considered an edge. For each indexed Caliper, a contrast graph, drawn in blue, is displayed on the image. The values in the chart are automatically scaled to a 0-100 value. Utilize this chart when applying this parameter to properly adjust the value.

Closed Example - Minimum Contrast Parameter with Chart

Edge Width

Specifies the pixel distance (1 to the Region width value; default = 3) over which an edge transition takes place. This setting is the approximate size of the pixel operator used to filter the greyscale projections before edges are extracted; use this setting to filter noise from the image.

Fit All Calipers

Specifies whether or not all of the Calipers are placed within the ROI.

0 = OFF (default) | Specifies that the function strictly adheres to the Caliper Repeat Offset and Initial Offset parameters, and Calipers may overhang the ROI.
1 = ON | Specifies that the function will automatically re-calculate the Caliper Repeat Offset and Initial Offset parameters to ensure that all of the Calipers are placed within the ROI.

Caliper Graph Index

Specifies the Caliper to be displayed on the image (the Caliper will be outlined in green); default Caliper displayed is 0.

Polyline Width

Specifies the height (1 to Region height value; default = 20) of an EditPolylinePath.

Show

Specifies the display mode for InspectEdge graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the InspectEdge function is highlighted in the spreadsheet.
1 = result graphics only | The Caliper graph and specified Caliper will be displayed at all times.
2 = input and result graphics | The input image region, the Caliper graph and specified Caliper will be displayed at all times.
3 = show all: input, result, and calipers | The input image region, the Caliper graph and all of the Calipers within the ROI will be displayed at all times.

InspectEdge Outputs

Returns | An Inspect data structure containing the detected edges in the image and the number of Calipers, or #ERR if any of the input parameters are invalid.
Results | The number of Calipers in the ROI.


InspectEdgeForDefect

The InspectEdgeForDefect function is used to construct an edge model to perform advanced edge analysis on the edges or edge pairs returned by an InspectEdge function. This data is used to construct a best-fit line fit to compare found edges or edge pairs against, detecting defects and gaps, such as the distance from the line fit.

InspectEdgeForDefect Overview

After inserting the function into the spreadsheet, a reference must be made to an Inspect data structure output by an InspectEdge function. Once the reference to the InspectEdge function has been established, the edge model is created by configuring the parameters of the InspectEdgeForDefect function. The edge model involves defining the following:

  • The type of line fit - straight or circular.
  • The type of edge - single or edge pair.
  • The type of edge transition - white to black or vice-versa.
  • The edge scoring criteria that will be used to filter unwanted edges.
  • The line fit criteria that will be used to filter unwanted edges from the line fit.
  • The tolerances for defects and/or gaps to be encountered.

Once the edge model has been established, the function will compare edge candidates against the edge model and report deviations from the model.

Closed Example - Passing Straight Line Fit Edge

Closed Example - Failing Straight Line Fit Edge

Closed Example - Failing Circular Line Fit Edge

InspectEdgeForDefectInputs

Syntax:InspectEdgeForDefect(InspectEdge,Line Fit,Inspect Edge Pairs,Find Edge Direction,Edge: First,Edge: Second,Edge Scoring.Score Threshold,Edge Scoring.Edge Rules,Edge Scoring.Contrast Upper Bound,Edge Scoring.Pair Size,Advanced Line Fit.Filter Outliers,Advanced Line Fit.Distance Filter,Advanced Line Fit.Furthest Point Filter Distance,Advanced Line Fit.Re-Score,Advanced Line Fit.Re-Fit,Max Humber of Defects/Gaps,Defects.Min Distance,Defects.Max Distance,Defects.Size Enabled,Defects.Min Size,Defects.Max Size,Defects.Area Enabled,Defects.Min Area,Defects.Max Area,Defects.Defect Line Fit Filter,Defects.Sort Criteria,Gaps.Enabled,Gaps.Gap Minimum,Gaps.Gap Maximum,Gaps.Max Displacement,Gaps.Ignore Gap Ends,Gaps.Sort Criteria,Caliper Index,Show)

Parameter Description

InspectEdge

Specifies a reference to a spreadsheet cell that contains a valid Inspect data structure returned by an InspectEdge function.

Line Fit

Specifies the type of line fit to be constructed out of the detected edges.

1 = Straight Line Fit | The function will create a straight line fit from the detected edges.
2 = Circle Line Fit | The function will create a circular line fit from the detected edges.
3 = Auto Fit (default) | The function automatically creates either a straight line or circular fit, based on the referenced Region.

Inspect Edge Pairs

Specifies whether or not the function should detect edge pairs. Detected edge pairs will be labeled graphically within the image, with the first edge detected being 0, and the second edge being 1.

0 = Off (default) | The function will not detect edge pairs.
1 = On | The function will attempt to detect edge pairs, based upon the Edge Scoring parameters.

Find Edge Direction

Specifies the direction in which the function will attempt to detect edges. Dark green arrows are added to graphically illustrate the direction in which the edge will be detected. Fit lines will be labeled graphically within the image, with the first fit line being labeled 0, and the second fit line being 1.

Note: If the ROI of the referenced InspectEdge function is bent into a curve, the inspection will be relative to the curve’s center. When the Find Edge Direction parameter is set to Left-to-Right, it inspects towards the curve’s center, and when set to Right-to-Left, it inspects away from the curve’s center.
0 = Left-to-Right (default) | The function will attempt to detect edges from the left of the ROI to the right. Closed Example
1 = Right-to-Left | The function will attempt to detect edges from the right of the ROI to the left. Closed Example
3 = Center Outward | The function will attempt to detect edges from the center of the ROI to the upper and lower bounds of the ROI (the order of the found edges will be in the opposite direction of the "X" arrow on the ROI). Closed Example Note: The Inspect Edge Pairs parameter must be On to enable this selection.
2 = Outside In | The function will attempt to detect edges from the upper and lower bounds of the ROI to the center of the ROI (the order of the found edges will be in the opposite direction of the "X" arrow on the ROI). Closed Example Note: The Inspect Edge Pairs parameter must be On to enable this selection.

Edge: First

Specifies the contrast transition of the first edge to be detected, as determined by the Find Edge Direction parameter.

1 = Black-to-White | The edge transitions from black pixels to white pixels.
2 = White-to-Black (default) | The edge transitions from white pixels to black pixels.
3 = Either | The edge can transition from either black-to-white, or white-to-black, and the function will determine the proper transition. Specifying the transition improves the performance of the function.

Edge: Second

Specifies the contrast transition of the second edge to be detected, as determined by the Find Edge Direction parameter.

Note: The Inspect Edge Pairs parameter must be On to enable this selection.
1 = Black-to-White (default) | The edge transitions from black pixels to white pixels.
2 = White-to-Black | The edge transitions from white pixels to black pixels.
3 = Either | The edge can transition from either black-to-white, or white-to-black, and the function will determine the proper transition. Specifying the transition improves the performance of the function.

Edge Scoring

Specifies the edge scoring mode that will be used to determine whether or not an edge meets the established criteria.

Score Threshold

Specifies a scoring threshold to filter out edges with scores (0 to 100; default = 10) lower than this value.

Edge Rules

Specifies the type of edge that is most important when calculating the score.

1 = First | The first edge detected receives the highest consideration.
2 = Strongest | The edge with the strongest contrast transition receives the highest consideration. Note: When the Inspect Edge Pairs parameter is On, the score will be based on the average contrast value of two edges.
3 = First Strongest (default) | The first edge detected, with the strongest transition, receives the highest consideration.
4 = Edge Pair Size | The edge pair detected with the size closest to the Pair Size parameter receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.
5 = First Edge Pair Size | The first edge pair detected with the size closest to the Pair Size parameter receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.
6 = Strongest Edge Pair Size | The edge pair detected with the strongest transition and the size closest to the Pair Size parameter receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.
7 = First Strongest Edge Pair Size | The first edge pair, with the strongest transition and the size closest to the Pair Size parameter, receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.

Contrast Upper Bound

Specifies the upper limit of the edge contrast transition (2 to 255; default = 255) to be considered an edge; edges with an edge contrast transition above this value will have the same highest score.

Note: The Edge Rules parameter must be set to either Strongest, First Strongest, Strongest Edge Pair Size or First Strongest Edge Pair Size to enable this parameter.

Pair Size

Specifies the edge pair size at which the highest score is achieved (valid range is 1 to 3 times the In-Sight vision system's image width; default = 5). When this parameter is enabled, edge pairs detected above or below this value are scored proportionally to this value. For example, if the Pair Size is set to 10, and two edge pair candidates are detected, one with a value of 8 and another with 14, the edge pair with a value of 8 would be selected because it is closer to the limit than the second edge pair.

Note: The Inspect Edge Pairs parameter must be On, and the Edge Rules parameter must be set to either Edge Pair Size, First Edge Pair Size, Strongest Edge Pair Size or First Strongest Edge Pair Size to enable this parameter.

Advanced Line Fit

Specifies how the function should construct the line fit.

Filter Outliers

Specifies that the function will remove points from the Fit Line that are further than the distance specified in the Fit Distance Filter parameter.

0 = Off (default) | The function will not account for outlier edges.
1 = On | The function will account for outlier edges in its calculation.

Fit Distance Filter

Specifies the distance, in pixels (valid ranges are 1 to 3 times the In-Sight vision system's image width; default = 2), from which an edge must be from the original Fit Line to be utilized in a re-fit calculation. This setting is useful in helping to prevent defects from affecting the line fit. Filter Outliers must be On to enable this setting.

Furthest Point Filter Distance

Specifies the distance an outlier can be from the line fit and still considered a part of the line fit (valid ranges are 1 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width); any edge which is greater than this value will be ignored.
Re-Score

Specifies that the edges will be re-scored to select edges which are closer to the line fit.

0 = Off (default) | The function will not re-score the edges to account for outliers.
1 = On | The function will re-score the edges to account for outlier edges in its calculation.
Re-Fit

Specifies that the function will re-fit the line fit after the edges have been re-scored. Enabling this functionality helps the accuracy of the line fit, however it adds processing time.

0 = Off (default) | The function will not attempt to re-fit the line fit.
1 = On | The function will re-fit the line fit after the edges have been re-scored.

Max Number of Defects/Gaps

Specifies the maximum number of defects and/or gaps the function should expect to detect (1 to 4096; default = 5). This value is applied to Defects and Gaps individually; e.g. when the setting is 5, the function expects to encounter a maximum of 5 Defects and 5 Gaps. This setting is used to construct the Vision Data Access Result Table in the spreadsheet.

Defects

Specifies the parameters for determining defects in the edge from the line fit.

Min Distance

Specifies that any distance, in pixels (valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default = 3 pixels), from the edge and the line fit less than this value is not a defect.

Max Distance

Specifies that any distance, in pixels (valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width), from the edge and the line fit greater than this value is not a defect.

Note: If this value is less than the Min Distance parameter, the function will result in a #ERR.

Size Enabled

Specifies whether or not the function will account for size defects. Size defects account for the length along the edge.

Note: When Size Enabled and Area Enabled are both On, only defects which fail both conditions will be displayed.
0 = Off | The function will not account for size defects.
1 = On (default) | The function will account for size defects, based on the Min Size and Max Size parameter settings.
Min Size | Specifies the minimum defect size, in pixels (valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default = 3 pixels); continuous deviations from the line fit which are less than this value are not considered defects.
Max Size | Specifies the maximum defect size, in pixels (valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's width); continuous deviations from the line fit which are greater than this value are not considered defects.
Area Enabled

Specifies whether or not the function will account for area defects. Area defects account for the length along the line fit and how far the defective edge is from the line fit.

Note: When Size Enabled and Area Enabled are both On, only defects which fail both conditions will be displayed.
0 = Off | The function will not account for area defects.
1 = On (default) | The function will account for area defects, based on the Min Area and Max Area parameter settings.
Min Area | Specifies the minimum area defect, in pixels (valid range is from 0 to 1000000; default is 10); an area less than this value is not considered a defect.
Max Area | Specifies the maximum area defect, in pixels (valid range is from 0 to 1000000; default is 1000000); an area greater than this value is not considered a defect.
Defect Line Fit Filter

Specifies whether or not to filter defects based on their position relative to the line fit.

0 = No Filter (default) | The function will return defects on both sides of the line fit.
1 = Ignore Left of Line Fit | The function will filter the left side defects, only returning defects found on right side of the line fit.
2 = Ignore Right of Line Fit | The function will filter the right side defects, only returning defects found on left side of the line fit.
Sort Criteria

Specifies how the detected defects will be sorted.

By Size (default) | The function will sort detected defects by their size, from the largest to smallest.
By Area | The function will sort detected defects by their area, from the largest to smallest.
By Position | The function will sort detected defects by their Caliper index.

Gaps

Specifies the parameters for determining gaps in the edge.

Enabled

Specifies whether or not the function will account for gaps in the found edge.

0 = Off | The function will not account for gaps.
1 = On (default) | The function will account for gaps, based on the other Gaps parameter settings.

Gap Minimum

Specifies the minimum gap, in pixels (valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default = 3 pixels); gaps less than this value are not considered to be gaps.

Gap Maximum

Specifies the maximum gap, in pixels (valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width); gaps greater than this value are not considered to be gaps.
Max Displacement

Specifies the maximum displacement, in pixels (valid ranges are 1 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width), from the line fit to be considered a gap; this setting acts as a filter to remove edges which are detected but are not along the same line fit as the other detected edges.

Note: If the Inspect Edge Pairs parameter is enabled, the maximum displacement is measured, in pixels, from the center of the region to the center of the edge pair. If this distance is more than the Max Displacement parameter value, it will be considered a gap.
Ignore Gap Ends

Specifies whether or not the function will account for gaps detected at the beginning and end of the ROI.

0 = Off | The function will not account for gaps detected at the beginning and end of the ROI.
1 = On (default) | The function will account for gaps detected at the beginning and end of the ROI.
Sort Criteria

Specifies how the detected gaps will be sorted.

By Size (default) | The function will sort detected gaps by their size, from the largest to smallest.
By Position | The function will sort detected gaps by their Caliper index.

Caliper Index

Specifies the Caliper to be displayed on the image (the Caliper will be outlined in green); default Caliper displayed is 0.

Show

Specifies the display mode for the graphic overlay on the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the InspectEdgeForDefect function is highlighted in the spreadsheet.
1 = result graphics only | The line fit, detected defects, outlier points and/or gaps will be displayed at all times.
2 = result graphics and found edge | The line fit, detected defects, outlier points and/or gaps, and detected edge points will be displayed at all times.
3 = result graphics and caliper detail | The line fit, detected defects, outlier points and/or gaps, detected edge points, and the indexed Caliper window will be displayed at all times.
4 = show all: input and result graphics | Both the input region, line fit, detected defects, outlier points and/or gaps, and detected edge points will be displayed at all times.

InspectEdgeForDefect Outputs

Returns

An Inspect data structure containing the detected defects, extremes and gaps, or #ERR if any of the input parameters are invalid.

Results

When InspectEdgeForDefect is initially inserted into a cell, a results table is created in the spreadsheet, and the result table corresponds to the type of search being performed.

Closed Example - Default Straight Line Fit Edge Result Table

Closed Example - Default Circle Line Fit Edge Result Table

Closed Example - Default Edge Pair Result Table

Note: If the value of the Max Number of Defects/Gaps parameter is greater than zero, InspectEdgeForDefect will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 defects/gaps/edges/edge pairs in the data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end.

InspectEdgeForDefect Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the InspectEdgeForDefect data structure result table, which is broken into four sections, Summary, Defects, Gaps and Extremes:

Note:

All of the formulas for the InspectEdgeForDefect conform to the following:

  • Inspect = An Inspect data structure output by an InspectEdgeForDefect function
  • Caliper Index = 0 to N (the total number of Calipers is equal to the number of Calipers output by the InspectEdge function that the InspectEdgeForDefect function is referencing)
  • Edge Pair Index = 0 or 1
  • Edge Index = 0 to N
  • Point Index = 0 to 1

If the Inspect Edge Pairs parameter is enabled, additional rows of data for Edge 1 will be automatically inserted into the spreadsheet. When enabled, an index of 0 will return information regarding Edge 0, and an index of 1 returns information regarding Edge 1.

For more information, see InspectEdge.

Spreadsheet Name | Function Name | Description
Summary
Defects/Gaps | GetDefectGapCount(Inspect, [Edge Pair Index], [Defect/Gap]) | Returns the number of defects/gaps, depending on which is specified. Defect = 0, Gap = 1.
Row0/1 | GetFitEdgeRow(Inspect, [Edge Pair Index], [Point Index]) | Returns the row coordinate of the specified point.
Col0/1 | GetFitEdgeCol(Inspect, [Edge Pair Index], [Point Index]) | Returns the column coordinate of the specified point.
Center Row | GetFitEdgeCenterRow(Inspect, [Edge Pair Index]) | Inserted when a Circle Line Fit is specified, returns the row coordinate of the center of the circle line fit.
Center Col | GetFitEdgeCenterCol(Inspect, [Edge Pair Index]) | Inserted when a Circle Line Fit is specified, returns the column coordinate of the center of the circle line fit.
Radius | GetFitEdgeRadius(Inspect, [Edge Pair Index]) | Inserted when a Circle Line Fit is specified, returns the distance from the center of the circle line fit for the selected Edge Pair.
Defects/Gaps
Size/Area | GetDefectGapValue(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index], [Size/Area/Width]) | Returns the size or area of the defect or gap. Defect = 0, Gap = 1; Size = 0, Area = 1, Width = 2.
Row | GetDefectGapBoundsRow(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the row coordinate of the defect's bounding rectangle. Defect =0, Gap = 1.
Col | GetDefectGapBoundsCol(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the column coordinate of the defect's bounding rectangle. Defect =0, Gap = 1.
High | GetDefectGapBoundsHigh(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the height of the defect's bounding rectangle. Defect =0, Gap = 1.
Wide | GetDefectGapBoundsWide(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the width of the defect's bounding rectangle. Defect =0, Gap = 1.
Angle | GetDefectGapBoundsAngle(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the angle of the defect's bounding rectangle. Defect =0, Gap = 1.
Curve | GetDefectGapBoundsCurve(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the curve of the defect's bounding rectangle. Defect =0, Gap = 1.
Start/End | GetDefectGapCaliperIndex(Inspect, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index], [Defect Start/End]) | Returns the Caliper in which the defect starts or ends. Defect =0, Gap = 1; Start = 0, End = 1.
Extremes - Furthest Point 1/2
Caliper | GetExtremePoints(Inspect, [Edge Pair Index], [Near/Far]) | Returns the index of the Caliper whose edge is furthest from the line fit (Near = 0 and Far = 1).
Row | GetEdgeRow(Inspect, [Caliper Index], [Edge Index], [Edge Pair Index]) | Returns the row coordinate of the referenced edge.
Col | GetEdgeCol(Inspect, [Caliper Index], [Edge Index], [Edge Pair Index]) | Returns the column coordinate of the referenced edge.
Distance | GetEdgeFromFit(Inspect, [Caliper Index], [Edge Pair Index]) | Returns the distance from the referenced Caliper's edge to the line fit.


InspectEdgePosition

The InspectEdgePosition function is used to construct an edge model to perform advanced edge analysis on the edges returned by an InspectEdge function. This data is used determine the location of edges, identifying outlier edges, and optionally constructing a line fit.

After inserting the function into the spreadsheet, a reference must be made to an Inspect data structure output by an InspectEdge function. Once the reference to the InspectEdge function has been established, the edge model is created by configuring the parameters of the InspectEdgePosition function. The edge model involves defining the following:

  • The type of line fit - straight or circular.
  • The direction in which to detect edges.
  • The type of edge transition - white to black or vice-versa.
  • The edge scoring criteria that will be used to filter unwanted edges.
  • The line fit criteria that will be used to filter unwanted edges from the line fit.

Once the edge model has been established, the function will compare edge candidates against the edge model and report deviations from the model.

InspectEdgePositionInputs

Syntax:InspectEdgePosition(InspectEdge,Line Fit,Find Edge Direction,Edge: First,Edge Scoring.Score Threshold,Edge Scoring.Edge Rules,Edge Scoring.Contrast Upper Bound,Advanced Line Fit.Filter Outliers,Advanced Line Fit.Fit Distance Filter,Advanced Line Fit.Furthest Point Filter Distance,Advanced Line Fit.Fit Re-Score,Advanced Line Fit.Fit Re-Fit,Caliper Index,Show)

Parameter Description

InspectEdge

 Specifies a reference to a spreadsheet cell that contains a valid Inspect data structure returned by an InspectEdge function.

Line Fit

Specifies the type of line fit to be constructed out of the detected edges.

0 = None | The function will not create a line fit. The position of found edges is measured relative to the center of the ROI.
1 = Straight Line Fit | The function will create a straight line fit from the detected edges. The position of found edges is measured relative to the line fit.
2 = Circle Line Fit | The function will create a circular line fit from the detected edges. The position of found edges is measured relative to the line fit.
3 = Auto Fit (default) | The function automatically creates either a straight line or circular fit, based on the referenced Region.

Find Edge Direction

Specifies the direction in which the function will attempt to detect edges. Dark green arrows are added to graphically illustrate the direction in which the edge will be detected. Fit lines will be labeled graphically within the image, with the first fit line being labeled 0, and the second fit line being 1.

Note: If the ROI of the referenced InspectEdge function is bent into a curve, the inspection will be relative to the curve’s center. When the Find Edge Direction parameter is set to Left-to-Right, it inspects towards the curve’s center, and when set to Right-to-Left, it inspects away from the curve’s center.
0 = Left-to-Right (default) | The function will attempt to detect edges from the left of the ROI to the right. Closed Example
1 = Right-to-Left | The function will attempt to detect edges from the right of the ROI to the left. Closed Example

Edge: First

Specifies the contrast transition of the first edge to be detected, as determined by the Find Edge Direction parameter.

1 = Black-to-White | The edge transitions from black pixels to white pixels.
2 = White-to-Black (default) | The edge transitions from white pixels to black pixels.
3 = Either | The edge can transition from either black-to-white, or white-to-black, and the function will determine the proper transition. Specifying the transition improves the performance of the function.

Edge Scoring

Specifies the edge scoring mode that will be used to determine whether or not an edge meets the established criteria.

Score Threshold

Specifies a scoring threshold to filter out edges with scores (0 to 100; default = 10) lower than this value.

Edge Rules

Specifies the type of edge that is most important when calculating the score.

1 = First | The first edge detected receives the highest consideration.
2 = Strongest | The edge with the strongest contrast transition receives the highest consideration.
3 = First Strongest (default) | The first edge detected, with the strongest transition, receives the highest consideration.

Contrast Upper Bound

Specifies the upper limit of the edge contrast transition (2 to 255; default = 255) to be considered an edge; edges with an edge contrast transition above this value will have the same highest score.

Advanced Line Fit

Specifies how the function should construct the line fit.

Filter Outliers

Specifies that the function will remove points from the Fit Line that are further than the distance specified in the Fit Distance Filter parameter.

0 = Off (default) | The function will not account for outlier edges.
1 = On | The function will account for outlier edges in its calculation.

Fit Distance Filter

Specifies the distance, in pixels (valid ranges are 1 to 3 times the In-Sight vision system's image width; default = 2), from which an edge must be from the original Fit Line to be utilized in a re-fit calculation. This setting is useful in helping to prevent defects from affecting the line fit. Filter Outliers must be On to enable this setting.

Furthest Point Filter Distance

Specifies the distance an outlier can be from the line fit and still considered a part of the line fit (valid ranges are 1 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width); any edge which is greater than this value will be ignored.
Re-Score

Specifies that the edges will be re-scored to select edges which are closer to the line fit.

0 = Off (default) | The function will not re-score the edges to account for outliers.
1 = On | The function will re-score the edges to account for outlier edges in its calculation.
Re-Fit

Specifies that the function will re-fit the line fit after the edges have been re-scored. Enabling this functionality helps the accuracy of the line fit, however it adds processing time.

0 = Off (default) | The function will not attempt to re-fit the line fit.
1 = On | The function will re-fit the line fit after the edges have been re-scored.

Caliper Index

Specifies the Caliper to be displayed on the image (the Caliper will be outlined in green); default Caliper displayed is 0.

Show

Specifies the display mode for InspectEdgePosition graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the InspectEdgePosition function is highlighted in the spreadsheet.
1 = result graphics only | The line fit, detected defects, outlier points and/or gaps will be displayed atall times.
2 = result graphics and caliper detail | The line fit, detected defects, outlier points and/or gaps, detected edge points, and the indexed Caliper window will be displayed at all times.
3 = show all: input and result graphics | Both the input region, line fit, detected defects, outlier points and/or gaps, and detected edge points will be displayed at all times.

InspectEdgePosition Outputs

Returns

An Inspect data structure containing the matching edges sorted by score, or #ERR if any of the input parameters are invalid.

Results

When InspectEdgePosition is initially inserted into a cell, a results table is created in the spreadsheet.

Closed Example - Default Straight Line Fit Edge Result Table

Closed Example - Default Circular Line Fit Edge Result Table

InspectEdgePositionVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the InspectEdgePosition data structure result table, which is broken into two sections, Furthest Points and Straight Line Fit:

Spreadsheet Name | Function Name | Description
Furthest Points
Point 1/Point 2 | GetExtremePosPoints(Inspect, Side) | Returns the index of the Caliper whose edge is furthest from the line fit on either side (Near = 0 and Far = 1), or, if the Line Fit is set to None, returns the points nearest either edge of the Region.
Row | GetEdgePosRow(Inspect, Caliper Index, Edge Index) | Returns the row coordinate of the specified Caliper's edge position.
Col | GetEdgePosCol(Inspect, Caliper Index, Edge Index) | Returns the column coordinate of the specified Caliper's edge position.
Straight Line Fit
Row0/Row1 | GetFitEdgePosRow(Inspect, Point Index) | Returns the row coordinate of the specified point of the line fit.
Col0/Col1 | GetFitEdgePosCol(Inspect, Point Index) | Returns the column coordinate of the specified point of the line fit.
Center Row | GetFitEdgePosCenterRow(Inspect, Point Index) | Inserted when a Circle Line Fit is specified, returns the row coordinate of the center of the circle line fit.
Center Col | GetFitEdgePosCenterCol(Inspect, Point Index) | Inserted when a Circle Line Fit is specified, returns the column coordinate of the center of the circle line fit.
Radius | GetFitEdgePosRadius(Inspect, Point Index) | Inserted when a Circle Line Fit is specified, returns the distance from the center of the circle line fit.

For more information, see InspectEdge.

Note:

All of the formulas for the InspectEdgePosition conform to the following:

  • Inspect = An Inspect data structure output by an InspectEdgePosition function
  • Caliper Index = 0 to N (the total number of Calipers is equal to the number of Calipers output by the InspectEdge function that the InspectEdgeForDefect function is referencing)
  • Edge Pair Index = 0 or 1
  • Edge Index = 0 to N
  • Point Index = 0 to 1 (0 = Start and 1 = End)


InspectEdgeWidth

The InspectEdgeWidth function is used to construct an edge model to perform advanced edge analysis on the edge pairs returned by an InspectEdge function. This data is used to detect edge pairs and analyze the distance between them. For more information, see InspectEdge.

InspectEdgeWidth Overview

After inserting the function into the spreadsheet, a reference must be made to an Inspect data structure output by an InspectEdge function. Once the reference to the InspectEdge function has been established, the edge model is created by configuring the parameters of the InspectEdgeWidth function. The edge model involves defining the following:

  • The direction in which to detect edges.
  • The type of edge transition - white to black or vice-versa.
  • The edge scoring criteria that will be used to filter unwanted edges.
  • The line fit criteria that will be used to filter unwanted edges from the line fit.
  • The tolerances for width variances, defects and/or gaps to be encountered.

Once the edge model has been established, the function will compare edge candidates against the edge model and report deviations from the model.

InspectEdgeWidthInputs

Syntax:InspectEdgeWidth(InspectEdge,Find Edge Direction,Edge: First,Edge: Second,Edge Scoring.Score Threshold,Edge Scoring.Edge Rules,Edge Scoring.Contrast Upper Bound,Edge Scoring.Pair Size,Advanced Filter.Re-Score,Advanced Filter.Line Fit,Advanced Filter.Filter Outliers,Advanced Filter.Fit Distance Filter,Max Number of Defects/Gaps,Defects.Min Width,Defects.Max Width,Defects.Size Enabled,Defects.Min Size,Defects.Max Size,Defects.Area Enabled,Defects.Min Area,Defects.Max Area,Defects.Sort Criteria,Gaps.Enabled,Gaps.Gap Minimum,Gaps.Gap Maximum,Gaps.Max Displacement,Gaps.Ignore Gap Ends,Gaps.Sort Criteria,Position.Enabled,Position.Min Distance,Position.Max Distance,Position.Size Enabled,Position.Min Size,Position.Max Size,Position.Area Enabled,Position.Min Area,Position.Max Area,Position.Sort Criteria,Caliper Index,Show)

Parameter Description

InspectEdge

Specifies a reference to a spreadsheet cell that contains a valid Inspect data structure returned by an InspectEdge function.

Find Edge Direction

Specifies the direction in which the function will attempt to detect edges. Dark green arrows are added to graphically illustrate the direction in which the edge will be detected. Fit lines will be labeled graphically within the image, with the first fit line being labeled 0, and the second fit line being 1.

Note: If the ROI of the referenced InspectEdge function is bent into a curve, the inspection will be relative to the curve’s center. When the Find Edge Direction parameter is set to Left-to-Right, it inspects towards the curve’s center, and when set to Right-to-Left, it inspects away from the curve’s center.
0 = Left-to-Right | The function will attempt to detect edges from the left of the ROI to the right. Closed Example
1 = Right-to-Left | The function will attempt to detect edges from the right of the ROI to the left. Closed Example
3 = Center Outward (default) | The function will attempt to detect edges from the center of the ROI to the upper and lower bounds of the ROI (the order of the found edges will be in the opposite direction of the "X" arrow on the ROI). Closed Example Note: The Inspect Edge Pairs parameter must be On to enable this selection.
2 = Outside In | The function will attempt to detect edges from the upper and lower bounds of the ROI to the center of the ROI (the order of the found edges will be in the opposite direction of the "X" arrow on the ROI). Closed Example Note: The Inspect Edge Pairs parameter must be On to enable this selection.

Edge: First

Specifies the contrast transition of the first edge to be detected, as determined by the Find Edge Direction parameter.

1 = Black-to-White | The edge transitions from black pixels to white pixels.
2 = White-to-Black (default) | The edge transitions from white pixels to black pixels.
3 = Either | The edge can transition from either black-to-white, or white-to-black, and the function will determine the proper transition. Specifying the transition improves the performance of the function.

Edge: Second

Specifies the contrast transition of the second edge to be detected, as determined by the Find Edge Direction parameter.

Note: The Inspect Edge Pairs parameter must be On to enable this selection.
1 = Black-to-White (default) | The edge transitions from black pixels to white pixels.
2 = White-to-Black | The edge transitions from white pixels to black pixels.
3 = Either | The edge can transition from either black-to-white, or white-to-black, and the function will determine the proper transition. Specifying the transition improves the performance of the function.

Edge Scoring

Specifies the edge scoring mode that will be used to determine whether or not an edge meets the established criteria.

Score Threshold

Specifies a scoring threshold to filter out edges with scores (0 to 100; default = 10) lower than this value.

Edge Rules

Specifies the type of edge that is most important when calculating the score.

1 = First | The first edge detected receives the highest consideration.
2 = Strongest | The edge with the strongest contrast transition receives the highest consideration. Note: When the Inspect Edge Pairs parameter is On, the score will be based on the average contrast value of two edges.
3 = First Strongest (default) | The first edge detected, with the strongest transition, receives the highest consideration.
4 = Edge Pair Size | The edge pair detected with the size closest to the Pair Size parameter receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.
5 = First Edge Pair Size | The first edge pair detected with the size closest to the Pair Size parameter receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.
6 = Strongest Edge Pair Size | The edge pair detected with the strongest transition and the size closest to the Pair Size parameter receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.
7 = First Strongest Edge Pair Size | The first edge pair, with the strongest transition and the size closest to the Pair Size parameter, receives the highest consideration; the Inspect Edge Pairs parameter must be On to enable this selection.

Contrast Upper Bound

Specifies the upper limit of the edge contrast transition (2 to 255; default = 255) to be considered an edge; edges with an edge contrast transition above this value will have the same highest score.

Note: The Edge Rules parameter must be set to either Strongest, First Strongest, Strongest Edge Pair Size or First Strongest Edge Pair Size to enable this parameter.

Pair Size

Specifies the edge pair size at which the highest score is achieved (valid range is 1 to 3 times the In-Sight vision system's image width; default = 5). When this parameter is enabled, edge pairs detected above or below this value are scored proportionally to this value. For example, if the Pair Size is set to 10, and two edge pair candidates are detected, one with a value of 8 and another with 14, the edge pair with a value of 8 would be selected because it is closer to the limit than the second edge pair.

Note: The Inspect Edge Pairs parameter must be On, and the Edge Rules parameter must be set to either Edge Pair Size, First Edge Pair Size, Strongest Edge Pair Size or First Strongest Edge Pair Size to enable this parameter.

Advanced Filter

Specifies how the function should construct the line fit.

Re-Score

Specifies that the edges will be re-scored to select edges which are closer to the line fit.

0 = Off (default) | The function will not re-score the edges to account for outliers.
1 = On | The function will re-score the edges to account for outlier edges in its calculation.

Line Fit

Specifies the type of line fit to be constructed out of the detected edges.

1 = Straight Line Fit | The function will create a straight line fit from the detected edges.
2 = Circle Line Fit | The function will create a circular line fit from the detected edges.
3 = Auto Fit (default) | The function automatically creates either a straight line or circular fit, based on the referenced Region.

Filter Outliers

Specifies that the function will remove points from the Fit Line that are further than the distance specified in the Fit Distance Filter parameter.

0 = Off (default) | The function will not account for outlier edges.
1 = On | The function will account for outlier edges in its calculation.

Fit Distance Filter

Specifies the distance, in pixels (valid ranges are 1 to 3 times the In-Sight vision system's image width; default = 2), from which an edge must be from the original Fit Line to be utilized in a re-fit calculation. This setting is useful in helping to prevent defects from affecting the line fit. Filter Outliers must be On to enable this setting.

Max Number of Defects/Gaps

Specifies the maximum number of defects and/or gaps the function should expect to detect (1 to 4096; default = 5). This value is applied to Defects and Gaps individually; e.g. when the setting is 5, the function expects to encounter a maximum of 5 Defects and 5 Gaps. This setting is used to construct the Vision Data Access Result Table in the spreadsheet.

Defects

Specifies the parameters for determining defects in the edge from the line fit.

Min Width

Specifies that any width distance, in pixels, between detected edge pairs less than this value is a defect. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 pixels.

Max Width

Specifies that any width distance, in pixels, between detected edge pairs greater than this value is a defect. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width.

Note: If this value is less than the Min Width parameter, the function will result in a #ERR.

Size Enabled

Specifies whether or not the function will account for size defects. Size defects account for width deviations along the length of the detected edge pairs.

Note: When Size Enabled and Area Enabled are both On, only defects which fail both conditions will be displayed.
0 = Off | The function will not account for size defects.
1 = On (default) | The function will account for size defects, based on the Min Size and Max Size parameter settings.
Min Size | Specifies the minimum defect size, in pixels; continuous deviations from the line fit which are less than this value are not considered defects. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 pixels.
Max Size | Specifies the maximum defect size, in pixels; continuous deviations from the line fit which are greater than this value are not considered defects. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's width.
Area Enabled

Specifies whether or not the function will account for area defects.Area defects account for the length along the line fit and how far the defective edge is from the line fit.

Note: When Size Enabled and Area Enabled are both On, only defects which fail both conditions will be displayed.
0 = Off | The function will not account for area defects.
1 = On (default) | The function will account for area defects, based on the Min Area and Max Area parameter settings.
Min Area | Specifies the minimum area defect, in pixels (valid range is from 0.001 to 100000; default = 10); an area less than this value is not considered a defect.
Max Area | Specifies the maximum area defect, in pixels (valid range is from 0.001 to 1000000; default = 1000000); an area greater than this value is not considered a defect.
Sort Criteria

Specifies how the detected defects will be sorted.

By Size (default) | The function will sort detected defects by their size, from the largest to smallest.
By Area | The function will sort detected defects by their area, from the largest to smallest.
By Position | The function will sort detected defects by their Caliper index.
By Width | The function will sort detected defects by their width, from the largest to smallest.

Gaps

Specifies the parameters for determining gaps in the edge pairs.

Enabled

Specifies whether or not the function will account for gaps in the found edge pairs.

0 = Off | The function will not account for gaps.
1 = On (default) | The function will account for gaps, based on the other Gaps parameter settings.

Gap Minimum

Specifies the minimum gap, in pixels; gaps less than this value are not considered to be gaps. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 pixels.

Gap Maximum

Specifies the maximum gap, in pixels; gaps greater than this value are not considered to be gaps. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width.
Max Displacement

Specifies the maximum displacement, in pixels, from the center of the region to the center of the edge pair to be considered a gap. Valid ranges are 1 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width.
Ignore Gap Ends

Specifies whether or not the function will account for gaps detected at the beginning and end of the ROI.

0 = Off | The function will not account for gaps detected at the beginning and end of the ROI.
1 = On (default) | The function will account for gaps detected at the beginning and end of the ROI.
Sort Criteria

Specifies how the detected gaps will be sorted.

By Size (default) | The function will sort detected gaps by their size, from the largest to smallest.
By Position | The function will sort detected gaps by their Caliper index.

Position

Specifies the parameters for determining positional defects in the edge pairs. The parameters define a defect as a deviation from the center of a model path, output by an InspectEdgeTrainBeadPath function.

Note: The Position parameter group is for backward compatibility only, when referencing an InspectEdge function that is referencing an InspectEdgeTrainBeadPath function. The InspectEdgeTrainBeadPath is a legacy function and only supported for jobs created prior to firmware version 5.5.0.

Enabled

Specifies whether or not the function will account for position defects in the found edge pairs.

0 = Off (default) | The function will not account for position defects.
1 = On | The function will account for position defects, based on the other Position parameter settings.

Min Distance

Specifies the minimum positional displacement, in pixels, from the center of the detected bead path; positional variations less than this value are not considered to be position defects. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 pixels.

Max Distance

Specifies the maximum positional displacement, in pixels, from the center of the detected bead path; positional variations greater than this value are not considered to be position defects. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's image width.
Size Enabled

Specifies whether or not the function will account for size defects. Size defects account for width deviations along the length of the detected edge pairs.

Note: When Size Enabled and Area Enabled are both On, only defects which fail both conditions will be displayed.
0 = Off | The function will not account for size defects.
1 = On (default) | The function will account for size defects, based on the Min Size and Max Size parameter settings.
Min Size | Specifies the minimum defect size, in pixels; continuous deviations from the line fit which are less than this value are not considered defects. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 pixels.
Max Size | Specifies the maximum defect size, in pixels; continuous deviations from the line fit which are greater than this value are not considered defects. Valid ranges are 0.001 to 3 times the In-Sight vision system's image width; default is 3 times the vision system's width.
Area Enabled

Specifies whether or not the function will account for area defects. Area defects account for the length along the line fit and how far the defective edge is from the line fit.

Note: When Size Enabled and Area Enabled are both On, only defects which fail both conditions will be displayed.
0 = Off | The function will not account for area defects.
1 = On (default) | The function will account for area defects, based on the Min Area and Max Area parameter settings.
Min Area | Specifies the minimum area defect, in pixels; an area less than this value is not considered a defect. Valid range is from 0.001 to 100000; default is 10.
Max Area | Specifies the maximum area defect, in pixels; an area greater than this value is not considered a defect. Valid range is from 0.001 to 1000000; default is 1000000.
Sort Criteria

Specifies how the detected defects will be sorted.

By Size (default) | The function will sort detected defects by their size, from the largest to smallest.
By Area | The function will sort detected defects by their area, from the largest to smallest.
By Position | The function will sort detected defects by their Caliper index.
By Width | The function will sort detected defects by their width, from the largest to smallest.

Caliper Index

Specifies the Caliper to be displayed on the image (the Caliper will be outlined in green); default Caliper displayed is 0.

Show

Specifies the display mode for InspectEdgeWidth graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the InspectEdgeWidth function is highlighted in the spreadsheet.
1 = result graphics only | The line fit, detected defects, outlier points and/or gaps will be displayed at all times.
2 = result graphics and found edge | The line fit, detected defects, outlier points and/or gaps, and detected edge points will be displayed at all times.
3 = result graphics and caliper detail | The line fit, detected defects, outlier points and/or gaps, detected edge points, and the indexed Caliper window will be displayed at all times.
4 = show all: input and result graphics | Both the input region, line fit, detected defects, outlier points and/or gaps, and detected edge points will be displayed at all times.

InspectEdgeWidth Outputs

Returns

An Inspect data structure containing the detected defects, extremes and gaps, or #ERR if any of the input parameters are invalid.

Results

When InspectEdgeWidth is initially inserted into a cell, a results table is created in the spreadsheet.

Note: If the value of the Max Number of Defects/Gaps parameter is greater than zero, InspectEdgeWidth will automatically insert a result table containing a maximum of 10 entries that correspond to the first 10 defects/gaps/edges/edge pairs in the data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end.

InspectEdgeWidthVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see InspectEdge.

Spreadsheet Name | Function Name | Description
Total Count | GetTotalCount(Inspect) | Returns the total number of results.
Defects/Gaps/Position | GetWidthCount(Inspect, Defects/Gaps/Position) | Returns the total number of specified defects or gaps (Defects = 0, Gaps = 1, Position = 2).
Defects/Gaps/Position
Size/Area/Width/Position | GetDefectGapValue(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index, Size/Area/Width) | Returns the size, area or width of the defect or gap (Defect = 0, Gap = 1, Position = 2; Size = 0, Area = 1, Width = 2).
Row | GetDefectGapBoundsRow(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index) | Returns the row coordinate of the defect's bounding rectangle.
Col | GetDefectGapBoundsCol(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index) | Returns the column coordinate of the defect's bounding rectangle.
High | GetDefectGapBoundsHigh(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index) | Returns the height of the defect's bounding rectangle.
Wide | GetDefectGapBoundsWide(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index) | Returns the width of the defect's bounding rectangle.
Angle | GetDefectGapBoundsAngle(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index) | Returns the angle of the defect's bounding rectangle.
Curve | GetDefectGapBoundsCurve(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index) | Returns the curve of the defect's bounding rectangle.
Start/End | GetDefectGapCaliperIndex(Inspect, Defect/Gap Index, Defect/Gap/Position, Edge Pair Index, Defect Start/End) | Returns the Caliper in which the defect starts or ends (Start = 0, End = 1).
Extremes - Furthest Point 1/2
Caliper | GetExtremeWidth(Inspect, Thinnest/Thickest) | Returns the index of the Caliper which contains the specified extreme width (Thinnest = 0 and Thickest = 1).
Width | GetWidth(Inspect, Caliper Index) | Returns the width value of the edge within the indexed Caliper; returns 0 if no edges are found within the indexed Caliper.
Row (Start and End) | GetEdgePairRow(Inspect, Caliper Index, Edge Pair Index or Edge Index) | Returns the row coordinate of the referenced edge.
Col (Start and End) | GetEdgePairCol(Inspect, Caliper Index, Edge Pair Index or Edge Index) | Returns the column coordinate of the referenced edge.
Note:

All of the formulas for the InspectEdgeWidth conform to the following:

  • Inspect = An Inspect data structure output by an InspectEdgeWidth function
  • Caliper Index = 0 to N (the total number of Calipers is equal to the number of Calipers output by the InspectEdge function that the InspectEdgeForDefect function is referencing)
  • Edge Pair Index = 0 or 1
  • Edge Index = 0 to N
  • Point Index = 0 to 1

If the Position Enabled parameter is ON, an additional section of Vision Data Access functions will be inserted into the Spreadsheet that relate to Position errors.


OCV/OCR

The OCV/OCR tools read and verify text strings using trained fonts. The OCV/OCR tools includes the following functions:

  • OCRMax: Trains, reads and verifies characters in text strings.
  • OCRMaxAutoTune: Provides external access to the Auto-Tune dialog.
  • OCRMaxSettings: Provides programmatic access to segmentation parameters and other advanced text reading parameters.
  • ReadText: Reads a text string.
  • TrainFont: Trains font characters.
  • VerifyText: Verifies the characters in a text string.
Note:
  • The TrainFont, ReadText and VerifyText functions are only available on In-Sight vision systems using In-Sight firmware 4.x.x, and are not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the OCRMax function be used instead of the ReadText, TrainFont and VerifyText functions, which are legacy functions. The OCRMax function has enhanced performance capabilities.

OCV/OCR Overview

OCRMax

OCRMaxAutoTune

OCRMaxSettings

ReadText

TrainFont

VerifyText

Font Training: ReadText and VerifyText functions


OCV/OCR Overview

In-Sight Explorer provides two different methods for Optical Character Verification (OCV) and Optical Character Recognition (OCR) for inspecting alphanumeric text strings in an image: the OCRMax and OCRMaxSettings functions, and the ReadText, TrainFont and VerifyText functions.

Note: The OCRMax and OCRMaxSettings functions are only available for In-Sight vision systems running In-Sight firmware version 4.7.0 or later.

OCRMax and OCRMaxSettings Functions

ReadText, TrainFont and VerifyText Functions


OCRMax and OCRMaxSettings Functions

The OCRMax function performs OCR through a process of segmentation and classification. Segmentation occurs first and uses threshold techniques to identify the areas of the image that appear to contain lines of text. After the text has been segmented into characters, the characters are trained and stored as a font database. Classification occurs during run-time, and is responsible for “reading” any text found after the function performs segmentation. This is done by comparing the images of the segmented characters against the trained characters in the font.

Note: The OCRMax function is a self-contained function, i.e. it can perform segmentation and classification without using the OCRMaxSettings function. The OCRMaxSettings function provides advanced segmentation and classification parameters for very difficult applications, and offers programmatic control of the settings, providing support for adjustments to parameters from a remote device.

Segmentation

During the segmentation process, the OCRMax function determines the location of the line of text within the ROI, and calculates the text's angle, skew and polarity. The region is then normalized to remove unwanted noise before being binarized into foreground and background pixels. Within the binarized image, blob analysis is performed to produce character fragments, with each character fragment representing a single blob. The character fragments are then grouped together to form characters, and the characters are assigned a character rectangle.

The line of text within the ROI is split into images of the individual characters, and each character is enclosed within a non-editable character rectangle. The ROI defines the approximate location, angle and skew of the line of text. The Angle Range and Skew Range parameters on the Segmentation tab can be used to compensate for variations, if necessary.

Note: It is important to understand that the OCRMax function is not a general purpose string finder; it is not capable of finding a string in an arbitrarily complex image with a large ROI. The ROI must be configured directly over the line of text.

Classification

Once segmentation has been completed, and the characters have been trained into a font database, classification of characters in run-time images begins. Classification takes segmented character images as an input and determines the corresponding letter. By classifying all of the segmented character images in a line of text, the entire string for the whole line of text is returned.

Classification occurs after training, where the individual characters are assigned a title based on either a string of entered characters, or user-assigned values. Once a collection of characters has been trained and grouped into a font, classification involves comparing run-time images against the characters in the font and returning the best-match character, and the score for that best-match character.

Each character is trained from one or more examples of the characters to be classified. The characters are grouped together into a font, that is stored within the OCRMax function’s OCRMax data structure. The font includes all of the trained characters; each character is composed of its name and an image of its character rectangle and the information within it (e.g. the ink of the text).

Results

The function passes along additional information besides just the name of the character read in the run-time image. The function also reports the status of the character, a character classification score, a possible alternative character and the confusion score. The classification score is an indication of the closeness of the match between the character in the run-time image versus the trained instance. The confusion score is computed as the difference between the classification score (the highest scoring trained instance) and the next-highest classification score (the highest scoring trained instance from a different class; also used as the possible alternative character, i.e. the Confused With output).

The function outputs a status indicating the quality of the result ("Bad Read", "Good Read", "Ignored", "Confused", "Mismatch", "Confused Mismatch", "No Read" and "Validation Failed"), depending on the function's Inspection Mode (Read or Read/Verify). The Read/Verified status are only returned if the score and confusion scores fall within the Accept Threshold and Confusion Threshold parameters.


ReadText, TrainFont and VerifyText Functions

Note: Cognex recommends that the OCRMax function be used instead of the ReadText, TrainFont and VerifyText functions, which are legacy functions. The OCRMax function has enhanced performance capabilities.

The ReadText, TrainFont and VerifyText functions divide the OCV/OCR functionality amongst the functions. The functions that should be used depend on whether the characters in the text string are known in advance (verification), or are unknown (recognition).

Both OCV and OCR require a font containing trained models of all possible characters that will be verified or recognized. The font is trained by dividing a text string into individual segments and then extracting a character example, called an instance, from each segment. Multiple instances of the same character can be extracted and merged into a single character model. The entire collection of character models defines the font database.

During OCV, the character at each position in the text string is compared to its corresponding character model in the user-trained font. To pass verification, the match score for each character compared to its model must (1) exceed the minimum accept threshold and (2) exceed the match scores of comparisons to all other character models in the font.

During OCR, each character in the text string is compared to all characters models in the user-trained font. Optionally, the number of character model comparisons may be limited to a smaller subset of characters, which can improve reading speed and accuracy. The character model with the highest match score determines each character's identity. To pass reading, the match score for every character in the text string must (1) exceed the minimum accept threshold and (2) exceed the match score of the next best character model by the specified difference accept threshold.

About Font Training

Font training defines character models (such as A, B, C, 5, or $) that are used to identify unknown text (OCR) and to verify the correctness of text (OCV). Multiple instances of a character model are often trained to help negate the effects of slight variances that may appear in a real-world vision application. Once you have established a model for each character that will be needed in your application, the In-Sight sensor can compare known or unknown characters against these models. The OCV/OCR Font Training dialog is used to define and maintain the character models of a font database.


OCRMax

Reads and/or verifies a text string within a Region of Interest (ROI), after being trained with user-defined character fonts.

The OCRMax function performs Optical Character Recognition through a process of segmentation and classification.Segmentation occurs first and uses threshold techniques to identify the areas of the image that appear to contain lines of text.After the text has been segmented into characters, the characters are trained and stored as a font database.Classification occurs during run-time, and is responsible for “reading” any text found after the function performs segmentation.This is done by comparing the images of the segmented characters to the trained characters in the font.

During the segmentation process, the OCRMax function determines the location of the line of text within the ROI, and calculates the text's angle, skew and polarity.The region is then normalized to remove unwanted noise before being binarized into foreground and background pixels.Within the binarized image, blob analysis is performed to produce character fragments, with each character fragment representing a single blob.The character fragments are then grouped together to form characters, and the characters are assigned a character region.The character region is a tight, non-editable bounding box enclosing all of the foreground (i.e.ink) pixels in the ROI.

The line of text within the ROI is split into images of the individual characters, and each character is enclosed within a non-editable character rectangle.The ROI defines the approximate location, angle and skew of the line of text.The Angle Range and Skew Range parameters on the Segmentation tab can be used to compensate for variations, if necessary.

OCRMaxInputs

Auto-Tune: Launches the Auto-Tune dialog, which is used to automatically calculate the optimal Segmentation parameters, and train a font database.With one or more images loaded, and with the Auto-Tune dialog running, each image is examined to verify that the characters are being correctly segmented and classified.If the characters are not being correctly segmented, the OCRMax function's Auto-Tune algorithm will calculate the optimal Segmentation parameters that segment the current image, as well as the previously trained images.As more images are trained, the OCRMax function's Auto-Tune algorithm will become more reliable and accurate.Once satisfactory results are achieved, the Auto-Tune dialog is closed, the new Segmentation parameters are applied and the font database is updated with the newly trained characters.

The Auto-Tune dialog provides two primary advantages over manually tuning the Segmentation parameters:

  • Images only need to be cycled through once, instead of twice (once to tune the Segmentation parameters, and the second to train).
  • Read accuracy should improve because the characters are trained automatically with the Segmentation parameters obtained during the tuning process.
Note: The OCRMaxAutoTune function provides external access to the Auto-Tune dialog, for use with external devices, such as the VisionView Operator Interface Panel.For more information, see OCRMaxAutoTune or Auto-Tune.

General Tab

Syntax: OCRMax(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Font,External Settings,Train Mode,Train String,Train Font,Clear Font,Inspection Mode,Match String,Field String,Field Definitions,Spaces.Find Spaces,Spaces.Space Score Mode,Spaces.Space Minimum Width,Spaces.Space Maximum Width,Accept Threshold,Confusion Threshold,Use Subsampling,Timeout,Output Image Graphic,Character Label Position,Show Diagnostics,Curved Region Position,Reset,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.

The X-axis of the ROI should be parallel to the baseline of the text, and the Y-axis should be parallel to the vertical strokes of the characters; if there is no skew, the Y-axis is perpendicular to the X-axis.The positive direction of the X-axis corresponds to the reading direction.

Note: The baseline of the text may have any angle (0-360) in the image, as long as the ROI is oriented at approximately the same angle.

The ROI should only contain one line of text to be read, and some surrounding background.The background can be noisy and have significant background gradients/shading.In images with text that are clearly printed and have little noise, the ROI may be significantly larger than the line of text.For noisy images, the ROI should be relatively tight around the line of text.

Note: The ROI shouldn’t contain any other significant features in the image, other than the line of text.For example, the ROI shouldn’t partially enclose a different line of nearby text, or the edge of a label.

As an approximate rule of thumb, the ROI should be larger than the line of text by at least half a character width on all sides, if possible (i.e.unless a border that large would cause other features to be enclosed within the ROI).

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Font

Optionally, specifies a cell reference to a datastructure output by another OCRMax function, containing a trained font.

Note: If a reference is set, and the trained characters are edited in the function referencing the trained font, the changes to the trained characters will not be undone if the Undo button is pressed.

External Settings

Optionally, specifies a cell reference to a data structure output by an OCRMaxSettings or GetInternalSettings function.If the Export to Cell option has been utilized, this parameter will automatically be set as an absolute cell reference to the newly created OCRMaxSettings function's Settings data structure.For more information, see OCRMaxSettings

Note:
  • If this parameter is set as a reference to an OCRMaxSettings function, the Segmentation parameters will be disabled (use the GetInternalSettings function if the parameters need to remain enabled).Set this parameter to 0 to re-enable the Segmentation parameters.
  • The Auto-Tune dialog will be unavailable if this parameter is set as a reference to an OCRMaxSettings or GetInternalSettings function (this parameter must be set to 0 to enable the Auto-Tune dialog). For more information about enabling the Auto-Tune dialog in conjunction with a GetInternalSettings function, see GetInternalSettings(OCRMax)

Train Mode

Specifies the font training behavior.

0 = Add All Characters to Font | When the Train Font parameter is activated, all of the characters in the ROI will be added to the font.
1 = Add New Characters to Font (default) | When the Train Font parameter is activated, only new characters in the ROI will be added to the font.
2 = Replace Trained Characters in Font | When the Train Font parameter is activated, all of the trained characters will be replaced with those currently in the ROI.
3 = Replace Entire Font | When the Train Font parameter is activated, all of the characters in the font will be replaced with those currently in the ROI.

Train String

Specifies the text string to be trained.

Note: The OCRMax function only supports training ASCII characters.

Train Font

Specifies the event on which to train the characters, based on the Train Mode parameter setting.

Clear Font

Specifies an event on which all of the characters in the font will be removed.

Note: The Train Font and Clear Font parameters can reference the same event, which will initiate the removal of all the characters in the font, and retraining based on the current characters within the ROI.

Inspection Mode

Specifies the inspection mode of the function during run-time.

Read (default) | The function will attempt to read the characters in the ROI, based on trained instances of the characters.
Read/Verify | The function will attempt to first read the characters in the ROI, based on trained instances of the characters, and then verify that the read characters correspond to the text string specified in the Match String parameter.

Match String

Specifies the text string that must be correctly matched when in Read/Verify Inspection Mode.

Field String

Specifies the number of characters containedin the character string.Fielding is used to provide information about what characters are expected at different positions in the string.Use the controls in the Fielding tab to construct the Field String and Field Definitions (if necessary).

Note: This parameter is only available when the Inspection Mode parameter is set to Read.

Field Definitions

Optionally, the FieldDefinitions setting can be used to create user-defined entriesfor the FieldString.When included in the FieldString, these entries restrict the list of valid characters atthe positions in which they are inserted.Use the controls in the Fielding tab to construct the Field String and Field Definitions (if necessary).

Note: This parameter is only available when the Inspection Mode parameter is set to Read.

Spaces

Specifies how the function will account for spaces between characters, if necessary.The OCRMax function processes inter-character gaps by classifying them as space characters, and these are user-defined.

Find Spaces

Specifies how the function will handle the insertion of space characters into gaps between other characters.

0 = None (default) | The function will never insert a space character, regardless how large the inter-character gap between characters.
1 = Insert Single Space | The function will insert a single space character per inter-character gap, regardless how large the inter-character gap between characters.
2 = Insert Multiple Spaces | The function will insert x-number (zero or more) of space characters per inter-character gap.

Space Score Mode

Specifies how the function will calculate scores for space characters.

0 = Always Score 100 (default) | Space characters will always receive a score of 100.
1 = Score Based on Clutter | The score of a space character is based on the fraction of pixels that are background; a space character that consists entirely of background pixels will receive a score of 100.

Space Minimum Width

Specifies the minimum width of a space character, in pixels (0 - 1000; default = 10).

Space Maximum Width

Specifies the maximum width of a space character, in pixels (0 - 1000; default = 100).

Accept Threshold

Specifies the minimum acceptable match score(0 to 100; default = 80) for eachcharacter.Any character with a match score below the Accept Thresh will fail.

Confusion Threshold

Specifies the minimum difference required between thematch scores of the highest scoring character and the second highest scoringcharacter (0 to 40; default = 0).

Use Subsampling

Specifies whether or not to enable image subsampling, which decreases character resolution to increase the reading speed of the function.

0 = Off (default) | Specifies that the function will not perform subsampling.
1 = On | Specifies that the function will perform subsampling.

Timeout

Specifies the amount of time, in milliseconds(0 to 30000; default = 5000), that the functionwill search for characters before execution is halted and an#ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Output Image Graphic

Specifies the type of output image that should be displayed.

0 = Input Image (default) | The input image will be displayed.
1 = Normalized Image | The normalized image will be displayed.
2 = Binarized Image | The binarized image will be displayed.

Character Label Position

Specifies where to display each character's label in relation to the character region.

0 = Above Character (default) | Each character label will be displayed above the character region.
1 = Right of Character | Each character label will be displayed to the right of the character region.
2 = Below Character | Each character label will be displayed below the character region.
3 = Left of Character | Each character label will be displayed to the left of the character region.

Show Diagnostics

Specifies which type of graphical diagnostic data to display on the image.

0 = hide all (default) | All graphical diagnostic data will be hidden, exceptwhen the cell containing the OCRMax function is highlighted in the spreadsheet.
1 = show rejected characters only | Regions around rejected characters will be drawn in red, and the mainline of the text will be enclosed in a blue rectangle. Closed Example
2 = show kept fragments only | Regions around kept fragments will be drawn in cyan, and the mainline of the text will be enclosed in a blue rectangle. Closed Example
3 = show rejected fragments only | Regions around rejected fragments will be drawn in yellow, and the mainline of the text will be enclosed in a blue rectangle. Closed Example
4 = show all | Regions will be drawn around kept characters (green), rejected characters (red), kept fragments (cyan), rejected fragments (yellow), the mainline of the text (blue) and the extended mainline of the text (magenta).

Curved Region Position

Specifies the X and Y coordinates for where the straightened Region will be placed in the image, when a curved Region is used.

Note: This parameter is only enabled if the Region parameter Curve value is greater than 0.
X | Specifies the X coordinate where the Region should be positioned.
Y | Specifies the Y coordinate where the Region should be positioned.

Reset

Specifies that the Segmentation tab parameters will be reset to their default settings, clear font information and remove any Auto-Tune record (.rec) files associated with the function.OCRMaxSettings

Note: This button is disabled if the External Settings parameter is set as a reference to a GetInternalSettings or OCRMaxSettings function. For more information, see GetInternalSettings(OCRMax) or OCRMaxSettings.

Show

Specifies which OCRMax graphics overlaythe image.

0 = hide all (default) | All graphics will be hidden, exceptwhen the cell containing the OCRMax function is highlighted in the spreadsheet.
1 = result graphics only | The character segments, with theircorresponding labels, will be displayed at all times.
2 = input graphics only | The input region will be displayed at all times.
3 = show all: input and result graphics | The image region, the output image graphic and the charactersegments, with their corresponding labels, will be displayed at all times.

Segmentation Tab

The Segmentation tab is used to adjust and modify the settings that segment characters in the ROI.Typically, the default values and settings will read most text, however, in more challenging cases, some parameter values may need to be adjusted.In these types of cases, specifying a minimum character width, a maximum width and/or a minimum pitch (i.e.the character-to-character distance; for example, from the left edge of one character to the left edge of the one after it) will typically address the issues.

Note:
  • The parameters on this tab may not be referenced to external cells.If cell references are required, set the External Settings parameter to reference an OCRMaxSettings function.
  • If the External Settings parameter is configured to reference an OCRMaxSettings function, the controls in the Segmentation tab will be disabled.
  • While in the Segmentation tab, the ROI can be adjusted (the Edit Graphic button is enabled) and the segmentation graphics (character rectangles) will be updated as the ROI is modified.
  • When viewing the ROI and character regions, the lines of character regions may be partially hidden by the spreadsheet overlay.When adjusting the Segmentation parameters, hide the semitransparent spreadsheet overlay to prevent the character regions from being partially occluded.

Segmentation Guidelines

  • Images that contain backgrounds with strong textures and/or so much noise that the characters blend into the background will be difficult to segment.
  • The ROI should only contain the characters to be read, and not any extraneous strong features, such as other characters or label edges.
  • In instances where two characters touch, most likely, parameters will need to be adjusted.Fixed-width touching characters can be compensated for by specifying the character width; however, proportional fonts with touching characters are problematic, with the function correctly processing some cases, but not others.
  • In cases involving short lines of text (for example, three or fewer characters) or relatively short lines with a lot of line jitter, specifying the expected Angle Range should help the function properly compensate for the inherent uncertainty in determining the orientation of a short line of text.
  • All the characters in a line of characters must have the same orientation and skew.
  • For well-separated dot-matrix print (e.g. where the dots are not touching), adjusting parameters such as the Minimum Character Fragment Size may be necessary to properly segment the characters.
  • Character stroke width must be greater than or equal to two pixels.
  • The minimum character size for large characters (typically alphanumeric) is 8 x 8 pixels.The minimum character size for small characters (such as periods) is 2 x 2 pixels.
Tip: Use the Output Image Graphic parameter to view the normalized or binarized image of the characters while adjusting the Segmentation parameters (position the OCRMax property sheet so the image is clearly visible).The normalized and binarized images can be helpful diagnostic tools for understanding and fixing problematic cases.

Export To Cell

Specifies that the current Segmentation tab parameters will be exported to a cell in the spreadsheet as an OCRMaxSettings function.Once used, the Segmentation parameters will be read-only, and the External Settings parameter will be set as a reference to the newly created OCRMaxSettings function.To re-enable the Segmentation parameters, set the External Settings parameter to zero to clear the reference to the OCRMaxSettings function.

Reset

Specifies that the Segmentation tab parameters will be reset to their default settings, clear font information and remove any Auto-Tune record (.rec) files associated with the function.

Note: This button is disabled if the External Settings parameter is set as a reference to a GetInternalSettings or OCRMaxSettings function. For more information, see GetInternalSettings(OCRMax) or OCRMaxSettings.

Segmentation Parameters

Specifies the parameter settings used to perform segmentation.

Character Polarity

Specifies the polarity of the characters in the input image.

Note: To improve the performance of the function, specify the polarity of the text.
1 = Black on White | The polarity of the text is black text on a white background.
2 = White on Black | The polarity of the text is white text on a black background.
4 = Auto (default) | The function will automatically determine the polarity of text and background.

Character Width Type

Specifies how the widths of characters in the font are expected to vary, which determines how character fragments should be merged or split.

Note: The character width is the width of the character region (e.g. the bounding box of the ink), not the ROI (which would typically include padding around the character rectangle).
1 = Auto (default) | The character width is unknown; the font may have either fixed or proportional width. Character fragments that are wider than the specified maximum character width will be split into individual characters that may or may not be of the same width, depending upon where the function determines the best place to split the character fragments.
2 = Fixed | All of the character regions in the font have the same width. Character fragments that are wider than the specified maximum character width will be split into individual characters of the same width.
4 = Variable | The characters in the font may have character regions with different widths. Character fragments that are wider than the specified maximum character width will be split into individual characters that may or may not be of the same width, depending upon where the function determines the best place to split the character fragments.

Minimum Character Width

Specifies the minimum width of a character’s character region, in pixels (1 - 1000; default = 3), that a character must have to be reported. This setting helps to filter background noise or other non-text features.

Note: If the font being read contains small text features (i.e. periods, colons, hyphens, etc.), the ability to discriminate against background noise may be limited, because setting too high a minimum value may also discard real characters.

Use Maximum Character Width

Specifies whether or not the function should account for the maximum allowable width of a character’s character region. This setting may be used to help the function determine if a character fragment should be split or merged. If the character fragment should be split, the Character Width Type parameter will determine the proper technique to be used.

0 = Off (default) | The function will not account for the maximum allowable width of a character's character region.
1 = On | The function will account for the maximum allowable width of a character's region. When enabled, a character wider than the specified value will be split into pieces that are not too wide.

Maximum Character Width

Specifies the maximum allowable width of a character’s character region, in pixels (1 - 5000; default = 100).

Note: This setting will be unavailable unless the Use Maximum Character Width parameter is enabled.

Minimum Character Height

Specifies the minimum height of a character’s character region, in pixels (1 - 1000; default = 3), that a character must have in order to be reported. This setting helps to filter background noise or other non-text features.

Note: If the font being read contains small text features (i.e. periods, colons, hyphens, etc.), the ability to discriminate against background noise may be limited, because setting too high a minimum value may also discard real characters.

Use Maximum Character Height

Specifies whether or not the function should account for the maximum allowable height of a character’s character region. This value is used in two ways: First, this value is used when finding the line, as a whole, e.g. to reject vertically adjacent noise, and/or other lines of vertically adjacent characters. Second, an individual character whose height exceeds this value will be trimmed to meet this height.

0 = Off (default) | The function will not account for the maximum allowable height of a character's character region.
1 = On | The function will account for the maximum allowable height of a character's character region.

Maximum Character Height

Specifies the maximum allowable height of a character’s character region, in pixels (1 - 5000; default = 100).

Note: This setting will be unavailable unless the Use Maximum Character Height parameter is enabled.

Use Minimum Character Aspect Ratio

Specifies whether or not the function will account for the minimum allowable aspect ratio of a character, where the aspect ratio is defined as the height of the entire line of characters, divided by the width of the character’s character region.

0 = Off | The function will not account for the minimum allowable aspect ratio of a character.
1 = On (default) | The function will account for the minimum allowable aspect ratio of a character. When enabled, a character whose aspect ratio is smaller than this value (i.e. whose width is too large) will be split into pieces that are not too wide.

Minimum Character Aspect Ratio

Specifies the minimum allowable aspect ratio (0 - 500; default = 80) of a character. This setting may be used to indirectly set the maximum width of characters by using the overall height of the line of characters, where the maximum width equals the line height, divided by the Minimum Character Aspect Ratio value. Character fragments wider than allowed by this parameter will not be merged, and will be split to form two or more character fragments that are not too wide (which is controlled by the Character Width Type parameter).

Note: This setting is unavailable unless the Use Minimum Character Aspect Ratio parameter is enabled.

Angle Range

Specifies the angel search range (0 - 45; default = 0), in degrees.

Note: If the line of text experiences angular rotation or skew, and that rotation or skew is consistent across images, configure the Region to compensate for those variances. Any value above 0 will increase the execution time of the segmentation process.

Skew Range

Specifies the skew search range (0 - 45; default = 0), in degrees.

Note: If the line of text experiences angular rotation or skew, and that rotation or skew is consistent across images, configure the Region to compensate for those variances. Any value above 0 will increase the execution time of the segmentation process.

Character Fragment Merge Mode

Specifies how the function should merge character fragments when forming characters during segmentation. Determines whether or not two character fragments are required to overlap to be considered as a part of a character, or whether or not character fragments with a horizontal gap between them may be considered as part of a character.

1 = Require Overlap (default) | Character fragments must overlap horizontally, based on the value in the Minimum Character Fragment Overlap parameter.
2 = Set Min Inter-Character Gap | Character fragments with a horizontal gap between them may be merged to form characters, where any two fragments with a gap less than the value defined in the Min Inter-Character Gap parameter will be merged.
4 = Set Min Inter-Character/Max Intra-Character Gap | Character fragments with a horizontal gap between them may be merged to form characters, with the decision to merge two fragments based on the values defined in the Min Inter-Character Gap and Max Intra-Character Gap parameters.

Minimum Character Fragment Overlap

Specifies the minimum fraction (0 - 100; default = 0) by which two character fragments must overlap each other horizontally, in order for the two character fragments to be considered as part of the same character. The default value (0) will merge any two character fragments that overlap by at least 1 pixel; larger values will require that the character fragments overlap more substantially. For applications where some character pairs are intentionally overlapped horizontally (also called kerning), or cases where the Refine stage cannot completely correct for rotation and/or skew (typically because of inconsistent printing), the default value is necessary.

Max Intra-Character Gap

Specifies the maximum horizontal gap size, in pixels (0 - 1000; default = 5), that can occur within a single character, even for damaged characters.

Note: In the most common application scenario, where the gaps that occur between adjacent characters are always wider than the gaps that may occur within a broken character, set the Min Inter-Character Gap parameter to the Max Intra-Character Gap parameter value, plus 1. For example, if characters never exhibit internal horizontal gaps, the Max Intra-Character Gap parameter would be set to 0, and the Min Inter-Character Gap parameter would be set to 1.

Min Inter-Character Gap

Specifies the minimum horizontal gap size, in pixels (0 - 1000; default = 0), that must occur between two character fragments to be belong to different characters. The gap is measured from the right edge of the character region of one character, to the left edge of the character region of the next character. If the gap between two fragments is smaller than this value, then the fragments must be considered to be part of the same character, unless the combined character would be too wide (as specified by the Maximum Character Width and/or Minimum Character Aspect Ratio parameters).

Note: In the most common application scenario, where the gaps that occur between adjacent characters are always wider than the gaps that may occur within a broken character, set the Min Inter-Character Gap parameter to the Max Intra-Character Gap parameter value, plus 1. For example, if characters never exhibit internal horizontal gaps, the Max Intra-Character Gap parameter would be set to 0, and the Min Inter-Character Gap parameter would be set to 1.

Minimum Character Fragment Size

Specifies the minimum number of foreground (i.e. text) pixels (0 - 1000; default = 15) that a character fragment must have in order to be considered for possible inclusion in a character. When setting this value, it must be set so that is small enough to keep real pieces of text, while still being large enough to exclude small fragments from background noise. For dot-matrix text and/or text that contains small characters such as periods, a smaller value may be necessary. For solid stroke text, where the characters do not tend to break up into multiple, smaller pieces, a larger value may be necessary.

Minimum Character Size

Specifies the minimum number of foreground (i.e. text) pixels (0 - 5000; default = 30) that a binarized character must have in order to be reported; characters with too few pixels will be discarded. This setting helps to filter background noise or other non-text features.

Note: If the font being read contains small text features (i.e. periods, colons, hyphens, etc.), the ability to discriminate against background noise may be limited, because setting too high a minimum value may also discard real characters.

Advanced Segmentation Parameters

Specifies additional parameters to be applied during the segmentation process.

Normalization Mode

Specifies the mode used to normalize the image, which removes background variation to utilize all 256 greyscale values (0 - 255).

Note: This setting should be the same for both training and run-time; changing this setting after training may cause classification issues.
1 = None | No normalization will be performed.
2 = Global | A global normalization is performed, using information in the whole ROI, not local variations. This option is best when the background color and text are consistent across the entire ROI; also the fastest mode.
4 = Local (default) | A local normalization is performed, using information about each local character region in the ROI to normalize the image. This option removes background gradients, and should be tried if the Global mode does not work.
8 = Local Advanced | A local normalization is performed, using information about each local character region in the ROI to normalize the image, including adjustments for not only the background, but also the contrast of the foreground. This option removes background gradients and also adjusts for inconsistent text contrast; also takes the most execution time of the three options.

Use Stroke Width Filter

Specifies whether or not to remove everything from a normalized image that does not have the same stroke width as the as the rest of the image. This option can remove some types of non-text features, such as thin lines that might otherwise connect nearby characters. This option can also remove some low-contrast background variations that might otherwise exceed the binarization threshold and create false fragments and/or interconnect nearby characters. However, using this option may cause problems if the text does not have a consistent stroke width and/or the text has significant variable contrast (e.g. parts of some strokes are very faint).

Note: This setting should be the same for both training and run-time; changing this setting after training may cause classification issues.
0 = Off | The function will not remove everything in the image that does not have the same stroke width as the rest of the fragments in the image.
1 = On (default) | The function will remove everything in the image that does not have the same stroke width as the rest of the fragments in the image.

Ignore Border Fragments

Specifies whether or not the function will completely ignore any fragments that touch any border of the ROI. Ignoring such fragments can be useful for non-text features, such as the edges of labels, that might be included within the ROI.

Note: If a fragment extends from the border of the character region to the mainline of the text, the fragment will be considered to be a character. The fragment must not extend into the mainline of the text to be excluded when this parameter is enabled.
0 = Off (default) | The function will not ignore border fragments.
1 = On | The function will ignore border fragments.

Binarization Threshold

Specifies a percentage modifier (0 - 100; default = 50) in the range that is used to compute the binarization threshold, in the normalized image, that binarizes the image between text and background. For example, the default setting of 50% would produce a binarization threshold of roughly 128 (on a 0-255 greyscale range), with 0 equaling Black on White text, and 100 equaling White on Black text. Using a value less than 50% alters the binarization threshold so that there is less text and more background, whereas using a value greater than 50% produces less background and more text. Typically, the default value will correctly binarize the image; however, in cases where there is background texture or other background variations, decreasing this value may help compensate for the background variations.

Note: This setting should be the same for both training and run-time; changing this setting after training may cause classification issues.

Character Fragment Contrast Threshold

Specifies the minimum amount of contrast [in grayscale levels (0 - 255; default = 30)] of a fragment as a whole, relative to the threshold in the normalized image, in order to be considered for possible inclusion in a character. Each foreground pixel in a fragment is always guaranteed to meet the threshold, but if all of the pixels in a fragment are very close to the threshold, then the fragment is likely just noise, rather than text. A value of 0 will prevent low-contrast fragments from being rejected.

Maximum Fragment Distance to Mainline

Specifies the distance, as a percentage of character height (0 - 1000; default = 0), that a fragment may be vertically removed from the "mainline" running horizontally through the text. Ordinarily, characters are expected to lie along a straight, horizontal line after being refined (the stage of compensating for angular orientation and skew). However, characters may sometimes exhibit "jitter," where there may be vertical drift of the characters' positions. With the default setting, these character fragments would be rejected because they do not lie along the "mainline" of characters. Increasing this parameter setting allows the function to keep fragments that do not lie along the "mainline" of characters.

Segmentation Analysis Mode

Specifies the type of character analysis mode to perform to determine the optimal character segmentation. This parameter determines whether or not to perform additional analysis beyond the Group stage.

1 = Minimal | Performs basic segmentation analysis; follows the Group stage analysis only.
2 = Standard (default) | Performs additional analysis of the line as a whole, including character spacing, to determine the optimal segmentation. When enabled, the function will be affected by the Minimum Pitch, Character Pitch Type, and Character Pitch Position parameters.

Minimum Pitch

Specifies the minimum pitch, in pixels (0 - 1000; default = 0), that can occur between two characters, where the pitch is computed based on the Character Pitch Position parameter. If the pitch between two fragments is smaller than this, then they must be considered to be part of the same character, unless the combined character would be too wide (as specified by the Maximum Character Width and/or Minimum Character Aspect Ratio parameters).

Note: If the Segmentation Analysis Mode parameter is set to Minimal, this parameter will be disabled.

Character Pitch Position

Specifies how the pitch between two successive characters should be measured. Pitch is defined as the distance between (approximately) corresponding points on adjacent characters, and not the distance from the end of one character to the beginning of the next character (which is called the inter-character gap). For fixed-pitch fonts in which the characters have different widths, typically the pitch will have a consistent value only when using the appropriate pitch metric.

Note: If the Segmentation Analysis Mode parameter is set to Minimal, this parameter will be disabled.

1 = Auto (default)

Specifies that an unknown metric is being used; the appropriate pitch may be any of the other pitch positions, or else there is not a constant pitch position (as may be the case for a proportional-pitch font), and the OCRMax function will determine the appropriate pitch metric.

2 = Left-to-Left

Specifies that pitch is measured as the distance from the left-side of a character's character region to the left-side of the adjacent character's character region.

Note: The terms "left" and "right" are relative to the coordinate axis defined by the ROI, i.e. "right" is equal to the positive X direction.

4 = Center-to-Center

Specifies that pitch is measured as the distance from the center of a character's character region to the center of the adjacent character's character region.

8 = Right-to-Right

Specifies that pitch is measured as the distance from the right-side of a character's character region to the right-side of the adjacent character's character region.

Note: The terms "left" and "right" are relative to the coordinate axis defined by the ROI, i.e. "right" is equal to the positive X direction.

Character Pitch Type

Specifies whether the spacing between successive characters has a single, fixed value, or varies, depending on the particular characters. Pitch is defined as the distance between (approximately) corresponding points on adjacent characters, and not the distance from the end of one character to the beginning of the next character (which is called the inter-character gap).

Note: If the Segmentation Analysis Mode parameter is set to Minimal, this parameter will be disabled.

1 = Auto (default)

Specifies that pitch type is unknown, but the pitch type is expected to be either fixed or proportional, and not variable. The OCRMax function will determine the best type.

2 = Fixed

Specifies that pitch is fixed, which means that the pitch between any pair of characters is constant, e.g. regardless of the width of the character rectangles of the characters. The pitch is measured based on the Character Pitch Position parameter.

4 = Proportional

Specifies that the pitch is proportional, which means that the pitch between any pair of characters depends on the particular characters. For example, the distance between two "i" lowercase letters may be much less than the distance between two "M" uppercase letters.

Note:
  • Although no pitch measurement is constant throughout a string, typically the inter-character gap, which is the distance from the right-side of one character's character region to the left-side of the adjacent character's character region, is approximately constant.
  • The terms "left" and "right" are relative to the coordinate axis defined by the ROI, i.e. "right" is equal to the positive X direction.

8 = Variable

Specifies that no character-to-character distance metric is consistent throughout a string, e.g. character placement is erratic, and the pitch is neither fixed nor proportional. The OCRMax function should not try to determine the type of pitch.

Note: Variable pitch is different from Auto, since Auto assumes that the pitch is either fixed or proportional, but which is not known.

Output Image Graphic

Specifies the type of output image that should be displayed.

Note: This parameter temporarily over-rides the Output Image Graphic parameter in the General tab.After exiting the Segmentation tab, the Output Image Graphic parameter setting in the General tab will be restored.
0 = Input Image (default) | The input image will be displayed.
1 = Normalized Image | The normalized image will be displayed.
2 = Binarized Image | The binarized image will be displayed.

Show Diagnostics

Specifies which type of graphical diagnostic data to display on the image.

0 = hide all (default) | All graphical diagnostic data will be hidden, exceptwhen the cell containing the OCRMax function is highlighted in the spreadsheet.
1 = show rejected characters only | Regions around rejected characters will be drawn in red, and the mainline of the text will be enclosed in a blue rectangle. Closed Example
2 = show kept fragments only | Regions around kept fragments will be drawn in cyan, and the mainline of the text will be enclosed in a blue rectangle. Closed Example
3 = show rejected fragments only | Regions around rejected fragments will be drawn in yellow, and the mainline of the text will be enclosed in a blue rectangle. Closed Example
4 = show all | Regions will be drawn around kept characters (green), rejected characters (red), kept fragments (cyan), rejected fragments (yellow), the mainline of the text (blue) and the extended mainline of the text (magenta).

Train Font Tab

The Train Font tab is used to train, view, rename and remove characters.The tab is divided into two groups, Characters, where the trained fonts are managed, and Training, where the character training parameters are defined.

Note:
  • The controls on this tab are not linked to the Train Mode, Train String and Train Font parameters on the General tab.
  • While in the Train Font tab, the ROI can be adjusted (the Edit Graphic button is enabled) and the segmentation graphics (character regions) will be updated as the ROI is modified.
  • Multiple-byte character names (e.g. Kanji) are not supported.Multiple-byte characters can be trained, but the name given to the character must be a single byte name.

Characters group box controls

After training, each trained character will be visible in the tree, where the character will assigned a folder and label, and grouped together (if the characters have matching labels).

  • Select the root Font folder to display all of the characters in the font in the panel on the right-side.The characters will be displayed as icons with a label underneath.
  • Select a character folder to display all of the trained instances of that character in the panel on the right-side.The characters will be displayed as icons with a label underneath.
  • Select a trained instance of a character to display that character, zoomed to fit the panel on the right-side.
Tip: Providing the OCRMax function with multiple training instances of each character to be read during run-time allows the function to better discriminate between similar character types.However, training multiple instances of the same characters has advantages and disadvantages.The advantage to training multiple instances is that better classification performance can be expected, especially when reading text that could easily be mis-classified (e.g. 8 and B).The disadvantages of training multiple instances are: a decrease in the function's execution time; possible decreases in the confidence scores, because multiple training instances should not only improve the highest score, but also improve the second-highest score, as well; and possibly training bad characters.

  • Import: Launches the Open dialog, where a font, saved as an OCRMax data file (*.ocm), may be imported.

  • Export: Launches the Save As dialog, where a font can be saved as an OCRMax data file (*.ocm).

  • Rename: Press after selecting an item to rename it.Any element in the tree or in the list panel on the right-side can be renamed.

    Note: Renaming a group of characters will assign a new label to all of the characters in the group.Renaming a single character will assign a new label to that single, selected character; the character will be moved to a new or different group in the tree.

  • Delete: Press after selecting an item to remove it from the font.Any element in the tree or in the list panel on the right-side can be renamed.

    Note: Deleting the Font folder will clear the font; all characters will be deleted.Deleting a group of characters will delete all of the characters whose label matched the deleted group's label.

Training Group Box

Before characters can be trained, they must be correctly segmented.

  • Add All Characters to Font: Specifies that all of the characters in the ROI will be trained.The characters expected to be trained are entered into the Train String text entry box, before the Train button is pressed.The number of characters in the Train String text entry box must match the number of segmented characters.
  • Add New Characters to Font: Specifies that only new characters in the ROI will be trained.The characters expected to be trained are entered into the Train String text entry box, before the Train button is pressed.The number of characters in the Train String text entry box must match the number of segmented characters.
  • Add Individual Characters to Font: Specifies that specific characters in the ROI will be trained.When this option is selected, the Train String text entry box will be disabled, and the Train button will launch the Add Selected Characters to Font dialog.This dialog contains an unwrapped image of the ROI, with a label and text-entry boxes below each of the segmented characters.The label is the currently associated symbol for that character (a "?"denotes an unknown or untrained character).Below the label is a text-entry box.Enter a label for each segmented character in the text-entry box; leave the text-entry box empty to not retrain characters.Press the Train button to close the dialog.
  • Train String: Specifies the text string to be trained.The number of characters in the Train String text entry box must match the number of segmented characters.
  • Train Button: Activates training.

Fielding Tab

The Fielding tab provides a graphical means of creating and editing the Field String and Field Definitions arguments of the OCRMax function.The resulting values are inserted into the function as literal strings.

Fielding provides the functionality to verify and correct strings, returning the set of best matching valid strings.There are two primary usages for Fielding:

  • OCR result verification, where the string returned is determined to be correct or not based on the Field String and Field Definitions parameters.
  • OCR result correction, where the string returned is not among the list of acceptable results, and an attempt is made to find an acceptable string allowed by the field that is closest to the returned string.

A typical use-case for fielding is when the string contains prefix and/or suffix characters, and fielding is used to ignore those prefix/suffix characters.In this case, the Field String and Field Definitions determine the offset of the string position in the ROI.

Field String

Specifies the number of characters containedin the character string.A Field Stringentry can be any alphanumeric character found in the text entry dialog,including (A to Z), (ato z), (0 to 9), dashes(-), dots (.),and spaces ( ).

Each character in the FieldString corresponds to an indexed field position between 0 and 31.The Field String must containat least the same number of positions as there are characters in the string forthe read to pass (i.e.if there are 10 characters present, but the Field String only specifies 9 characters, the best matching 9 will be returned; however, if there are 8 characters present and the Field String defines 9 characters, the function will return #ERR).By default, each position in the FieldString is represented as an asterisk (*) character, or alphanumeric"wildcard."This means that any character is valid at any positionin the string.

However, an individual position in theField String can be limited toconsider only a subset of possible characters at that position.This increasesoverall performance and reliability because characters that are not possibleat a position will not be considered during a read.

The pre-defined FieldString entries are:

Field String Entry | Description | Valid Characters
* | Wildcard | Any trained character in the font.
N | Numeric | 0123456789
A | Uppercase alphabetical | ABCDEFGHIJKLMNOPQRSTUVWXYZ
a | Lowercase alphabetical | abcdefghijklmnopqrstuvwxyz
H | Hexadecimal, uppercase alphabeticaland numerical | 0123456789ABCDEF
h | Hexadecimal, lowercase alphabeticaland numerical | 0123456789abcdef
O | Octal | 01234567
Note:
  • To restrict a positionin a Field String to a singlecharacter, simply enter that character.The character must have been trainedin the font and cannot be one of the pre-defined FieldString entries listed above, unless it has been remapped usingthe FieldDefinitions parameter.
  • To read a stringcontaining a space, include the space in the FieldString.ReadText will not read a space if the corresponding Field String entry in that positionis an asterisk (*).
  • If the Field String parameter in the General tab is defined as a cell reference, the Field String option in the Fielding tab will be disabled, and the current value of the cell reference will be displayed.
Closed Field String Example 1

If the FieldString is **********AN, any character in the font is valid in thefirst 10 Field String positions.But in the 11th position, only uppercase alpha characters will be consideredduring the read.And in the 12th position, only numeric characters willbe considered.

Closed Field String Example 2

The font contains only numeric characters0-9 and /.If the Field Stringis NN/NN/NN, only numeric characters will be considered in the first andsecond, fourth and fifth, and seventh and eighth positions.Only the forwardslash (/) character will be considered in the third and sixth positions.

But if the Field String is NN/NN/AA, the readwould return #ERR because the font does not contain any alpha characters.

Field Definitions

Optionally, the FieldDefinitions settings can be used to create user-defined entriesfor the FieldString.When included in the FieldString, these entries restrict the list of valid characters atthe positions in which they are inserted.There are several pre-defined field definitions, and user-defined field definitions can be added.The pre-defined definitions are displayed in grey text and may not be deleted or edited, only enabled or disabled.User-defined definitions are displayed in black text, can be added, deleted or edited.To add a field definition, press the Add New button, assign an icon for the Character and then assign a definition to the Character.

Note:
  • The number of user-defined definitions is limited by the OCRMax function's expression length (249).
  • Any user-defined definitions that are disabled when the OCRMax property sheet is closed will be removed and will not be available when re-opening the function's property sheet.
  • If the Field Definitions parameter in the General tab is defined as a cell reference, the Field Definitions option in the Fielding tab will be disabled, and the current value of the cell reference will be displayed.

Characters listed for a FieldDefinitions entry must be contained in the font.For example: #=123is valid if 1, 2, and 3 are included in the user-trained font.However,#=123 would be invalid if 1, 2, and 3 are not included in the font.

Note: Using one of the predefined entries (*, A, a, N, H, h, O) in theField Definitions parameter willremap the list of valid characters in the new definition.
Closed Field Definitions Example 1

If the value of FieldDefinitions is #=123;$=3456;%=789, and the FieldString is #$%*******, then the only characters that will be validin the first position will be 1, 2, or 3.The only valid characters inthe second position will be 3, 4, 5, or 6.And in the third position,only 7, 8, or 9 will be valid.Any character in the font is valid in thefourth through tenth positions.

Closed Field Definitions Example 2

If the value of FieldDefinitions is #=123;$=3456;%=789, A=A, and the FieldString is #$%******A, then the only characters that will be validin the first position will be 1, 2, or 3.The only valid characters inthe second position will be 3, 4, 5, or 6.And in the third position,only 7, 8, or 9 will be valid.Any character in the font is valid in thefourth through ninth positions.Onlythe A character will be considered in the tenth position because the Field Definition A=A remaps the predefined FieldString entry.

Field Definitions controls

  • Match Only Against Characters in Field String: Specifies whether or not the function will only attempt to match characters against characters indicated by the Field String.

    Note: When the Inspection Mode is set to Read/Verify, this parameter will field against the text string specified in the Match String parameter.

  • Variable Length Strings: Specifies whether or not the defined Field String might be a sub-string within the complete read text string.If a sub-string is found, it will return the best-match sub-string.

    Note: If the External Settings parameter is set as a reference to an OCRMaxSettings function, the Match Only Against Characters in Field String and Variable Length Strings parameters will be disabled.
  • Minimum Length: When the Variable Length Strings parameter is enabled, this parameter specifies the minimum acceptable string length (0 - 100; default = 1).
  • Maximum Length: When the Variable Length Strings parameter is enabled, this parameter specifies the maximum acceptable string length (0 - 100; default = 25).
  • Maximum Start Index: When the Variable Length Strings parameter is enabled, this parameter specifies the fielding subsequences to be considered, which must start at a position that is no greater than this index value (0 - 100; default = 100).
  • Minimum End Index: When the Variable Length Strings parameter is enabled, this parameter specifies the fielding subsequences to be considered, which must end at a position that is no smaller than this index value (0 - 100; default = 0).

Results Tab

The Results tab displays the overall results and scores for each character, and is divided into two sections: Overall Results and Character Results.

Overall Results

  • Status: Displays the function's overall result - Pass or Fail.

Character Results

  • Char: Displays the character read at that position.

  • Status: Displays the status (Bad Read, Good Read, Ignored, Confused, Mismatch, Confused Mismatch, or Validation Failed) of the read character.

    • Bad Read: No characters scored high enough above the Accept Threshold to be considered a good read.

    • Good Read: The function successfully read the character at this position.

    • Ignored: When fielding is enabled, if a fielding string is specified and it is shorter than the string read by the function, the characters at the beginning or end of the string will be segmented (in yellow), but will not be included with the overall result.For example, if the fielding definition is ABC, and the string read by the function is "12ABC34", then "1234" will be ignored.

    • Confused: The function identified a character that scored high enough to be a good read (above the Accept Threshold parameter value), however, a different character scored close enough to the same score (within the Confusion Threshold parameter value), such that the function is not confident that it picked the correct character [Confused = (Primary Score - Secondary Score)/Confidence Threshold].

    • Mismatch: The function found a character that does not match the fielding, which scored much higher than any characters that do not match the fielding.It is likely that a character that does not match the fielding was printed at this position.Fielding must be enabled to return this status.

      Note: The Mismatch status is only returned if the OCRMaxSettings function is being utilized and the function's Ignore Unfielded Characters is disabled.
    • Confused Mismatch: The function found a character that meets both the requirements of Confused and Mismatch.
    • Validation Failed: If the OCRMaxSettings function is being utilized and the function's Skip Additional Character Validation parameter is disabled, the function will parse the characters through an additional validation step, to ensure that the function does not produce false reads.
  • Score: Displays a score that measures how closely the read character matches the trained character in the font database.
  • Confused With: Displays the next, best matching character.
  • Confusion Score: Displays a measure of how certain the function is of the chosen match, when compared against the next, best match.

Diagnostics Tab

The Diagnostics tab displays information about how the OCRMax function segmented characters in the ROI.This data can be useful in determining which parameters to adjust, and how much, if characters and/or character fragments are not being correctly segmented.Use this tab in conjunction with the Show Diagnostics parameter for a graphic display of the diagnostic data.

Note: This tab will update automatically when any parameters are changed and/or a new image is acquired or loaded.

Mainline Data

  • Angle: Displays the angular orientation measurement of the character regions, relative to the ROI, in degrees.
  • Skew: Displays the angular skew measurement of the character regions, relative to the ROI, in degrees.
  • Pitch: Displays the minimum and maximum pitch measurement of the characters, in pixels.
  • Inter-Character Gap: Displays the minimum and maximum measured inter-character gap, in pixels.
  • Intra-Character Gap: Displays the minimum and maximum measured intra-character gap, in pixels.

Accepted Characters

  • Width: Displays the minimum and maximum measured width of the accepted characters, in pixels.
  • Height: Displays the minimum and maximum measured height of the accepted characters, in pixels.
  • Size: Displays the minimum and maximum measured size of the accepted characters, in pixels.

Rejected Characters

  • Width: Displays the minimum and maximum measured width of the rejected characters, in pixels.

  • Height: Displays the minimum and maximum measured height of the rejected characters, in pixels.

  • Size: Displays the minimum and maximum measured size of the rejected characters, in pixels.

    Note: If there are no rejected characters, #ERR will be displayed.

Accepted Fragments

  • Size: Displays the minimum and maximum measured size of the accepted fragments, in pixels.
  • Contrast: Displays the minimum and maximum measured contrast of the accepted fragments, as a percentage.
  • Distance to Mainline (%): Displays the maximum Y distance of all the accepted fragments, as a percentage of the mainline height.

Rejected Fragments

  • Size: Displays the minimum and maximum measured size of the rejected fragments, in pixels.
  • Contrast: Displays the minimum and maximum measured contrast of the rejected fragments, as a percentage.
  • Distance to Mainline (%): Displays the maximum Y distance of all the rejected fragments, as a percentage of the mainline height.

OCRMaxOutputs

Returns | An OCRMax data structure containingthe character string that was read, or #ERR if any of the input parametersare invalid.
Results | When OCRMax is initially inserted intoa cell, a result table is automatically created in the spreadsheet.

OCRMaxVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see OCRMax.

String | GetString(OCRMax) | Returns the text string in the referenceddata structure.
StringPass | GetPassed(OCRMax) | Returns the pass/fail status of the entirestring in the referenced data structure.
Index |  |
Char | GetChar(OCRMax, Index) | Returns the indexed character in the referenceddata structure.
Score | GetScore(OCRMax, Index) | Returns the match score (0to 100) for the indexed character in the referenced data structure.
Passed | GetPassed(OCRMax, Index) | Returns the pass/fail status of the indexedcharacter in the referenced data structure.
2nd Char | GetChar(OCRMax, Index0, [Index1]) | Returns the secondhighest scoring character.
2nd Score | GetScore(OCRMax, Index0, [Index1]) | Returns the scoreof the second highest scoring character.
Char Difference |  | Returns the difference between the indexed character's Score and 2nd Score values.

Configure the OCRMax function


Configure the OCRMax Function

The OCRMax function, using a Region of Interest (ROI) as an input, through a process called segmentation, divides a line of text into images of individual characters. This topic provides an overview of how the function works (both training and run-time) and how best to set the Segmentation parameters to achieve proper segmentation.

Use the OCRMax Function

The operation of the OCRMax function involves two phases: train-time and run-time.

  • Train-time involves loading multiple images of the characters that will be read, extracting them from the image, segmenting them and creating a trained font database of characters.
  • Run-time involves placing the In-Sight vision system Online, acquiring images and extracting and classifying characters based on the trained font database.

Load Training Images

  1. Select Record/Playback Options from the Image Menu.
  2. The Record/Playback Options dialog should automatically open with the Playback tab presented; if not, click on the Playback tab.
  3. From the Playback Folder section, press the Browse button to launch the Browse for Folder dialog. Navigate to the directory containing the training images and press the OK button to continue.
  4. The Playback Folder should now display the directory specified, and the Image Count indicates the number of images in the directory. Press the OK button in the Record/Playback Options dialog to continue.

Train the OCRMax Function

  1. Load the first training image.

  2. Insert the OCRMax function into the Spreadsheet.

  3. From the General tab, double-click the Region parameter to enter interactive graphics mode to position the function’s ROI over the line of text to be read. When configuring the ROI, ensure that it accounts for any angular rotation and/or skew.

  4. The function will automatically create character regions around the text that the function determines to be characters, based on the default settings in the Segmentation tab.

  5. If the function has not correctly drawn the character regions around the text, there are two options:

    • Use the Auto-Tune dialog and allow the OCRMax function to automatically calculate the optimal segmentation settings. The Auto-Tune dialog combines the segmentation and training phases into one step. Follow the instructions in the Auto-Tune dialog topic to successfully segment and train a font database.
    • Go to the Segmentation tab and adjust the parameters manually until the text is correctly enclosed within individual character regions. Follow the Segmentation Process to successfully segment all of the characters in the image database prior to training.

Manually Train After Segmentation

  1. Once the text has been segmented, the characters are ready to be trained and added to the font.

  2. Re-load the first training image.

  3. Go to the Train Font tab and enter the exact text string to be trained, and then press the Train button.

    Note: Once a font database has been created, additional characters can be added to the font using the Add New Characters to Font and Add Individual Characters to Font options.
  4. The characters will be added and stored in the function’s OCRMax data structure.
  5. Load the next training image and repeat steps 2 through 5 until all the necessary character instances have been trained.

Run the OCRMax Function

Before the OCRMax function is placed Online, the function's Inspection Mode should be set, determining if the function will simply read text within its ROI at run-time, or if it will be programmed to read and verify that the correct string was read. During run-time, the In-Sight vision system will be placed Online and acquire images as defined by the job. When an image is acquired, the text string in the image will be automatically segmented based on the Segmentation parameters, and the characters will be compared against the trained instances of the characters. The function's results will be output via the OCRMax Vision Data Access functions, and the Results tab provides additional information about the characters.

In order to achieve the best success during run-time, the parameter settings used in both the train-time and run-time should be the same. However, at times it may be necessary to adjust a parameter because a failure is now occurring on a new set of images. If the parameter change does not produce any notable changes to the appearance of the characters already successfully trained, it may be unnecessary to re-train. If, however, the parameter change does affect the previously trained characters, re-training will be necessary. Although changing parameters may affect the character regions, some parameters are more likely to do so.

Altering any of the following parameters after training will very likely necessitate re-training:

  • Normalization Mode
  • Use Stroke Width Filter
  • Binarization Threshold

The following parameters may require re-training if they result in changes to characters, such as trimming or splitting:

  • Maximum Character Width
  • Minimum Character Aspect Ratio
  • Maximum Character Height

The following parameters may require re-training if they result in different angle and/or skew values (e.g. if the characters have some slight previously uncorrected skew, and the Skew Range parameter is later increased to properly de-skew the characters):

  • Angle Range
  • Skew Range
  • Region

Segmentation Overview

The OCRMax function performs Optical Character Recognition through a six-stage process.

  1. Refine Line: Placing the ROI determines the line of text's location, angle and skew. The OCRMax function will take this input image and rectify the image so that the line of characters are horizontal and have no skew.
  2. Normalize: The line of text within the ROI is normalized, which allows the image to be binarized using a single threshold value.
  3. Binarize: A threshold is determined that binarizes the normalized image into text and background.
  4. Fragment: The function then performs blob analysis on the binarized image, creating character fragments.
  5. Group: Character fragments are grouped together to create a character.
  6. Analyze: Optionally, additional analysis may be performed to determine more optimal groupings before forming the final characters.

Segmentation Process

The following list places the OCRMax parameter with the step of the process that it affects, and also includes troubleshooting advice for each step in the process.

Tip: If characters are not being correctly segmented, utilize the Show Diagnostics parameter to enable graphic feedback about accepted/rejected characters and character fragments. Also, use the Diagnostics tab to help determine which parameters may need adjustment.

Refine Line

  • Region
  • Character Polarity
  • Angle Range
  • Skew Range

Determining the rotation and skew of the line of text is affected by the orientation of the ROI, and the values specified in the Angle Range and Skew Range parameters. In applications where the rotation and/or skew of the line of text is consistent across images, it is faster and more accurate to specify the Character Polarity, Angle Range and Skew Range, rather than to allow the function to compute those values.

Troubleshooting

The purpose of the Refine Line stage is to determine the correct angle and skew values for the line of characters. The OCRMax function will automatically create character regions around the areas it believes contains characters, based on the default Segmentation parameters, once the Region is placed over the area. If the character regions do not have the expected appearance within the Region, try adjusting the Angle Range and/or Skew Range until they appear to have the correct angle and/or skew in the image. Make sure to adjust the angle and/or skew so that the characters are properly adjusted for the needed angle and/or skew, prior to training the characters.

If the Region contains extraneous, strong features, such as a label edge, the OCRMax function may compute incorrect angle and/or skew values. Try to ensure that the Region only contains the line of text.

Normalize

  • Normalization Mode
  • Use Stroke Width Filter

In the normalized image, a greyscale value of 128 is the value that is nominally the threshold between dark and light values; e.g. if the Character Polarity is Black on White, greyscale values less than 128 would be text and greyscale values greater than or equal to 128 would be background. However, the greyscale threshold value may be changed in the Binarize stage.

Note: The appearance of the normalized image is note affected by the Character Polarity; e.g. dark pixels in the normalized image will be dark in the normalized image regardless of whether or not the text's polarity is Black on White or White on Black.

Troubleshooting

The purpose of the Normalize stage is to process the image area within the Region for binarization (splitting into text and background), using a single binarization threshold, creating a normalized image. In the normalized image (which can be viewed by setting the Output Image Graphic parameter to Normalized Image), depending on the polarity of the text (Black on White or White on Black), all of the text should appear either uniformly dark and the background uniformly light, or vice versa. Also viewing the binarized image (which can be viewed by setting the Output Image Graphic parameter to Binarized Image) can be helpful in determining the accuracy of the normalized image; if significant areas of the background are incorrectly binarized as text, the problem is often in the Normalization stage (though it may still be tied to the Binarization stage).

If the background appears fairly uniform and the text contrast is consistent, the default Global Normalization Mode option will probably work. When there are variations in appearance of the background, such as one side being darker than the other, or the top being lighter than the bottom, try using either the Local or Local Advanced Normalization Mode options. If the text itself has an inconsistent contrast, such as some characters being noticeably fainter than others, the Local Advanced option will be required. However, the Local Advanced option may sometimes amplify background noise (e.g. spots or speckles). If Local Advanced amplifies the noise more than helps to define the text, try the Local option, instead.

In addition to the Normalization Mode parameter, the Use Stroke Width Filter parameter affects the normalized image. The Use Stroke Width Filter is designed to eliminate strokes that are significantly narrower than the rest of the text, since such strokes are often just noise. This parameter also eliminates general, low-contrast background variations. However, in some cases, the parameter may incorrectly eliminate actual text strokes, in which case it should be disabled. This problem typically occurs when the stroke widths of the characters vary, and/or when some parts of the characters are fainter (i.e. lower contrast) than the rest of the characters.

Finally, Character Polarity also affects normalization. Usually the OCRMax algorithm can determine the correct text polarity, but it is preferable to set the polarity, when possible. Incorrect character polarity may be influenced by non-text features being included within the Region containing the text. Positioning and reconfiguring the Region to exclude the non-text features should rectify the issue.

Binarize

  • Character Polarity
  • Binarization Threshold

Binarization applies a threshold to the normalized image in order to produce an image with only two greyscale values: Black (0) is background and White (255).

Note: Unlike the normalized image, the binarized image is affected by the Character Polarity; text is always white in the binarized image.

Troubleshooting

The purpose of the Binarize stage is to binarize the normalized image such that text features are given a greyscale value of 255, and all of the background features are assigned a greyscale value of 0 (regardless of the specified Character Polarity). The resulting image is a Binarized image (which can be viewed by setting the Output Image Graphic parameter to Binarized Image). Binarization simply applies a single threshold to the normalized image, using the Binarization Threshold parameter.

If the binarized image appears inverted, i.e. the text has a greyscale value of 0 and a background of 255, then the text polarity is incorrect. This can occur when the Character Polarity parameter has been configured incorrectly; either the Auto setting has determined the wrong polarity, or it was set to Black on White when it is actually white on black, or vice-versa. Incorrectly determining the text polarity is often caused by the Region containing non-text features, or the Region touches the tops and/or bottoms of the characters; in these cases, simply re-positioning the Region to exclude those features generally resolves the issue.

If the binarized image has the correct polarity, but includes either too much or too little text, then adjust the Binarization Threshold. Decreasing the parameter causes less of the image to be considered as text, while increasing it causes more of the image to be considered as text. Most commonly, the Binarization Threshold will need to be set lower than the default value of 50 when there is significant background texture or noise.

Typical values to try beyond the default are 40 and 30. It is unusual to need a setting below 25, and very rare to need a value greater than 50. If changing the value helps, but has not quite resolved the issue, attempt a more refined value (e.g. 32.5); sometimes a change of as little as .1 may help.

Note: Because the Binarization Threshold is a percentage that is converted to an integer threshold in the range of 0 to 255 (greyscale range), trying values that differ by less than 1/256 will not make a difference.

Also note that some problems with the binarized image may actually be problems with the normalized image. See the Normalize section for more details, but having large blocks of background being binarized as text often results from an incorrect Normalization Mode parameter setting (particularly when using the Global option), and having pieces of text binarized as background, regardless of the Binarization Threshold, often results from the Use Stroke Width Filter parameter enabled.

It is also not unusual for some small specks of noise to be binarized as text; such specks can be eliminated in the Fragment stage.

Fragment

  • Minimum Character Fragment Size
  • Character Fragment Contrast Threshold
  • Ignore Border Fragments
  • Maximum Fragment Distance to Mainline

Using the binarized image as an input, fragments are formed from connected sets of pixels in a form of blob analysis. Each set of connected pixels is considered as one fragment. The fragments will eventually be grouped together to form characters, so this stage is important in removing fragments that are only noise or non-text features.

Tip: Set the Output Image Graphic parameter to Binarized Image if the final characters appear to be too small and/or characters are missing. If the missing fragments are present in the binarized image (i.e. White), try varying the above parameters (while also adjusting the following Group stage parameters, which may discard entire characters: Minimum Character Size, Minimum Character Width and Minimum Character Height).

Troubleshooting

The purpose of the Fragment stage is to determine which previously binarized text pixels are actually text pixels. The binarized image is processed using connectivity analysis (also known as blob analysis) to form connected fragments (i.e. blobs); the Fragment stage determines whether or not to keep or reject each fragment. The kept fragments will be used to construct the characters.

By utilizing the Show Diagnostics parameter and closely viewing the character regions, it may be possible to infer which fragments were kept or rejected. Review the data in the Diagnostics tab, as well, to help determine which fragments were being kept or rejected.

Fragments may be rejected because they are too small, their contrast is too low, they intersect the border of the Region, and/or they appear to be placed outside (i.e. either too far above or below) the mainline of characters. A given fragment may be rejected for one or more of the preceding reasons, so it may be necessary to adjust more than one parameter. Sometimes the problem may be that a piece of text is being rejected, while other times it may be that a piece of noise was binarized as text; either problem can typically be handled by setting appropriate parameters for this stage.

Note: If the entire character containing the fragment is small (e.g. a period or a colon), the problem may be in the next stage, the Group stage. In these cases, the entire character will be missing, rather than just having a character whose character region is too small. It is particularly worthwhile to reiterate that a parameter setting that fixes a result in one image may affect the results negatively in another image. For example, increasing the Minimum Character Fragment Size parameter to reject a piece of noise in one image may cause an actual period or colon in another image to be rejected.

If a small text fragment is being rejected, try decreasing the Minimum Character Fragment Size parameter in order to keep the fragment. The number of pixels is the number of connected pixels in the binarized image. Similarly, if a small piece of noise is being kept, try increasing the parameter value.

If a text fragment that touches the border of the Region (i.e. one or more pixels is at the exact top, bottom, left or right of the binarized image) is being rejected, disable the Ignore Border Fragments parameter to keep it. Similarly, if a piece of noise that touches the border of the Region is being included, enable the Ignore Border Fragments parameter to reject it.

If a character region is too short (i.e if the top and/or bottom of the character is cut off), then the problem may be that the fragments at the top and/or bottom of the character were rejected because they appeared to be outside the mainline of the rest of the characters, taken as a whole. This situation arises most often when the printing is somewhat erratic vertically (with some characters printed too high or too low), or when the printing drifts (e.g. where most of the text is on a straight line, but the characters at one end of the line are printed successively lower and lower, or higher and higher). In these cases, try increasing the Maximum Fragment Distance to Mainline parameter to allow including fragments outside that mainline. Turn on the Show Diagnostics parameter to graphically display the placement of the mainline around the characters. The distance is specified as a percentage of the estimated height of the mainline, so, if the rejected fragments are slightly beyond the fragments of others that were kept, try a relatively small value, such as 2 or 5%. If fragments far off the mainline were rejected (which may occur if the line of text begins with a capital letter, followed by lowercase letters, for example), try a larger value, such as 30%.

Finally, if a text fragment was rejected, but none of the previous three conditions applies, the fragment was rejected due to its low contrast. Decrease the Character Fragment Contrast Threshold parameter value in order to keep the fragment. The contrast of a fragment is measured using the greyscale values in the normalized image, relative to the value used as the binarization threshold. For example, if the Binarization Threshold parameter was set to 50, then the binarization threshold is equivalent to a greyscale value of 128, and if all the pixels of a fragment in the normalized image were 100, then that fragment's contrast would be 128.

Group

  • Character Fragment Merge Mode (1)
  • Minimum Character Fragment Overlap (1)
  • Min Inter-Character Gap (1)
  • Max Intra-Character Gap (1)
  • Minimum Character Size (4)
  • Minimum Character Width (4)
  • Minimum Character Height (4)
  • Maximum Character Height (3)
  • Maximum Character Width (1, 2)
  • Minimum Character Aspect Ratio (1, 2)
  • Character Width Type (2)

All of the character fragments that were kept during the Fragment stage are then grouped together to form characters. In applications with simple, solid-stroke fonts (the fonts are not broken up into smaller pieces), each character may be composed of a single character fragment. Applications that incorporate dot-matrix text, each character may contain multiple character fragments.

Note: The next stage, Analyze, can also be used to merge character fragments that the Group stage did not merge. For instance, if two actual characters are reported as a single character, it may be necessary to adjust both the Group and Analyze stage parameters to determine why. In this scenario, it is useful to first adjust the Analyze stage parameter, Segmentation Analysis Mode, to Minimal, which will prevent the Group stage parameters from being changed.

The Group stage is comprised of the four following types of operations (the list of parameters are number coded to indicate which types of operations affect which parameter):

  1. Merging two or more character fragments to form a character.
  2. Splitting a character fragment or a group of character fragments into two or more (new) character fragments.
  3. Trimming a character fragment either vertically or horizontally to make a smaller character fragment.
  4. Discarding groups of character fragments.

Troubleshooting

The purpose of the Group stage is take individual fragments and group them together to form whole characters by either merging fragments together and/or splitting them apart. This stage may also discard sets of fragments altogether, as well. The results of the Group stage are graphically displayed as the character regions that enclose the marks (dot-peen, ink jet, etc.) that create the character.

Note: The next stage, Analyze, can also perform grouping, however there is an important difference in how the two steps perform the process. In the Group stage, grouping decisions are "locally" based (i.e. based on nearby fragments), whereas the Analyze stage grouping decisions are "globally" based (i.e. based on all the fragments, taken as a whole).

Merging: Merging one or more fragments into a single character is performed by examining the horizontal placement of the fragments, specifically whether or not the fragments overlap, if they have a gap between them and how large of an overlap or gap exists (if present). Merging will not create characters larger than the maximum character width.

The main parameter that affects how fragments are merged is the Character Fragment Merge Mode parameter. If the parameter is set to Require Overlap, then fragments are required to overlap horizontally by at least one pixel or more (depending on the Minimum Character Fragment Overlap parameter setting) to be merged together. This setting is typically useful when characters may be "kerned" together, e.g. the characters "AV" are sometimes printed such that the rightmost part of the "A" overlaps the leftmost part of the "V." If the parameter is set to either Set Min Inter-Character Gap or Set Min Inter-Character Gap/Max Intra-Character Gap, then some horizontal gap separating each pair of characters will be expected.

For dot-matrix print, at least for cases where the dots are clearly separate, rather than overlapping, it is often useful to use either Set Min Inter-Character Gap or Set Min Inter-Character Gap/Max Intra-Character Gap in order to allow the OCRMax function to distinguish between the gaps that occur between two characters (the inter-character gap) and the gaps that may occur between the dots of a single character (the intra-character gap). Ideally, all the inter-character gaps will be larger than any intra-character gaps, in which case using the Set Min Inter-Character Gap setting may be used, with the value set to the smallest gap that can occur between two separate characters.

Splitting: Splitting a single, wide fragment into one or more separate characters is accomplished by specifying the maximum character width allowed for a single character using the Maximum Character Width parameter (i.e. the width of the widest character in the font, which is typically the "M" or "W" in an alphanumeric font). Any fragment that is wider than the specified maximum width will then either be trimmed to the maximum width, or split into multiple pieces that are each no wider than the maximum width. Wide fragments typically occur when two or more characters are so close together that they touch, or when two or more characters are connected by noise or by a non-text stroke.

The maximum character width can also be set indirectly by enabling the Use Minimum Character Aspect Ratio parameter and setting the Minimum Character Aspect Ratio parameter. When setting this value, the width is equal to the line height, divided by the Minimum Character Aspect Ratio value (the line height can be inferred by viewing the Diagnostics tab and examining the values returned by the Accepted Characters and Rejected Characters Minimum and Maximum Height values). If both the Minimum Character Aspect Ratio and Maximum Character Width parameters are enabled, the smaller width value will be used.

How a character is split depends on the Character Width Type parameter. If the parameter is set to Fixed, then the too-wide fragment will be split into approximately equal-sized pieces (this setting is appropriate when all the characters are expected to have the same width). If the parameter is set to Variable or Auto, the OCRMax function will determine the optimal splitting into pieces that may or may not be equal-sized (this setting is appropriate when the characters may have different fonts, as is common with proportional text).

Trimming: Characters and/or fragments that are too tall may be trimmed. This typically needs to occur when noise or non-text strokes are connected to the tops and/or bottoms of characters. To enable vertical trimming, activate the Use Maximum Character Height parameter and specify an appropriate value in the Maximum Character Height parameter. Problems may arise, however, if the text is not all printed on a straight line; in such situations, it may be necessary to increase the value of the Maximum Character Height parameter to a value that is larger than the actual height of the characters (although the results may still not be ideal).

Discarding: The process of discarding fragments is possibly the easiest to address of the various Group stage operations. Once a set of fragments has been grouped together, that whole set can be discarded if it is too small in width, height and/or total number of binarized pixels. So, if an actual character is being entirely discarded, decrease the Minimum Character Width, Minimum Character Height and/or Minimum Character Size parameters until the character is kept. Similarly, if some non-text features are being incorrectly reported as characters, increase one or more of the previous parameters until the non-text feature is discarded.

Analyze

  • Segmentation Analysis Mode
  • Minimum Pitch
  • Character Pitch Type
  • Character Pitch Position

The Group stage forms sets of character fragments from individual fragments, and often these sets are the correct final characters. However, sometimes a more sophisticated analysis is required to segment the characters correctly, especially when the distance between characters is no larger than the distance between separate pieces of a character (e.g. dots in a dot-matrix print). In other cases it may simply be easier to achieve correct segmentation through the use of the Analyze stage parameters than the Group stage parameters.

Troubleshooting

The purpose of the Analyze stage is to group together fragments to form characters, based on "Global" information about the all of the fragments within the ROI, rather than "Local" information , based on a few fragments. The default setting of the Segmentation Analysis Mode parameter is Standard, which applies the "Global" analysis, whereas the Minimal setting only performs the "Local" analysis, which is equivalent to the Group stage.

Note: The Analyze stage is entirely concerned with the use-case where individual characters may appear as separate pieces, e.g. the text is dot-matrix or scratches break up the characters. In applications where each character always appears as a single piece, the Segmentation Analysis Mode parameter may be set to Minimal. This setting may also be used when characters appear to be multiple pieces, but the gaps between the characters are always larger than the gaps within the characters. In this scenario, also set the Character Fragment Merge Mode parameter to Set Min Inter-Character Gap.

The most common problem associated with this stage is when two or more characters are reported as a single character. At times, this problem can be simply addressed by setting the Segmentation Analysis Mode parameter to Minimal. However, if the Standard option is needed, the problem can generally be addressed by specifying one or more constraints on the width and/or spacing of the characters.

To prevent two or more characters from being merged, specify a smaller maximum character width using the Maximum Character Width parameter and/or the Minimum Character Aspect Ratio parameter. Please see the Group stage for more information about these techniques.

Specifying the pitch between two characters may also be set, using the Minimum Pitch parameter. The pitch is measured as the distance between corresponding parts of two characters, as specified by the Character Pitch Type and Character Pitch Position parameters.

Although setting the Character Pitch Type and Character Pitch Position parameters may be helpful, it is generally not necessary. The one exception to this guideline is the following: If the Character Pitch Type parameter is set to Auto, the OCRMax function may make a choice that would be appropriate for a fixed-pitch font, but would be inappropriate for a proportional-pitch font. Specifically, the function may incorrectly group two narrow characters together. Setting the parameter to Proportional should correct this particular problem.

Achieve Optimal Run-time Performance

Typically, the performance of OCR applications is judged by the read rate, which is the percentage of characters that are correctly read.

Note: In some applications, it may be preferable to compute the read rate in such a way that misreads (false accepts) are worse than no-reads (false rejects). Similarly, some applications may prefer to measure the read rate as the number of correct strings, rather than the number of correct characters. However, the process for optimizing parameters is the same for all.

The best way to achieve optimal read rates is to acquire a large number of images of real parts (including both good and bad parts), manually grade the images (e.g. a person looks at the image and enters the correct text in a text file that can be referenced later for verification), and then measure the read rate over the entire database for each set of parameters being evaluated. Also, when training, use between 1 and 4 instances of each character, if possible.

High Read Rate Rules

The following are general rules in regards to achieving high read rates:

  • The more images, the better.
  • The higher the read rate needed by the application, more images will be required to achieve and verify the desired read rate.
  • As a guideline, try to use at least 10x the number of total characters (or strings, if strings are the criteria for defining the read rate) than would be needed for the error rate. Do not include characters used to train the font in the count. For example, if the target read rate is 99%, then ideally there should be no more than 1 wrong character per 100 characters (thus, 10*100 = 1,000 characters needed to measure the read rate). If the target read rate is 99.9%, use no fewer than 10,000 characters.
  • An even more conservative guideline is to use the above number of character for each type of character. This is usually only necessary when experimentation shows that a particular type of character happens to be much more likely to fail than other characters. (Alternatively, it may suffice to simply have enough instances of those problematic characters.) For example, if the set of characters contains the digits 0 through 9, and the target read rate is 99%, then ideally there should be 1,000 images of each digit.

Recommended Character and Region Sizes

The following are general guidelines to observe to achieve the best character segmentation results.

Character Size

Ideally, the larger characters in a font (e.g. an "M") should be about 20-40 pixels high. If the large characters are less than about 8-10 pixels high, segmentation may work, but classification is likely to prove difficult. If the large characters are much taller than 40 pixels, segmentation will generally be slower than necessary, with no benefit to the read rate.

If the characters appear larger than the recommended value and execution time is an issue, the best approach may be to change either or both the position of the In-Sight vision system and its lens, to make the characters smaller. If those options are not feasible, another consideration would be to use smoothing and subsampling to reduce the image size (e.g. using a NeighborFilter function with the Operation parameter set to Low Pass). However, if the characters are closely spaced horizontally, such that making the characters smaller would blur the gaps between the characters, it will probably be necessary to use the characters at their original size.

Character Stroke Width

Ideally, the stroke width of each character (or the diameter of the dots in dot-matrix print) should be at least 3 pixels (preferably 4). Larger stroke widths are acceptable.

Region Size

The Region should always completely enclose all of the characters to be read, while also containing a small amount of the background surrounding the text. When possible, it should not contain any other strong features, such as additional lines of text or label edges.

Ideally, the Region should be extended by at least half the width of the widest character (e.g. an "M") on the right and left, while extending at least a stroke width on the top and bottom.

The Region can be made to extend across the entire image area, which can be a viable solution in applications where the text varies in position and is not easily fixtured. However, if there is significant background noise or extraneous features, creating a smaller Region would be the better option to reduce the likelihood that the noise or features could be segmented as text.

Increase Segmentation Speed

The main factor affecting the execution time of the OCRMax function is the size of the Region and size of the characters. Additionally, some Segmentation parameters have a significant impact on the execution time, and in some cases, it is possible to choose faster options without significantly reducing the read rate.

Region and Character Size

In general, the execution time of the segmentation process increases with the size of the Region and the characters. Using a Region that encloses the characters fairly tightly will make segmentation faster. Similarly, using smaller characters (i.e. by changing the position/optics of the In-Sight vision system or subsampling the image) will make segmentation faster.

Parameters Affecting Speed

The following parameters have a significant effect on segmentation speed, and in some applications, it may be possible to choose a faster setting without an unacceptable decrease in the read rate.

  • Character Polarity: Using the Auto parameter setting will force the OCRMax function to spend time determining the correct polarity of the text. In most applications, the text always has a consistent polarity. Specifying the polarity (as either Black on White or Black on White) will make the function run faster.

  • Angle Range and Skew Range: Specifying a non-zero number for either/both of these parameters will force the OCRMax function to spend time determining the correct angle/skew of the text. If the text in different images always has a consistent angle and/or skew, or if the Region can be fixtured, specifying those values by configuring the Region is preferable to setting non-zero values in these parameters. However, if that is not possible, attempt to use the smallest possible values.

  • Normalization Mode: The different operations perform at significantly different speeds; the following are the fastest to slowest operations: None, Global, Local and Local Advanced.

  • Use Stroke Width Filter: Specifying this parameter to remove narrow non-text strokes, or to remove low-contrast background variations, can take a significant amount of time. Disabling this parameter will make the OCRMax function execute faster.

  • Segmentation Analysis Mode: Setting this parameter to Minimal instead of the default Standard setting will make the function execute faster. However, the speed difference in most applications will be relatively small.

    Note: For more information about the OCRMax function, see OCRMax, OCRMaxAutoTune, OCRMaxSettings, and OCV/OCR.


OCRMaxAutoTune

Provides external access to the Auto-Tune dialog of a referenced OCRMax function. This function provides support for adjustments to the Auto-Tune dialog from a remote device, such as a VisionView Operator Interface panel. When the button control is pressed, the function will launch the referenced OCRMax function's Auto-Tune dialog. For more information, see OCRMax.

Note: The Auto-Tune dialog is unavailable when the In-Sight vision system is Online.

OCRMaxAutoTune Inputs

Syntax: OCRMaxAutoTune(Label,OCRMax)

Parameter | Description
Label | Specifies the name that will appear in the spreadsheet.
OCRMax | Specifies a reference to an OCRMax function's OCRMax data structure.

OCRMaxAutoTune Outputs

Returns | A value of 1 when the Auto-Tune dialog is on display; otherwise returns 0.
Returns | A labeled Button [image] control.

For more information, see OCRMaxSettings, OCRMax, or Configure the OCRMax Function.


OCRMaxSettings

External Segmentation, Advanced Classification and Fielding settings for the OCRMax function, which can be adjusted at run-time. This function offers programmatic control of the settings, providing support for adjustments to parameters from a remote device. For more information, see OCRMax.

OCRMaxSettings Inputs

Syntax: OCRMaxSettings(Segmentation.Character Polarity,Segmentation.Character Width Type,Segmentation.Minimum Character Width,Segmentation.Use Maximum Character Width,Segmentation.Maximum Character Width,Segmentation.Minimum Character Height,Segmentation.Use Maximum Character Height,Segmentation.Maximum Character Height,Segmentation.Use Minimum Character Aspect Ratio,Segmentation.Minimum Character Aspect Ratio,Segmentation.Angle Range,Segmentation.Skew Range,Segmentation.Character Fragment Merge Mode,Segmentation.Minimum Character Fragment Overlap ,Segmentation.Max Intra-Character Gap,Segmentation.Min Intra-Character Gap,Segmentation.Minimum Character Fragment Size,Segmentation.Minimum Character Size,Advanced Segmentation.Normalization Mode,Advanced Segmentation.Use Stroke Width Filter,Advanced Segmentation.Ignore Border Fragments,Advanced Segmentation.Binarization Threshold,Advanced Segmentation.Character Fragment Constrast Threshold,Advanced Segmentation.Maximum Fragment Distance to Mainline,Advanced Segmentation.Segmentation Analysis Mode,Advanced Segmentation.Minimum Pitch,Advanced Segmentation.Character Pitch Position,Advanced Segmentation.Character Pitch Type,Advanced Classification.Classifier Template Size Width,Advanced Classification.Classifier Template Size Height,Advanced Classification.Maintain Character Aspect Ratio,Advanced Classification.Skip Additional Character Validation,Advanced Classification.Image Preprocessing,Fielding.Ignore Unfielded Characters,Fielding.String Length,Fielding.Maximum String Length,Fielding.Minimum String Length,Fielding.Maximum First Fielded Index,Fielding.Minimum Last Fielded Index)

Parameter Description

Segmentation

Specifies the parameter settings used to perform segmentation.

Character Polarity

Specifies the polarity of the characters in the input image.

Note: To improve the performance of the function, specify the polarity of the text.
1 = Black on White | The polarity of the text is black text on a white background.
2 = White on Black | The polarity of the text is white text on a black background.
4 = Auto (default) | The function will automatically determine the polarity of text and background.

Character Width Type

Specifies how the widths of characters in the font are expected to vary, which determines how character fragments should be merged or split.

Note: The character width is the width of the character region (e.g. the bounding box of the ink), not the ROI (which would typically include padding around the character rectangle).
1 = Auto (default) | The character width is unknown; the font may have either fixed or proportional width. Character fragments that are wider than the specified maximum character width will be split into individual characters that may or may not be of the same width, depending upon where the function determines the best place to split the character fragments.
2 = Fixed | All of the character regions in the font have the same width. Character fragments that are wider than the specified maximum character width will be split into individual characters of the same width.
4 = Variable | The characters in the font may have character regions with different widths. Character fragments that are wider than the specified maximum character width will be split into individual characters that may or may not be of the same width, depending upon where the function determines the best place to split the character fragments.

Minimum Character Width

Specifies the minimum width of a character’s character region, in pixels (1 - 1000; default = 3), that a character must have to be reported. This setting helps to filter background noise or other non-text features.

Use Maximum Character Width

Specifies whether or not the function should account for the maximum allowable width of a character’s character region. This setting may be used to help the function determine if a character fragment should be split or merged. If the character fragment should be split, the Character Width Type parameter will determine the proper technique to be used.

0 = Off (default) | The function will not account for the maximum allowable width of a character's character region.
1 = On | The function will account for the maximum allowable width of a character's region. When enabled, a character wider than the specified value will be split into pieces that are not too wide.

Maximum Character Width

Specifies the maximum allowable width of a character’s character region, in pixels (1 - 5000; default = 100).

Note: This setting will be unavailable unless the Use Maximum Character Width parameter is enabled.

Minimum Character Height

Specifies the minimum height of a character’s character region, in pixels (1 - 1000; default = 3), that a character must have in order to be reported. This setting helps to filter background noise or other non-text features.

Use Maximum Character Height

Specifies whether or not the function should account for the maximum allowable height of a character’s character region. This value is used in two ways: First, this value is used when finding the line, as a whole, e.g. to reject vertically adjacent noise, and/or other lines of vertically adjacent characters. Second, an individual character whose height exceeds this value will be trimmed to meet this height.

0 = Off (default) | The function will not account for the maximum allowable height of a character's character region.
1 = On | The function will account for the maximum allowable height of a character's character region.

Maximum Character Height

Specifies the maximum allowable height of a character’s character region, in pixels (1 - 5000; default = 100).

Note: This setting will be unavailable unless the Use Maximum Character Height parameter is enabled.

Use Minimum Character Aspect Ratio

Specifies whether or not the function will account for the minimum allowable aspect ratio of a character, where the aspect ratio is defined as the height of the entire line of characters, divided by the width of the character’s character region.

0 = Off | The function will not account for the minimum allowable aspect ratio of a character.
1 = On (default) | The function will account for the minimum allowable aspect ratio of a character. When enabled, a character whose aspect ratio is smaller than this value (i.e. whose width is too large) will be split into pieces that are not too wide.

Minimum Character Aspect Ratio

Specifies the minimum allowable aspect ratio (0 - 500; default = 80) of a character. This setting may be used to indirectly set the maximum width of characters by using the overall height of the line of characters, where the maximum width equals the line height, divided by the Minimum Character Aspect Ratio value. Character fragments wider than allowed by this parameter will not be merged, and will be split to form two or more character fragments that are not too wide (which is controlled by the Character Width Type parameter).

Note: This setting is unavailable unless the Use Minimum Character Aspect Ratio parameter is enabled.

Angle Range

Specifies the angel search range (0 - 45; default = 0), in degrees.

Note: If the line of text experiences angular rotation or skew, and that rotation or skew is consistent across images, configure the Region to compensate for those variances. Any value above 0 will increase the execution time of the segmentation process.

Skew Range

Specifies the skew search range (0 - 45; default = 0), in degrees.

Note: If the line of text experiences angular rotation or skew, and that rotation or skew is consistent across images, configure the Region to compensate for those variances. Any value above 0 will increase the execution time of the segmentation process.

Character Fragment Merge Mode

Specifies how the function should merge character fragments when forming characters during segmentation. Determines whether or not two character fragments are required to overlap to be considered as a part of a character, or whether or not character fragments with a horizontal gap between them may be considered as part of a character.

1 = Require Overlap (default) | Character fragments must overlap horizontally, based on the value in the Minimum Character Fragment Overlap parameter.
2 = Set Min Inter-Character Gap | Character fragments with a horizontal gap between them may be merged to form characters, where any two fragments with a gap less than the value defined in the Min Inter-Character Gap parameter will be merged.
4 = Set Min Inter-Character/Max Intra-Character Gap | Character fragments with a horizontal gap between them may be merged to form characters, with the decision to merge two fragments based on the values defined in the Min Inter-Character Gap and Max Intra-Character Gap parameters.

Minimum Character Fragment Overlap

Specifies the minimum fraction (0 - 100; default = 0) by which two character fragments must overlap each other horizontally, in order for the two character fragments to be considered as part of the same character. The default value (0) will merge any two character fragments that overlap by at least 1 pixel; larger values will require that the character fragments overlap more substantially. For applications where some character pairs are intentionally overlapped horizontally (also called kerning), or cases where the Refine stage cannot completely correct for rotation and/or skew (typically because of inconsistent printing), the default value is necessary.

Max Intra-Character Gap

Specifies the maximum horizontal gap size, in pixels (0 - 1000; default = 5), that can occur within a single character, even for damaged characters.

Note: In the most common application scenario, where the gaps that occur between adjacent characters are always wider than the gaps that may occur within a broken character, set the Min Inter-Character Gap parameter to the Max Intra-Character Gap parameter value, plus 1. For example, if characters never exhibit internal horizontal gaps, the Max Intra-Character Gap parameter would be set to 0, and the Min Inter-Character Gap parameter would be set to 1.

Min Inter-Character Gap

Specifies the minimum horizontal gap size, in pixels (0 - 1000; default = 0), that must occur between two character fragments to be belong to different characters. The gap is measured from the right edge of the character region of one character, to the left edge of the character region of the next character. If the gap between two fragments is smaller than this value, then the fragments must be considered to be part of the same character, unless the combined character would be too wide (as specified by the Maximum Character Width and/or Minimum Character Aspect Ratio parameters).

Note: In the most common application scenario, where the gaps that occur between adjacent characters are always wider than the gaps that may occur within a broken character, set the Min Inter-Character Gap parameter to the Max Intra-Character Gap parameter value, plus 1. For example, if characters never exhibit internal horizontal gaps, the Max Intra-Character Gap parameter would be set to 0, and the Min Inter-Character Gap parameter would be set to 1.

Minimum Character Fragment Size

Specifies the minimum number of foreground (i.e. text) pixels (0 - 1000; default = 15) that a character fragment must have in order to be considered for possible inclusion in a character. When setting this value, it must be set so that is small enough to keep real pieces of text, while still being large enough to exclude small fragments from background noise. For dot-matrix text and/or text that contains small characters such as periods, a smaller value may be necessary. For solid stroke text, where the characters do not tend to break up into multiple, smaller pieces, a larger value may be necessary.

Minimum Character Size

Specifies the minimum number of foreground (i.e. text) pixels (0 - 5000; default = 30) that a binarized character must have in order to be reported; characters with too few pixels will be discarded. This setting helps to filter background noise or other non-text features.

Advanced Segmentation

Specifies additional parameters to be applied during the segmentation process.

Normalization Mode

Specifies the mode used to normalize the image, which removes background variation to utilize all 256 greyscale values (0 - 255).

Note: This setting should be the same for both training and run-time; changing this setting after training may cause classification issues.
1 = None | No normalization will be performed.
2 = Global | A global normalization is performed, using information in the whole ROI, not local variations. This option is best when the background color and text are consistent across the entire ROI; also the fastest mode.
4 = Local (default) | A local normalization is performed, using information about each local character region in the ROI to normalize the image. This option removes background gradients, and should be tried if the Global mode does not work.
8 = Local Advanced | A local normalization is performed, using information about each local character region in the ROI to normalize the image, including adjustments for not only the background, but also the contrast of the foreground. This option removes background gradients and also adjusts for inconsistent text contrast; also takes the most execution time of the three options.

Use Stroke Width Filter

Specifies whether or not to remove everything from a normalized image that does not have the same stroke width as the as the rest of the image. This option can remove some types of non-text features, such as thin lines that might otherwise connect nearby characters. This option can also remove some low-contrast background variations that might otherwise exceed the binarization threshold and create false fragments and/or interconnect nearby characters. However, using this option may cause problems if the text does not have a consistent stroke width and/or the text has significant variable contrast (e.g. parts of some strokes are very faint).

Note: This setting should be the same for both training and run-time; changing this setting after training may cause classification issues.
0 = Off | The function will not remove everything in the image that does not have the same stroke width as the rest of the fragments in the image.
1 = On (default) | The function will remove everything in the image that does not have the same stroke width as the rest of the fragments in the image.

Ignore Border Fragments

Specifies whether or not the function will completely ignore any fragments that touch any border of the ROI. Ignoring such fragments can be useful for non-text features, such as the edges of labels, that might be included within the ROI.

Note: If a fragment extends from the border of the character region to the mainline of the text, the fragment will be considered to be a character. The fragment must not extend into the mainline of the text to be excluded when this parameter is enabled.
0 = Off (default) | The function will not ignore border fragments.
1 = On | The function will ignore border fragments.

Binarization Threshold

Specifies a percentage modifier (0 - 100; default = 50) in the range that is used to compute the binarization threshold, in the normalized image, that binarizes the image between text and background. For example, the default setting of 50% would produce a binarization threshold of roughly 128 (on a 0-255 greyscale range), with 0 equaling Black on White text, and 100 equaling White on Black text. Using a value less than 50% alters the binarization threshold so that there is less text and more background, whereas using a value greater than 50% produces less background and more text. Typically, the default value will correctly binarize the image; however, in cases where there is background texture or other background variations, decreasing this value may help compensate for the background variations.

Note: This setting should be the same for both training and run-time; changing this setting after training may cause classification issues.

Character Fragment Contrast Threshold

Specifies the minimum amount of contrast [in grayscale levels (0 - 255; default = 30)] of a fragment as a whole, relative to the threshold in the normalized image, in order to be considered for possible inclusion in a character. Each foreground pixel in a fragment is always guaranteed to meet the threshold, but if all of the pixels in a fragment are very close to the threshold, then the fragment is likely just noise, rather than text. A value of 0 will prevent low-contrast fragments from being rejected.

Maximum Fragment Distance to Mainline

Specifies the distance, as a percentage of character height (0 - 1000; default = 0), that a fragment may be vertically removed from the "mainline" running horizontally through the text. Ordinarily, characters are expected to lie along a straight, horizontal line after being refined (the stage of compensating for angular orientation and skew). However, characters may sometimes exhibit "jitter," where there may be vertical drift of the characters' positions. With the default setting, these character fragments would be rejected because they do not lie along the "mainline" of characters. Increasing this parameter setting allows the function to keep fragments that do not lie along the "mainline" of characters.

Segmentation Analysis Mode

Specifies the type of character analysis mode to perform to determine the optimal character segmentation. This parameter determines whether or not to perform additional analysis beyond the Group stage.

1 = Minimal | Performs basic segmentation analysis; follows the Group stage analysis only.
2 = Standard (default) | Performs additional analysis of the line as a whole, including character spacing, to determine the optimal segmentation. When enabled, the function will be affected by the Minimum Pitch, Character Pitch Type, and Character Pitch Position parameters.

Minimum Pitch

Specifies the minimum pitch, in pixels (0 - 1000; default = 0), that can occur between two characters, where the pitch is computed based on the Character Pitch Position parameter. If the pitch between two fragments is smaller than this, then they must be considered to be part of the same character, unless the combined character would be too wide (as specified by the Maximum Character Width and/or Minimum Character Aspect Ratio parameters).

Character Pitch Position

Specifies how the pitch between two successive characters should be measured. Pitch is defined as the distance between (approximately) corresponding points on adjacent characters, and not the distance from the end of one character to the beginning of the next character (which is called the inter-character gap). For fixed-pitch fonts in which the characters have different widths, typically the pitch will have a consistent value only when using the appropriate pitch metric.

Note: If the Segmentation Analysis Mode parameter is set to Minimal, this parameter will be disabled.

1 = Auto (default)

Specifies that an unknown metric is being used; the appropriate pitch may be any of the other pitch positions, or else there is not a constant pitch position (as may be the case for a proportional-pitch font), and the OCRMax function will determine the appropriate pitch metric.

2 = Left-to-Left

Specifies that pitch is measured as the distance from the left-side of a character's character region to the left-side of the adjacent character's character region.

Note: The terms "left" and "right" are relative to the coordinate axis defined by the ROI, i.e. "right" is equal to the positive X direction.

4 = Center-to-Center

Specifies that pitch is measured as the distance from the center of a character's character region to the center of the adjacent character's character region.

8 = Right-to-Right

Specifies that pitch is measured as the distance from the right-side of a character's character region to the right-side of the adjacent character's character region.

Note: The terms "left" and "right" are relative to the coordinate axis defined by the ROI, i.e. "right" is equal to the positive X direction.

Character Pitch Type

Specifies whether the spacing between successive characters has a single, fixed value, or varies, depending on the particular characters. Pitch is defined as the distance between (approximately) corresponding points on adjacent characters, and not the distance from the end of one character to the beginning of the next character (which is called the inter-character gap).

Note: If the Segmentation Analysis Mode parameter is set to Minimal, this parameter will be disabled.

1 = Auto (default)

Specifies that pitch type is unknown, but the pitch type is expected to be either fixed or proportional, and not variable. The OCRMax function will determine the best type.

2 = Fixed

Specifies that pitch is fixed, which means that the pitch between any pair of characters is constant, e.g. regardless of the width of the character rectangles of the characters. The pitch is measured based on the Character Pitch Position parameter.

4 = Proportional

Specifies that the pitch is proportional, which means that the pitch between any pair of characters depends on the particular characters. For example, the distance between two "i" lowercase letters may be much less than the distance between two "M" uppercase letters.

Note:
  • Although no pitch measurement is constant throughout a string, typically the inter-character gap, which is the distance from the right-side of one character's character region to the left-side of the adjacent character's character region, is approximately constant.
  • The terms "left" and "right" are relative to the coordinate axis defined by the ROI, i.e. "right" is equal to the positive X direction.

8 = Variable

Specifies that no character-to-character distance metric is consistent throughout a string, e.g. character placement is erratic, and the pitch is neither fixed nor proportional. The OCRMax function should not try to determine the type of pitch.

Note: Variable pitch is different from Auto, since Auto assumes that the pitch is either fixed or proportional, but which is not known.

Advanced Classification

Specifies parameters that adjust the Classification process, i.e. how the function classifies characters based on the difference between the trained character and the character in an acquired image.

Classifier Template Size Width

Specifies an acceptable X-scale factor (5 - 50; default = 10) between the trained character rectangle and the run-time character rectangles. When enabled, only instances that satisfy the scale constraints are computed.

Classifier Template Size Height

Specifies an acceptable Y-scale factor (5 - 50; default = 18) between the trained character rectangle and the run-time character rectangles. When enabled, only instances that satisfy the scale constraints are computed.

Maintain Character Aspect Ratio

Specifies whether or not the function should maintain the aspect ratio when resampling the unwrapped image at run-time.

0 = Off (default) | The function will not maintain the aspect ratio when resampling the unwrapped image at run-time.
1 = On | The function will maintain the aspect ratio when resampling the unwrapped image at run-time.

Skip Additional Character Validation

Specifies whether or not the function will perform additional character validation during classification.

0 = Off | The function will perform additional character validation during classification; this reduces the chances for misreads (i.e. false acceptance of a character).
1 = On (default) | The function will not perform additional character validation during classification. However, this option introduces the possibility for misreads.

Image Preprocessing

Specifies an image preprocessing function to perform prior to classification.

0 = None

The function will not perform any image preprocessing prior to classification.

1 = Normalized Histogram (default)

The function will normalize the image based on a histogram.

2 = Subtract Median

The function will subtract based on the median of a local neighborhood.

3 = Normalized Histogram & Subtract Median

The function will perform both a normalized histogram and subtract median image preprocessing during classification.

Note: When this option is selected, the histogram normalization is performed before the median subtraction.

Fielding

Fielding is used to provide information about what characters are expected at different positions in the string.

Ignore Unfielded Characters

Specifies whether or not, at each character position, to constrain the results to only include characters specified by the character's fielding. When enabled, all other characters in the font will be ignored, regardless of their classification score.

0 = Off (default) | The function will not constrain results based on the character's fielding.
1 = On | The function will constrain results based on the character's fielding.

String Length

Specifies whether or not fielding will be run in fixed-length or variable-length mode.

0 = Variable | The function will operate in variable-length mode.
1 = Fixed (default) | The function will operate in fixed-length mode.

Maximum String Length

Specifies the maximum acceptable string length (0 - 100; default = 25).

Note: This parameter is disabled if the String Length parameter is set to Fixed.

Minimum String Length

Specifies the minimum acceptable string length (0 - 100; default = 1).

Note: This parameter is disabled if the String Length parameter is set to Fixed.

Maximum First Fielded Index

Specifies the fielding subsequences to be considered, which must start at a position that is no greater than this index value (0 - 100; default = 100).

Note: This parameter is disabled if the String Length parameter is set to Fixed.

Minimum Last Fielded Index

Specifies the fielding subsequences to be considered, which must end at a position that is no greater than this index value (0 - 100; default = 0).

Note: This parameter is disabled if the String Length parameter is set to Fixed.

OCRMaxSettings Outputs

Returns

A Settings data structure containing the character string that was read, or #ERR if any of the input parameters are invalid.

For more information, see OCV/OCR, OCRMax, OCRMax, or Configure the OCRMax Function.


ReadText

Reads a text string in an image region using character models in a user-trainedfont.

Note:
  • The TrainFont, ReadText and VerifyText functions are only available on In-Sight vision systems using In-Sight firmware 4.x.x, and are not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the OCRMax function be used instead of the ReadText, TrainFont and VerifyText functions, which are legacy functions. The OCRMax function has enhanced performance capabilities.
Tip:
  • Always use VerifyTextif the string is known.The string will be read faster and be more accurate.For more information, see VerifyText.
  • If speed is notneeded for your application, enable ScaleTolerance parameter, since minor variations in size can degrade results significantly.
  • If your stringis found in the wrong location or not found at all, retry with Confusing Background parameter enabled.
  • If the wrong characteris being read, switch the Reading Mode parameter from Speed to Accuracy.Accuracy is better at distinguishing between charactersand gives a more accurate score.If the character is still being misread,open your trained fontand investigate the two confusing characters; they may have been trainedpoorly.For more information, see OCV/OCR Font Training Dialog.
  • If you are readinga string that always has spaces in the same place then add spaces to theField String.

ReadTextInputs

Syntax: ReadText(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Font,Field String,FieldDefinitions,AcceptThresh,DifferenceAccept,Tune,Reading Mode,Confusing Background,Scale Tolerance,Timeout,Show))

Parameter Description

Image

This argument must reference a spreadsheetcell that contains a valid Image data structure.By default, the cell referenced isA0 which contains the Image data structure returned by AcquireImage.For more information, see AcquireImage.

Fixture

Specifies the image coordinate system inwhich the input region is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Region

Specifies the rectangular image region thatcan be translated and rotated.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Font

Cell reference to a Font datastructure containing a trained font.

Field String

Specifies the number of characters containedin the character string.A Field Stringentry can be any alphanumeric character found in the text entry dialog,including:

  • (A to Z)
  • (ato z)
  • (0 to 9)
  • dashes(-)
  • dots (.)
  • spaces ( )

Each character in the FieldString corresponds to an indexed field position between 0 and 31.The Field String must containthe same number of positions as there are characters in the string forthe read to pass.By default, each position in the FieldString is represented as an asterisk (*) character, or alphanumeric"wildcard."This means that any character is valid at any positionin the string.However, an individual position in theField String can be limited toconsider only a subset of possible characters at that position.This increasesoverall performance and reliability because characters that are not possibleat a position will not be considered during a read.

The pre-defined FieldString entries are:

Field String Entry | Description | Valid Characters
* | Wildcard | Any trained character in the font.
N | Numeric | 0123456789
A | Uppercase alphabetical | ABCDEFGHIJKLMNOPQRSTUVWXYZ
a | Lowercase alphabetical | abcdefghijklmnopqrstuvwxyz
H | Hexadecimal, uppercase alphabeticaland numerical | 0123456789ABCDEF
h | Hexadecimal, lowercase alphabeticaland numerical | 0123456789abcdef
O | Octal | 01234567
Note:
  • To restrict a positionin a Field String to a singlecharacter, simply enter that character.The character must have been trainedin the font and cannot be one of the pre-defined FieldString entries listed above, unless it has been remapped usingthe FieldDefinitions parameter.
  • To read a stringcontaining a space, include the space in the FieldString.ReadText will not read a space if the corresponding Field String entry in that positionis an asterisk (*).

Closed Field StringExample 1

If the FieldString is **********AN, any character in the font is valid in thefirst 10 Field String positions.But in the 11th position, only uppercase alpha characters will be consideredduring the read.And in the 12th position, only numeric characters willbe considered.

Closed Field StringExample 2

The font contains only numeric characters0-9 and /.If the Field Stringis NN/NN/NN, only numeric characters will be considered in the first andsecond, fourth and fifth, and seventh and eighth positions.Only the forwardslash (/) character will be considered in the third and sixth positions.

But if the Field String is NN/NN/AA, the readwould return #ERR because the font does not contain any alpha characters.

Field Definitions
  • Optionally, the FieldDefinitions setting can be used to create user-defined entriesfor the FieldString.When included in the FieldString, these entries restrict the list of valid characters atthe positions in which they are inserted.
  • Multiple FieldDefinitions can be used, separated by a semicolon (;).
  • Characters listed for a FieldDefinitions entry must be contained in the font.For example: #=123is valid if 1, 2, and 3 are included in the user-trained font.However,#=123 would be invalid if 1, 2, and 3 are not included in the font.
Note: Using one of the predefined entries (*, A, a, N, H, h, O) in theField Definitions parameter willremap the list of valid characters in the new definition.

Closed Field Definitions Example 1

If the value of FieldDefinitions is #=123;$=3456;%=789, and the FieldString is #$%*******, then the only characters that will be validin the first position will be 1, 2, or 3.The only valid characters inthe second position will be 3, 4, 5, or 6.And in the third position,only 7, 8, or 9 will be valid.Any character in the font is valid in thefourth through tenth positions.

Closed Field Definitions Example 2

If the value of FieldDefinitions is #=123;$=3456;%=789, A=A, and the FieldString is #$%******A, then the only characters that will be validin the first position will be 1, 2, or 3.The only valid characters inthe second position will be 3, 4, 5, or 6.And in the third position,only 7, 8, or 9 will be valid.Any character in the font is valid in thefourth through ninth positions.Onlythe A character will be considered in the tenth position because the Field Definition A=A remaps the predefined FieldString entry.

Accept Thresh

Specifies the minimum acceptable match score(0 to 100; default = 70) for eachcharacter.ReadText will fail any character with a match score below Accept Thresh and fail the string.

Difference Accept

The minimum difference required between thematch scores of the highest scoring character and the second highest scoringcharacter (0 to 20; default = 0).

  • To find the second-highest scoring character,use: GetChar(Text,Index, 1)
  • To find the score for the second-highestscoring character, use: GetScore(Text,Index, 1)

Tune

Adjusts the scale of the character modelsin the referenced Font data structure from 50% to 200%.Matchscores are maximized when the character models are as close as possibleto the size of the characters to read.Enable Tuneonly when the difference between the size of the character models andthe characters to be read exceeds ±5%.

Tuning is a one-time operation that usessignificant processing time.After running the jobonce with Tune enabled, openthe spreadsheet and disable Tuneto save processing time during subsequent job runs.

0 = OFF (default) | Does not adjust the scale.
1 = ON | Adjusts the scale of the charactermodels to maximize the match score.

Reading Mode

Specifies whether an advanced algorithm isused to improve reading accuracy.

Note: Because ofbackground variations, occasionally selecting Speed will produce higherscores than when Accuracy is selected.Base selection on application.
Tip: The AcceptThresh parameter value may need to be lowered when Accuracy is selected due to strictscoring.
0 = Speed (default) | Do not use the advanced algorithm.Using this algorithm may increase the decode speed, but may be less accurate.
1 = Accuracy | Decode using the advanced algorithm.This algorithm is more accurate, but decode speed may decrease.

Confusing Background

Specifies if other features within the imageare being confused with the text string.This is especially useful ifother features within the image are being mistaken for the beginning ofthe string.

0 = OFF (default) | No other features within the imageare being confused with the text string.
1 = ON | Other features within the image arebeing confused with the text string.

Scale Tolerance

Specifies a tolerance of ± 10% to compensate for small variationsin character size.

0 = OFF (default) | Do not allow for small variationsin character scale.
1 = ON | Allow for small variations in characterscale.

Timeout

Specifies the amount of time, in milliseconds(0 to 30000), that the functionwill search for a valid text string before execution is halted and an#ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Show

Specifies which ReadText graphics overlaythe image.

0 = hide all (default) | All graphics will be hidden, exceptwhen the cell containing the ReadText function is highlighted in the spreadsheet.
1 = result graphics only | The character segments with theircorresponding labels will be displayed at all times.
2 = input and result graphics | The image region and the charactersegments with their corresponding labels will be displayed at all times.

ReadTextOutputs

Returns | A Text data structure containingthe character string that was read, or #ERR if any of the input parametersare invalid.
Results | When ReadText is initially inserted intoa cell, a result table is created in the spreadsheet.

ReadTextVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see VerifyText.

String | GetString(Text) | Returns the text string in the referencedText data structure.
StringPass | GetPassed(Text) | Returns the pass/fail status of the entirestring in the referenced Text data structure.
Char | GetChar(Text, Index0, [Index1]) | Returns the indexed character in the referencedText data structure.When an optional Index1parameter is 1, returns the secondhighest scoring character.
Score | GetScore(Text, Index0, [Index1]) | Returns the match score (0to 100) for the indexed character in the referenced Text data structure.If the optional Index1parameter is 1, returns the scoreof the second highest scoring character.
Passed | GetPassed(Text, Index) | Returns the pass/fail status of the indexedcharacter in the referenced Text data structure.If no Index parameter is specified, returnsthe pass/fail status of the entire string.

The following data elements can also be accessedusing Text Vision Data Access functions:

Angle | GetAngle(Text) | Returns the angle between the text stringin the Text data structure and the horizontal axis of the Image data structure.
Col | GetCol(Text,Index) | Returns the column coordinate (in pixels)of the indexed character in the referenced Text data structure.
High | GetHigh(Text,Index) | Returns the height (in pixels) of the indexedcharacter in the referenced Text data structure.
Row | GetRow(Text,Index) | Returns the row coordinate (in pixels) ofthe indexed character in the referenced Text data structure.
Wide | GetWide(Text,Index) | Returns the width (in pixels) of the indexedcharacter in the referenced Text data structure.


TrainFont

Trains font characters. When TrainFont is selected from the Insert Function Dialog, the OCV/OCR Font Training dialog is automatically opened. For more information, see OCV/OCR Font Training Dialog.

Note: The TrainFont, ReadText and VerifyText functions are only available on In-Sight vision systems using In-Sight firmware 4.x.x, and are not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

About In-Sight Fonts

A font is a set of up to 255 character models that are "trained"using one or more character instances extracted from an image.Each charactermodel in a trained font must be assigned a label.

A trained font is stored in a Font data structure.

  • VerifyText compares the characters in a text string with the existing character models stored in a font to verify the contents of the text string (OCV). For more information, see VerifyText.
  • ReadText compares the characters in a text string with the character models in a font to "read" the string (OCR). For more information, see ReadText
Note: Only Fonts with uniform character sizes should be trained. The size of the corresponding character segments should also be uniform. If font sizes differ, create separate TrainFont structures. Also, train characters as a block so that character spacing can be learned.

TrainFont Inputs

Syntax: TrainFont(Image,Show)

Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Show

Specifies the display mode for TrainFont graphics on the image when a Font data structure is selected in the spreadsheet.

Note: The value for the Show parameter can be modified in the Formula Bar once the function has been inserted into the spreadsheet. For more information, see Spreadsheet Cell Execution and Editing Reference.
0 = hide all (default) | All graphics will be hidden.
1 = database instances | Displays the database instances associated with the trained models when the cell containing the TrainFont function is highlighted in the spreadsheet.
2 = trained models | Displays the trained models when the cell containing the TrainFont function is highlighted in the spreadsheet.

TrainFont Outputs

Returns

 A Font data structure containing a database of character models.

TrainFont Vision Data Access Functions

The following data elements can be accessed using VisionData Access functions. For more information, see Text (OCV/OCR)

GetFontLabel(Font, Index) | Returns the label of the indexed character model from the referenced Font data structure.
GetFontName(Font) | Returns the name of the font from the referenced Font data structure.
GetFontNumCharacter(Font) | Returns the number of character models in the referenced Font data structure.


VerifyText

Verifies the characters in a text string within an image region. Compares the characters in the text string to character models in a user-trained font and against potentially confusing characters.

Note:
  • The TrainFont, ReadText and VerifyText functions are only available on In-Sight vision systems using In-Sight firmware 4.x.x, and are not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the OCRMax function be used instead of the ReadText, TrainFont and VerifyText functions, which are legacy functions. The OCRMax function has enhanced performance capabilities.
Tip:
  • If speed is not needed for your application, enable Scale Tolerance, since minor variations in size can degrade results significantly.
  • If your string is found in the wrong location or not found at all, retry with Confusing Background enabled.
  • If the wrong character is being verified, switch the Reading Mode from Speed to Accuracy. Accuracy is better at distinguishing between characters and gives a more accurate score.If the character is still being mis-verified, open your trained font and investigate the two confusing characters; they may have been trained poorly. For more information, see OCV/OCR Font Training Dialog.

VerifyTextInputs

Syntax: VerifyText(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Font,String,AcceptThresh,Difference Accept,Tune,Reading Mode,Confusing Background,Scale Tolerance,Timeout,Show)

Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Fixture

Specifies the image coordinate system in which the input region is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Region

Specifies the rectangular image region that can be translated and rotated.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Font

Cell reference to a Font data structure containing a trained font.

String

Characters to verify, up to a maximum of 100 characters.

Note: Note: VerifyText will verify a blank space in a text string if it occupies the same amount of space in the image as a character.

Accept Thresh

Specifies the minimum acceptable match score (0 to 100; default = 90) for each character. VerifyText will fail any character with a match score below the Accept Thresh and fail the string.

Difference Accept

The minimum difference required between the match scores of the highest scoring character and the second highest scoring character (0 to 20; default = 0).

  • To find the second-highest scoring character, use: GetChar(Text,Index, 1)
  • To find the score for the second-highest scoring character, use: GetScore(Text,Index, 1)

Tune

Adjusts the scale of the character models in the referenced Font data structure from 50% to 200% to correspond to the image characters and maximize the match score. Select Tune only when the difference between the size of the character models and the characters to be read exceeds ±5%.

0 = OFF (default) | Does not adjust the scale.
1 = ON | Adjusts the scale of the character models to maximize the match score.
Tip: Tuning is a one-time operation that uses significant processing time. After running the job once with Tune enabled, open the spreadsheet and disable Tuneto save processing time during subsequent job runs.

Reading Mode

Specifies whether an advanced algorithm is used to improve reading accuracy.

Note: Because of background variations, occasionally selecting Speed will produce higher scores than when Accuracy is selected.Base selection on application.
Tip: The Accept Thresh parameter may need to be lowered when Accuracy is selected, due to strict scoring.
0 = Speed (default) | Do not use the advanced algorithm. Using this algorithm may increase the decode speed, but may be less accurate.
1 = Accuracy | Decode using the advanced algorithm. This algorithm is more accurate, but decode speed may decrease.

Confusing Background

Specifies if other features within the image are being confused with the text string. This is especially useful if other features within the image are being mistaken for the beginning of the string.

0 = OFF (default) | No other features within the image are being confused with the text string.
1 = ON | Other features within the image are being confused with the text string.

Scale Tolerance

Specifies a tolerance of ± 10% to compensate for small variations in character size.

0 = OFF (default) | Do not allow for small variations in character scale.
1 = ON | Allow for small variations in character scale.

Timeout

Specifies the amount of time, in milliseconds(0 to 30000), that the function will search for a valid text string before execution is halted and an #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Show

Specifies the display mode for VerifyText graphics overlays on the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the VerifyText function is highlighted in the spreadsheet.
1 = result graphics only | The character segments with their corresponding labels will be displayed at all times.
2 = input and result graphics | The image region and the character segments with their corresponding labels will be displayed at all times.

VerifyText Outputs

Returns | A Text data structure containing the verified character string, or #ERR if any of the input parameters are invalid.
Results | When VerifyText is initially inserted into a cell, a result table is created in the spreadsheet.

VerifyText Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Text (OCV/OCR).

String | GetString(Text) | Returns the text string in the referenced Text data structure.
StringPass | GetPassed(Text) | Returns the pass/fail status of the entire string in the referenced Text data structure.
Char | GetChar(Text, Index0, [Index1]) | Returns the indexed character from the referenced Text data structure. When an optional Index1 parameter is 1, returns the character in the referenced Text data structure most similar to the character specified in the Index0 parameter if the difference in match scores between the two characters is less than 10%.
Score | GetScore(Text, Index0, [Index1]) | Returns the match score (0 to 100) of the indexed character in the referenced Text data structure. When an optional Index1 parameter is 1, returns the match score of the character in the referenced Font data structure most similar to the character specified in the Index0 parameter if the difference in match scores between the two characters is less than 10%.
Passed | GetPassed(Text, Index) | Returns the pass/fail status of the indexed character in the referenced Text data structure. If no Index parameter is specified, returns the pass/fail status of the entire string.

Additional data elements can be accessed using the following Text Vision Data Access functions:

Angle | GetAngle(Text) | Returns the angle between the text string in the Text data structure and the horizontal axis of the Image data structure.
Col | GetCol(Text, Index) | Returns the column coordinate (in pixels)of the indexed character in the referenced Text data structure.
Contrast | GetContrast(Text, Index) | Returns the contrast between the foreground and background (in grey levels, 0 to 255) of the indexed character in the referenced Text data structure.
High | GetHigh(Text, Index) | Returns the height (in pixels) of the indexed character in the referenced Text data structure.
Row | GetRow(Text, Index) | Returns the row coordinate (in pixels) of the indexed character in the referenced Text data structure.
Wide | GetWide(Text, Index) | Returns the width (in pixels) of the indexed character in the referenced Text data structure.


OCV/OCR Font Training Dialog

The OCV/OCR Font Training dialog allows you to add, modify or delete character models to create a user-trained font, which will be stored in the TrainFont function. This font is then used when reading or verifying text, using the ReadText and VerifyText functions, respectively.

Note:
  • The TrainFont, ReadText and VerifyText functions are only available on In-Sight vision systems using In-Sight firmware 4.x.x, and are not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the OCRMax function be used instead of the ReadText, TrainFont and VerifyText functions, which are legacy functions. The OCRMax function has enhanced performance capabilities.
  • A maximum of eight instances of each character may be extracted to train each character model in the font. By adding more character instances, you increase the variation tolerance of the corresponding character model in the font.
  • A font may contain up to 255 character models, as well as 8 instances of a particular character; each model is assigned a single-character label. When either of these limits is surpassed, the In-Sight sensor will ignore any additional character models and they will not be added.
  • An OCV/OCR application with little variation in character attributes from one image to the next may require only one instance of each character to be extracted. The number of character instances needed increases as greater tolerance to variations in character attributes is required.
  • When the user interface Language is set to a value other than Chinese or Korean, OCV/OCR operations (including Delete and Relabel) will not function on character instances if the label contains Chinese or Korean characters. Set the user interface to the correct language for the characters contained in the label and retry the operation or use English characters in the labels.
  • Multiple-byte character model names (e.g. Kanji) are not supported. Multiple-byte characters can be trained, but the character model name given to the character model must be a single byte name.

Open the Font Training Dialog

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog.

  2. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.

  3. Select the OCV/OCR tool category.

  4. Select the TrainFont function from the function list and press the OK button or double-click the function name.

    The Font Training dialog appears.

Image Tab

The Image tab allows you to obtain images that you will use to train the font. If the desired image is already loaded as the active image, proceed to the next section. Otherwise, you can obtain a valid image using any of the following methods:

  • Start Live: Places the sensor into Live Acquisition Mode to display a real-time image. Click Stop Live once the desired image has been acquired.

  • Open Image: Displays the Open dialog, which allows you to load an image from an In-Sight sensor, your local PC or a networked PC.

  • Select Reference Image: Enters Cell Selection Mode to reference an Image structure in the active job. (Spreadsheet View only)

  • Image Reference: Defines which image the tool will utilize to perform its inspection.

Training Tab

The Training tab allows characters to be extracted from an image to create models of each character.

Tip:
  • If an image filter is used while training the font, the same filter should be used when reading or verifying the font. Failure to do so will result in poor read/verify accuracy.
  • If the font is embossed, better performance may be achieved by applying an Erode or Dilate filter (depending on if the font is black or white) to fill in the embossed center of the character strokes.

  1. Choose a meaningful name for the font. Naming a font is useful when a job includes more than one Font data structure in the spreadsheet.

    Note: The name of the font can be returned in the spreadsheet, using the GetFontName function.

  2. If the characters you wish to train are lighter than their surrounding background, you should choose Light on Dark for the Polarity. Otherwise, choose Dark on Light.

    Note: Ensure that you set the correct Polarity for your characters before clicking the Add To Font button; Polarity cannot be changed once character models have been added to the font.

  3. By default, all characters will be added to the font, even if an instance of one or more of the characters already exists in the font. Click Train New Characters Only if you want to add only new characters to the font.

  4. Enter the String that matches the first line of text containing the characters you wish to train.

  5. Click the Region button.

  6. Position and size the interactive graphic so that it encloses the characters to be trained.

  7. Double-click within the region to accept the modifications.

  8. Click the Segment button. The characters in the Region will be separated into individual character instances, based on the specified String.

  9. If any of the characters have not been segmented correctly, click the Modify button to fine-tune the interactive graphic region for individual character instances. To adjust an incorrect segment, click on the segment Region and adjust the position and size to surround the correct character. Repeat this step until all segments are correctly positioned around the characters.

  10. If any of the characters have not been labeled correctly, first verify that the specified String matches the characters in the image. If the String is correct, click the Relabel button. Double-click the mislabeled character to open the Relabel dialog. Enter the correct label and click OK.

  11. If needed, click the Delete button to removes individual segments.

  12. Once all characters have been segmented and labeled correctly, click the Add to Font button. An instance of each character in the selected line of text is added to the current font. Repeat these steps for each additional line of text containing characters to be trained.

    Note:
    • Once characters have been added to the font, segments cannot be modified, relabeled or deleted.
    • When possible, do not add a single character to a trained font. Doing so eliminates spacing information, which is important when reading the character in a string. If you do need to train a single character use the following steps.
      • After segmenting the character press the "Modify" button.
      • Adjust the width of the character box to include space on each side of the character. The sides of the character box should be half way between the trained character and the character next to it, as shown.

Font Tab

The Font tab is used to view and edit character models in a trained font. A character model is a composite character of a font, formed by taking into account all trained instances of that character.

Your font now contains several character models. Some of the models (such as "C" and "o") consist of multiple character instances. A character instance is a greyscale pattern used as an input to create an OCV/OCR model. All characters, including spaces and punctuation, are segmented and given character models.

At this point, you can browse through character models and delete, edit, rename or enable/disable any particular character model or character instance. For more information, see Image Editor.

When the root level [image] of the font tree is chosen, a model for each character is displayed. If a character folder is selected within the font tree, the composite character model (denoted with *) is displayed, along with any instance of the trained character used to create the model (denoted with an index number, starting at 0). Each instance of a trained character is kept in a separate sub-folder.

  1. The Enable checkbox specifies whether a character model is used in the font, and which instances of each character are used to build the model. By default, this checkbox is enabled for all character models. To disable a character model or character instance, highlight the model or instance and disable the checkbox.

    Note:
    • If the Enable checkbox is disabled for a character model, then all instances of that character will be disabled.
    • Disabled character instances do not factor into the resultant character model.

  2. If a character model or character instance is incorrect, highlight the mislabeled model or instance and click the Relabel button to correct the label. If a character model is selected, Relabel will change the name of every instance within that model. If a single character instance is selected, then only that instance will be relabeled, moving it to the corresponding character model folder.

  3. To delete a character model, or individual character instances from a character model, highlight it and click the Delete button.

    Note: Deleting a character model will permanently delete all trained instances of that character.

  4. Click the Edit/View button to launch the Image Editor to view a close-up of the selected character model or character instance. Character models can be edited; character instances can only be viewed. A character model that has been edited is denoted with * next to the folder in the font tree.

    Note: Use the Image Editor sparingly. You will achieve better results by using good examples of the font than editing poor examples.
  5. If you are unsatisfied with the manual edits made to the character model, you can click the Rebuild Model button to rebuild the selected font character and remove all manual edits made using the Image Editor.
  6. To start over, and remove all character models and instances from the font, click the Delete All button.

Difference Table Tab

The Difference Table tab displays the difference of the scores for the two selected characters, comparing each character model with all other models. The row and column headers define the character labels, as they were defined when characters were trained. The higher the Score Difference between two characters, the less likely it is that those characters will be confused for one another during the inspection. This data is useful because it indicates any weaknesses in the trained font that could negatively impact performance. In the example below, the score difference between the character models for "e" and "C" is significantly higher at 95, indicating that it is very unlikely these two characters would ever be confused for the current font. At the other extreme, the score difference between the character models for the "o" and "e" is only 27. Thus, this character pair is more vulnerable to confusion.

  1. Specify the Scoring Mode difference table to display (Speed or Accuracy). As mentioned previously, the higher the difference score, the less likely the two selected characters will be confused as being the same character during the inspection.

    Tip: The scores returned in the Difference Table can be a good indication of whether to use Speed or Accuracy for the Reading Mode parameter selection in ReadText/VerifyText.

  2. Enter a value in the Highlight Differences Value field. All character model comparisons scoring at or below the Differences Value will be highlighted in yellow, indicating which character model pairs are most likely to be confused for one another. Click the up/down arrow buttons to increase or decrease the threshold for highlighting score differences or type in the value. The Warning Count updates to indicate the number of character model comparisons scoring below the Differences Value. The count depends on the threshold specified for Highlight Differences Value.

  3. Click on each yellow highlighted pair to view the character models side-by-side. The Selected Characters field displays the models of each character being compared. The Score Difference displays the difference of the scores for the selected characters. The comparison may reveal that the character models were not trained correctly or that the character models were trained under poor imaging conditions or using low quality characters.

    Note: If a character has been disabled in the Font tab, no score will be displayed.


Pattern Match

The In-Sight Pattern Match tools locate features in an input image that exhibit maximum similarity to a trained pattern. This kind of pattern matching is also referred to as "template matching". The Pattern Match tools include the following functions:

PatMax RedLine™

The latest pattern matching tool that can locate trained features in a 5 megapixel image up to 7x faster than PatMax®. Ideal for high resolution In-Sight vision systems.

Note: The following functions are only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • FindPatMaxRedLine: Finds matches to a trained pattern using PatMax RedLine algorithms.
  • TrainPatMaxRedline: Extracts and trains a pattern from a greyscale image using PatMax RedLine algorithms.

PatMax RedLine Color

The only color pattern matching tool that can locate trained color features in the 24-bit color image without converting to greyscale.

Note: The TrainPatMaxRedLineColor and FindPatMaxRedLineColor functions are only available on In-Sight 7000 Gen2 series color vision systems and In-Sight 8000 series color vision systems running In-Sight firmware 5.6.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • FindPatMaxRedLineColor: Finds matches to a trained color pattern using PatMax RedLine Color algorithms.
  • TrainPatMaxRedLineColor: Extracts and trains a color pattern from a color image using PatMax RedLine Color algorithms.

PatMax®

High speed and high accuracy pattern matching tool using a feature-based representations.

  • FindPatMaxPatterns: Finds matches to a trained pattern using PatMax algorithms.
  • TrainPatMaxPattern: Extracts and trains a pattern from an image using PatMax algorithms.

PatFind®

Pattern matching tool based on pixel grid representations.

  • FindPatterns: Trains and locates greyscale patterns.
  • SortPatterns: Sorts pattern match positions.

About Pattern Finding

Greyscale and Color PatMax RedLine™ Functions

FindPatMaxPatterns

FindPatMaxRedLine

FindPatMaxRedLineColor

FindPatterns

SortPatterns

TrainPatMaxPattern

TrainPatMaxRedLine

TrainPatMaxRedLineColor

Overview of PatMax Pattern

Overview of PatMax RedLine


About Pattern Finding

Pattern finding can exhibit a range of characteristics depending on the nature of the similarity metrics employed, but the basic concepts remain more or less the same regardless of the implementation.

The pattern finding process consists of two phases: training and finding.

  • In the training phase, a region containing an example of the pattern to be located is manually identified and extracted to create a trained pattern.
  • In the finding phase, new images presented to the system are searched for positions that exhibit maximum similarity, according to the specified metrics. These local match positions are sorted in order of descending similarity, and the best responses above a specified minimum level of similarity are reported.


Greyscale and Color PatMax RedLine™ Functions

Edge Finding

The TrainPatMaxRedLine and FindPatMaxRedLine functions operate on greyscale images only. When these functions perform the pattern extraction, the image is converted to a greyscale image. This process may result in losing some edge features because many combinations of RBG values can convert to the same greyscale level. On the other hand, the TrainPatMaxRedLineColor and FindPatMaxRedLineColor functions directly process color images without any conversion, and find the edge features better in many cases.

Original Image (Blue Background with Red Text)
TrainPatMaxRedLine | TrainPatMaxRedLineColor

The above images show an extreme example where the edge features become completely undetectable after converting the color image to greyscale (the grey box is what PatMax RedLine sees when training). In this case, the TrainPatMaxRedLine function fails to train because no edges can be detected in the greyscale image. On the other hand, the TrainPatMaxRedLineColor function finds the edge features without any issues and trains the feature successfully.

Note: The PatMax RedLine Color functions will not operate on a greyscale input image; the tool will return #ERR in this case. The TrainPatMaxRedLine and FindPatMaxRedLine functions should continue to be used to solve greyscale applications.

Color Matching

In addition to the PatMax RedLine functions' existing functionality (e.g. tolerances including rotation, scale, and XY overlap), the PatMax RedLine Color functions use colors to find the best match.

PatMax RedLine Color | PatMax RedLine
Find Blue Parts on Grey Background | Find Patterns on Greyscale Image
Find Blue Parts on Any Background |
Find All Matching Shapes of Any Color, on Any Background |


FindPatMaxPatterns

Finds objects in an image based on a trained pattern. FindPatMaxPatterns finds patterns within an image based on a trained pattern from a Patterns structure.

FindPatMaxPatterns Inputs

Syntax: FindPatMaxPatterns(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Find Region.X,Find Region.Y,Find Region.High,Find Region.Wide,Find Region.Angle,Find Region.Curve,External Region,Pattern,Number to Find,Accept,Contrast,Clutter in Score,Outside Region,Find Tolerances.Angle Start,Find Tolerances.Angle End,Find Tolerances.Scale Start,Find Tolerances.Scale End,Find Tolerances.Aspect Ratio,Find Tolerances.Aspect Start,Find Tolerances.Aspect End,Find Overlapping.XY Overlap,Find Overlapping.Angle Overlap,Find Overlapping.Scale Overlap,Find Overlapping.Aspect Overlap,Timeout,Algorithm,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Find Region relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. For more information, see Fixture or Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Find Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note:
  • If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.
  • In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger. When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

Pattern

This argument must reference a spreadsheet cell that contains a valid Patterns data structure returned by the TrainPatMaxPattern function. For more information, see TrainPatMaxPattern.

Number to Find

Specifies the maximum number of pattern matches to return (1 to 1024; default = 1).

Accept

Specifies the acceptance threshold, which is the lowest score of a valid instance. The score for a potential match must be greater than the value of the acceptance threshold or that match are not returned (0 to 100; default= 50).

Contrast

Specifies the lowest contrast of a valid instance. The contrast for a potential match must be greater than the value of the Contrast Threshold or that instance are not considered (0 to 255; default = 10). A low contrast threshold is used for low-contrast images; a high contrast threshold is used for high-contrast images.

Clutter in Score

Specifies whether missing or occluded pattern features reduce the response score(s).

0 = OFF | Do not include the effect of clutter in score.
1 = ON (default) | Include the effect of clutter in score.

Outside Region

Specifies the percentage of pattern features that may be found outside the Find Region without degrading the pattern response score (0 to 100; default = 0).

Find Tolerances

Specifies the settings for finding patterns that are rotated or scaled with respect to the trained pattern.

Angle Start

Specifies the angle at which to begin searching for matches, in degrees counter-clockwise (-180 to 180; default = -15).

Angle End

Specifies the angle at which to stop searching for matches, in degrees counter-clockwise (-180 to 180; default = 15).

Scale Start

Specifies the scale at which to begin searching for matches (1 to 10000; default= 100).

Scale End

Specifies the scale at which to stop searching for matches (1 to 10000; default= 100).

Aspect Ratio

Limits match-finding to uniform-scale only or allows aspect ratio change in X or Y, in addition to a uniform scale.

Note: The Aspect Start and Aspect End parameters are disabled if Uniform Scale Change is selected.

0 = Uniform Scale Change

1 = Uniform and X Scale Change

2 = Uniform and Y Scale Change

Aspect Start

Specifies the minimum scale change, at which to begin searching for matches, as a percentage of the trained pattern (1 to 10000; default = 100).

Aspect End

Specifies the maximum scale change, at which to stop searching for matches, as a percentage of the trained pattern (1 to 10000; default = 100).

Find Overlapping

Specifies the settings for finding patterns that overlap each other with respect to position, rotation and scale.

XY Overlap

Specifies the expected position difference between multiple overlapping patterns in roughly the same X, Y location, as a percentage of the trained pattern size (0 to 100; default = 80).

Note: Increasing this value allows finding multiple overlapping matches of the same pattern.

Angle Overlap

Specifies the expected angle between multiple rotated overlapping patterns in roughly the same X, Y location. A (0 to 360; default = 360).

Note:
  • The Angle Overlap parameter is disabled if the values for the Angle Start and Angle End parameters are equal to each other.
  • Increasing this value allows finding multiple overlapping matches of the same pattern.

Scale Overlap

Specifies the expected uniform scale difference between multiple overlapping patterns in roughly the same X, Y location, as a percentage of the trained pattern size (1to 10000; default = 140).

Note:
  • The Scale Overlap parameter is disabled if the values for the Scale Start and Scale End parameters are equal to each other.
  • Increasing this value allows finding multiple overlapping matches of the same pattern.

Aspect Overlap

Specifies the expected aspect scale difference between multiple overlapping patterns in roughly the same X, Y location, as a percentage of the trained pattern size (1to 10000; default = 140).

Note:
  • The Aspect Overlap parameter is disabled if Uniform Scale Change is selected for the Aspect Ratio parameter or if the if the values for the AspectStart and Aspect End parameters are equal to each other.
  • Increasing this value allows finding multiple overlapping matches of the same pattern.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000), that the function searches for patterns before execution is halted and an #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.
Algorithm

Specifies the algorithm to use to process the image for the trained pattern.

0 = PatMax | The PatMax algorithm offers higher accuracy than PatQuick, but requires more time to execute.
1 = PatQuick | The PatQuick algorithm offers lower accuracy than PatMax, but requires less time to execute.
2 = Trained Pattern (default) | The FindPatMaxPatterns function uses the algorithm (PatMax or PatQuick) specified in the Algorithm parameter of the TrainPatMaxPattern function referenced in the Pattern parameter.

Show

Specifies the display mode for graphical overlays on top of the image.

0 = hide all (default)

All graphics are hidden, except when the cell containing the FindPatMaxPatternsfunction is the active cell in the spreadsheet.

1 = result graphics only

A cross is displayed for each found pattern at all times.

2 = input and result graphics

Both the input image region and a cross for each found pattern are displayed at all times.

3 = show all: input, result, and match features

The input image region, a cross for each found pattern, and the PatMax® match features are displayed at all times.

Note: Match features are not shown when PatQuick is selected for the TrainPatMaxPattern's Algorithm parameter.
  • Green match features = 67 to 100 percent match.
  • Yellow match features = 20 to 66 percent match.
  • Red match features = less than 20 percent match.

FindPatMaxPatterns Outputs

Returns

A Patterns data structure containing a model and a list of pattern responses sorted by score, or #ERR if anyof the input parameters are invalid or no matching patterns could be found.

Results

When FindPatMaxPatternsis initially inserted into a cell, a result table is created in the spreadsheet.

Note: While in the function's property sheet, supplemental information strings are provided as suggestions for better finding patterns. For a list of possible information strings, click Closed here.
  • [Value]result(s) discarded due to low contrast.
  • [Value]result(s) discarded due proximity to more accurate results.
  • [Value]result(s) discarded due to excess clutter.
  • Trained pattern contains too few features for current parameter settings.

To insert information strings into the spreadsheet, use the GetInfoStringVision Data Access function.

FindPatMaxPatterns Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Patterns.

Row | GetRow(Patterns, Index) | The row coordinate of the pattern position.
Col | GetCol(Patterns, Index) | The column coordinate of the pattern position.
Angle | GetAngle(Patterns, Index) | The orientation of the pattern position.
Scale | GetScale(Patterns, Index) | The size of the pattern found compared tothe trained model, as a percentage of the model size.
Score | GetScore(Patterns, Index) | The pattern response score.


FindPatMaxRedLine

Finds objects in an image based on a trained pattern. FindPatMaxRedLine finds patterns within an image based on a trained pattern from a Patterns structure.

Note:
  • From In-Sight firmware 5.5.0 and later, the function's algorithm has been changed to return more accurate results and decrease the execution time in some circumstances.
  • Due to this change, when attempting to load a job containing this function configured on the In-Sight firmware 5.5.0 or later to an In-Sight vision system running firmware version 5.4.x or earlier, an error message is displayed and any cells that contains this function will result in #ERR.
  • This function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

FindPatMaxRedLine Inputs

Syntax: FindPatMaxRedLine(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Find Region.X,Find Region.Y,Find Region.High,Find Region.Wide,Find Region.Angle,Find Region.Curve,External Region,Pattern,Number to Find,Accept Threshold,Ignore Polarity,Accuracy Mode,Clutter in Score,Contrast Threshold,Find Tolerances.Angle Start,Find Tolerances.Angle End,Find Tolerances.Scale Start,Find Tolerances.Scale End,XY Overlap,Advanced Settings.Use Coarse Percentage,Advanced Settings.Coarse Accept Percentage,Timeout,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Find Region relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. For more information, see Fixture or Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Find Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High (default = 320) | The dimension along the region's x-axis.
Wide (default = 440) | The dimension along the region's y-axis.
Angle (default = 0) | The orientation, in fixture coordinates.
Curve (default = 0) | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.
  • Mask: For more information, see Mask

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area. For more information, see Cell References - Relative/Absolute.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Pattern

This argument must reference a spreadsheet cell that contains a valid Patterns data structure returned by the TrainPatMaxRedLine function. For more information, see TrainPatMaxRedLine.

Number to Find

Specifies the maximum number of pattern matches to return (1 to 1000; default = 1).

Accept Threshold

Specifies the acceptance threshold, which is the lowest score of a valid instance. The score for a potential match must be greater than the value of the acceptance threshold or that match is not returned (0 to 100; default = 50).

Ignore Polarity

Specifies whether matches can be found that contain color-inverted match features with respect to the trained pattern.

0 = Off (default) | Do not match color-inverted features.
1 = On | Consider edges that match with opposite polarities.

Ignoring Polarity increases the variety of patterns that PatMax finds. Figure below shows some examples of matched and mismatched polarities. If you configure PatMaxRedLine to ignore polarity, it finds all of the patterns shown in the figure. If you configure PatMaxRedLine to consider polarity, it might not find the pattern in the bottom row, or it might find them but assign them lower scores than the patterns in the upper row.

Accuracy Mode

Specifies the tradeoff between accuracy/reliability and execution speed.

0 = Low | Specifies lower accuracy/reliability and faster execution speed.
1 = High (default) | Specifies higher accuracy/reliability and slower execution speed.

Clutter in Score

Specifies whether missing or occluded pattern features will reduce the response score(s).

0 = OFF (default) | Do not include the effect of clutter in score.
1 = ON | Include the effect of clutter in score.

Contrast Threshold

Specifies the lowest contrast of a valid instance. The contrast for a potential match must be greater than the value of the Contrast Threshold or that instance will not be considered (0 to 100; default = 0). The contrast value for FindPatMaxRedLineColor and FindPatMaxRedLine are the relative measure of contrast change between features in the trained pattern versus match features in search image, in percentage. Therefore, if feature contrast is similar or high to pattern contrast, reported Contrast will be ~100. If the pattern contrast exceeds the feature contrast, the reported Contrast will be <100.

Note: The Contrast for FindPatMaxRedLineColor and FindPatMaxRedLine are different from the contrast for FindPatMaxPatterns, which is the "absolute" image contrast of the search ROI, in grey scale level.

Find Tolerances

Specifies the settings for finding patterns that are rotated or scaled with respect to the trained pattern.

Note: The Find Tolerances are hard limits, i.e. any results that are found outside of the specified Find Tolerances are not returned in the spreadsheet.
Angle Start | Specifies the angle at which to begin searching for matches, in degrees counter-clockwise (-180 to 180; default = -15).
Angle End | Specifies the angle at which to stop searching for matches, in degrees counter-clockwise (-180 to 180; default = 15).
Scale Start | Specifies the scale at which to begin searching for matches (1 to 10000; default = 100).
Scale End | Specifies the scale at which to stop searching for matches (1 to 10000; default = 100).

XY Overlap

This parameter controls the ability of the tool to find pattern candidates that overlap each other. Specifies the expected position difference between multiple overlapping patterns in roughly the same X,Y location, as a percentage of the trained pattern size (0 to 100; default = 70).

Note: Increasing this value allows finding multiple overlapping matches of the same pattern.

Advanced Settings

Use Coarse Percentage

Specify whether or not configure the Coarse Accept Percentage value is used during the coarse search phase.

Note: In most cases, this setting does not need to be enabled.
0 = Off (default) | Only the Accept Threshold value is used during the coarse search phase (the Coarse Accept Percentage value is ignored).
1 = On | The Coarse Accept Percentage parameter is enabled to specify the deviation from the Accept Threshold value as a percentage, which is used during the coarse search phase.

Coarse Accept Percentage

Specify the deviation from the Accept Threshold value as a percentage, which is used during the coarse search phase (0 to 100; default = 60). This parameter is useful when the Accept Threshold value cannot narrow down instances effectively, and the function returns no match or too many matches.

Closed How Coarse Accept Percentage Works

FindPatMaxRedLine first uses large features to find an approximate pattern match in a run-time image (coarse search phase), and then uses small features to determine the pattern location precisely (fine search phase). During both phases, the Accept Threshold value is used to narrow down found instances.

Normal Flow (Use Coarse Percentage = OFF)

While rare, FindPatMaxRedLine may not return any matches because only low score instances are found during the coarse search phase. If this happens, the Accept Threshold setting can be lowered; however, the lower Accept Threshold value may result in returning too many matches.

Returns No Match or Too Many Matches (Use Coarse Percentage = OFF)

In such cases, the Coarse Accept Percentage setting allows you to define the acceptance threshold value just for the coarse search phase. By using different acceptance threshold value for each search phase, the expected results can now be returned.

Returning Expected Results (Use Coarse Percentage = ON)

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 5000, disabling the timeout), that the function will search for patterns before execution is halted and an #ERR is returned.

Show

Specifies the display mode for graphical overlays on top of the image.

0 = hide all (default) | All graphics are hidden, except when the cell containing the FindPatMaxRedLine function is the active cell in the spreadsheet.
1 = result graphics only | A cross is displayed for each found pattern at all times.
2 = input and result graphics | Both the input image region and a cross for each found pattern are displayed at all times.
3 = show all: input, result, and match features | The input image region, a cross for each found pattern, and the PatMax RedLine match features are displayed at all times.

FindPatMaxRedLine Output

Returns | A Patterns data structure containing a model and a list of pattern responses sorted by score, or #ERR if any of the input parameters are invalid or no matching patterns could be found.
Results | When FindPatMaxRedLine is initially inserted into a cell, a result table is created in the spreadsheet.

FindPatMaxRedLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Patterns.

Name | VDA Function | Description
Row | GetRow(Patterns, Index) | The row coordinate of the pattern position.
Col | GetCol(Patterns, Index) | The column coordinate of the pattern position.
Angle | GetAngle(Patterns, Index) | The orientation of the pattern position.
Scale | GetScale(Patterns, Index) | The size of the pattern found compared to the trained model, as a percentage of the model size.
Score | GetScore(Patterns, Index) | The pattern response score.


FindPatMaxRedLineColor

Finds objects in a color image based on a trained pattern. FindPatMaxRedLineColor finds patterns within a color image based on a trained pattern from TrainPatMaxRedLineColor's Patterns structure. For more information, see TrainPatMaxRedLineColor.

Note:
  • The TrainPatMaxRedLineColor and FindPatMaxRedLineColor functions are only available on In-Sight 7000 Gen2 series color vision systems and In-Sight 8000 series color vision systems running In-Sight firmware 5.6.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • When using a greyscale image, the TrainPatMaxRedLine and FindPatMaxRedLine function must be used. When attempting to use the TrainPatMaxRedLineColor and FindPatMaxRedLineColor functions on a greyscale image (for example, ColorToGreyscaleFilter's output), #ERR is returned.
  • The FindPatMaxRedLineColor function must reference the TrainPatMaxRedLineColor function. When referenced a different function (for example, a TrainPatMaxRedLine function), #ERR is returned.

FindPatMaxRedLineColor Inputs

Syntax: FindPatMaxRedLineColor (Image,Fixture.Row,Fixture.Column,Fixture.Theta,Find Region.X,Find Region.Y,Find Region.High,Find Region.Wide,Find Region.Angle,Find Region.Curve,External Region,Pattern,Number to Find,Accept Threshold, Pattern,Accept Threshold, Color,Accuracy Mode,Clutter in Score,Contrast Threshold,Find Tolerances.Angle Start,Find Tolerances.Angle End,Find Tolerances.Scale Start,Find Tolerances.Scale End,XY Overlap,Advanced Settings.Use Coarse Percentage,Advanced Settings.Coarse Accept Percentage,Timeout,Show Graphics)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Note: This parameter must reference a color image.

Fixture

Defines the Find Region relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. For more information, see Fixture or Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Find Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High (default = 320) | The dimension along the region's x-axis.
Wide (default = 440) | The dimension along the region's y-axis.
Angle (default = 0) | The orientation, in fixture coordinates.
Curve (default = 0) | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.
  • Mask: For more information, see Mask

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area. For more information, see Cell References - Relative/Absolute.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Pattern

This argument must reference a spreadsheet cell that contains a valid Patterns data structure returned by the TrainPatMaxRedLineColor function.

Number to Find

Specifies the maximum number of pattern matches to return (1 to 1000; default = 1).

Accept Threshold, Pattern

Specifies the pattern acceptance threshold, which is the lowest score of a valid instance. The score for a potential match must be greater than the value of the acceptance threshold or that match is not returned (0 to 100; default = 50).

Accept Threshold, Color

Specifies the color acceptance threshold, which is the lowest score of a valid instance. The score for a potential match must be greater than the value of the acceptance threshold or that match is not returned (0 to 100; default = 85).

Increased Lighting Tolerance

When enabled, variations in color caused by differences in lighting are more tolerated.

Note: This parameter is disabled when the TrainPatMaxRedLineColor function's Match Colors parameter is set to No Matching.

0 = Off (default)

1 = On
Closed Lighting Tolerance Example

Color matching is sensitive to non-uniform lighting and uncontrollable lighting changes. When the Increased Lighting Tolerance parameter is enabled, scores colors higher if they differ from the trained color because of lighting. i.e.: the same color, just darker or lighter.

For example, in the package of pills, the lighting is not uniform. The pill in the top left corner is darker than the pills in the center.

When the pill in the upper left is trained, the pills near the center score low without the "Increased lighting tolerance" option enabled. Once the parameter is enabled, the scores improve and finds more matches.

Increased Lighting Tolerance = Off | Increased Lighting Tolerance = On

Accuracy Mode

Specifies the tradeoff between accuracy/reliability and execution speed.

0 = Low | Specifies lower accuracy/reliability and faster execution speed.
1 = High (default) | Specifies higher accuracy/reliability and slower execution speed.

Clutter in Score

Specifies whether missing or occluded pattern features will reduce the response score(s).

0 = OFF (default) | Do not include the effect of clutter in score.
1 = ON | Include the effect of clutter in score.

Contrast Threshold

Specifies the lowest contrast of a valid instance. The contrast for a potential match must be greater than the value of the Contrast Threshold or that instance will not be considered (0 to 100; default = 0). The contrast value for FindPatMaxRedLineColor and FindPatMaxRedLine are the relative measure of contrast change between features in the trained pattern versus match features in search image, in percentage. Therefore, if feature contrast is similar or high to pattern contrast, reported Contrast will be ~100. If the pattern contrast exceeds the feature contrast, the reported Contrast will be <100.

Note: The Contrast for FindPatMaxRedLineColor and FindPatMaxRedLine are different from the contrast for FindPatMaxPatterns, which is the "absolute" image contrast of the search ROI, in grey scale level.

Find Tolerances

Specifies the settings for finding patterns that are rotated or scaled with respect to the trained pattern.

Note: The Find Tolerances are hard limits, i.e. any results that are found outside of the specified Find Tolerances will not be returned in the spreadsheet.
Angle Start | Specifies the angle at which to begin searching for matches, in degrees counter-clockwise (-180 to 180; default = -15).
Angle End | Specifies the angle at which to stop searching for matches, in degrees counter-clockwise (-180 to 180; default = 15).
Scale Start | Specifies the scale at which to begin searching for matches (1 to 10000; default = 100).
Scale End | Specifies the scale at which to stop searching for matches (1 to 10000; default = 100).

XY Overlap

This parameter controls the ability of the tool to find pattern candidates that overlap each other. Specifies the expected position difference between multiple overlapping patterns in roughly the same X,Y location, as a percentage of the trained pattern size (0 to 100; default = 70).

Note: Increasing this value allows finding multiple overlapping matches of the same pattern.

Advanced Settings

Use Coarse Percentage

Specify whether or not configure the Coarse Accept Percentage value is used during the coarse search phase.

Note: In most cases, this setting does not need to be enabled.
0 = Off (default) | Only the Accept Threshold, Pattern value is used during the coarse search phase (the Coarse Accept Percentage value is ignored).
1 = On | The Coarse Accept Percentage parameter is enabled to specify the deviation from the Accept Threshold, Pattern value as a percentage, which is used during the coarse search phase.

Coarse Accept Percentage

Specify the deviation from the Accept Threshold, Pattern value as a percentage, which is used during the coarse search phase (0 to 100; default = 60). This parameter is useful when the Accept Threshold value cannot narrow down instances effectively, and the function returns no match or too many matches.

Closed How Coarse Accept Percentage Works

FindPatMaxRedLineColor first uses large features to find an approximate pattern match in a run-time image (coarse search phase), and then uses small features to determine the pattern location precisely (fine search phase). During both phases, the Accept Threshold, Pattern value is used to narrow down found instances.

Normal Flow (Use Coarse Percentage = OFF)

While rare, FindPatMaxRedLineColor may not return any matches because only low score instances are found during the coarse search phase. If this happens, the Accept Threshold, Pattern setting can be lowered; however, the lower Accept Threshold, Pattern value may result in returning too many matches.

Returns No Match or Too Many Matches (Use Coarse Percentage = OFF)

In such cases, the Coarse Accept Percentage setting allows you to define the acceptance threshold value just for the coarse search phase. By using different acceptance threshold pattern value for each search phase, the expected results can now be returned.

Returning Expected Results (Use Coarse Percentage = ON)

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 5000, disabling the timeout), that the function will search for patterns before execution is halted and an #ERR is returned.

Show Graphics

Specifies the display mode for graphical overlays on top of the image.

Find Region

The Find Region displays at all times.

0 = Off (default)

1 = On

Location

The cross-hair graphic displays indicating where the pattern was found at all times.

0 = Off (default)

1 = On

Trained Pattern

Graphic Overlays

Match Features

Trained edge features display with green lines at all times.

0 = Off (default)

1 = On

Trained Pattern

Graphic Overlays

Match Colors

Display the trained match colors at sampled locations. Samples are displayed as circles where the color and location of the circle indicates the trained color.

Note: This parameter is disabled when the TrainPatMaxRedLineColor function's Match Colors parameter is set to No Matching.

0 = Off (default)

1 = On

Trained Pattern

Graphic Overlays

FindPatMaxRedLineColor Output

Returns | A Patterns data structure containing a model and a list of pattern responses sorted by score, or #ERR if any of the input parameters are invalid or no matching patterns could be found.
Results | When FindPatMaxRedLineColor is initially inserted into a cell, a result table is created in the spreadsheet.

FindPatMaxRedLineColor Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Patterns.

Name VDA Function Description

Row

 GetRow(Patterns, Index)

The row coordinate of the pattern position.

Col

 GetCol(Patterns, Index)

The column coordinate of the pattern position.

Angle

 GetAngle(Patterns, Index)

The orientation of the pattern position.

Scale

 GetScale(Patterns, Index)

The size of the pattern found compared to the trained model, as a percentage of the model size.

Score

 GetScore(Patterns, Index)

The pattern response overall score (0 - 100).
Color Score GetColorScore(Patterns, Index)

The color score value (0 - 100).

Note:

When the referenced TrainPatMaxRedLineColor's Match Colors parameter is set to No Matching, the GetColorScore function returns 100.000.

Match Colors Parameter Selection | Behavior
0 = All Colors (default) | Returns the computed score, assuming that the tool found a feature match.
1 = Selected Colors
2 = No Matching | Returns 100.000 (the tool does not compute the color match score).

Pattern Score and Color Score

The FindPatMaxRedLineColor function automatically inserts two Score values in the spreadsheet: Score and Color Score. The Score returns the "pattern" score, showing how similar the found pattern is to a trained pattern, and it is independent of color. The Color Score shows how similar the found pattern's color is to the trained color.

A poor Color Score value does not impact the Score value. In the following example, the Index 2 pattern shows a low Color Score value, however the Score value is still very high. When either the Score or the Color score falls under its Accept Threshold value (Accept Threshold, Pattern or Accept Threshold, Color), the pattern is not considered as a match, and not returned.

Trained Pattern

Search Result


FindPatterns

FindPatterns consists of two functions: one function extracts area or edge-based patterns or models, while the second function searches an image for a previously trained model.

Whether the function is training or finding, its execution depends on which of the parameters are forcing the update. Updating any of the model parameters causes the model to be returned. Updating the Image, the Fixture, the Find Region, or any of the search parameters causes the f unction to execute a search.

Tip: To avoid accidentally training new models, insert two separate FindPatterns functions. One function is used to train a model and becomes Disabled, while the second function searches by referencing the first function in the Patterns parameter.

FindPatterns Inputs

Syntax: FindPatterns(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Model Region.X,Model Region.Y,Model Region.High,Model Region.Wide,Model Region.Angle,Model Settings.Model Type,Model Settings.Coarseness,Model Settings.Accuracy,Model Settings.Offset Row,Model Settings.Offset Column,Model Settings.ForceTrain,Model Settings.Patterns,Find Region.X,Find Region.Y,Find Region.High,Find Region.Wide,Find Region.Angle,Number to Find,Angle Range,Scale Tolerance,Thresh: Accept,Thresh: Confuse,Timeout,Show)

Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Model and Find Regions of Interest (ROI)relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI are rotated or translated in relation to the Fixture. For more information, see ROI, Fixture, or Vision Tools.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Model Region

Specifies the rectangular image region that are used to extract the model pattern. For more information, see Interactive Graphics Mode.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

Model Settings

Specifies model training parameters.

Model Type

Specifies area model or edge model training.

0 = Area model | Area model training creates patterns based on a uniform sampling of greyscale pixel values from the Model Region. The area model similarity metric is based on the normalized greyscale correlation coefficient.
1 = Edge model (default) | Edge model training creates patterns based on a sampling of points biased to the immediate vicinity of the greyscale discontinuities typically found on objects' boundaries. The edge model similarity metric is based on the normalized comparison of greyscale derivatives. Note: The maximum number of points that may be used to define a model is 4096.

Coarseness

Specifies the size of the smallest features in the trained model.

0 = Fine | Smallest features approximately 4 pixels in size.
1 = Medium (default) | Smallest features approximately 4 to 8 pixels in size.
2 = Coarse | Smallest features larger than 8 pixels in size.

Accuracy

Specifies the tradeoff between accuracy/reliability and execution speed.

0 = Accurate | Specifies higher accuracy/reliability and slower execution speed.
1 = Medium (default) |
2 = Fast | Specifies lower accuracy/reliability and faster execution speed.

Offset Row

Specifies the row offset (-479to 479; default = 0) from the model's center to the response point, as measured in the model's local coordinate system.

Offset Column

Specifies the column offset (-639 to 639; default = 0) from the model's center to the response point, as measured in the model's local coordinate system.

Force Train

Enables/disables automatic model training on spreadsheet updates. When Force Train is OFF, the model is trained only when the Model Region or Model Settings are changed. When ON, the model are re-trained every time the spreadsheet executes.

  • 0 = OFF (default)
  • 1 = ON

Patterns

Specifies whether the FindPatterns function searches using its own model, or a model contained in another FindPatterns function. The default value is 0, which means the current FindPatterns function uses its own model. Patterns can also be referenced to a Patterns data structure, which specifies that searching uses the local model trained by another FindPatterns function. This alternative behavior allows a single model to be shared by multiple instances of PatFind searches in the spreadsheet.

Note: This behavior does not chain. It is invalid to reference a PatFind model that, in turn, references another PatFind model.

Find Region

Specifies the region of the image that is used to define where the search for the pattern is performed. A rectangular image region is created, that can be transformed and rotated. With this parameter selected, optionally press the Maximize Region button on the property sheet's toolbar to automatically stretch the region to cover the entire image.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.

Number to Find

Specifies the maximum number of pattern matches to return (0 to 255; default = 1).

Note: Although the maximum number of patterns that can be returned is 255, when the Model Settings parameter is set to Edge model, other settings, especially Coarseness, Accuracy and Scale Tolerance, can drastically reduce the number of patterns returned.If more patterns need to be found, it is recommended to use the FindPatMaxPatterns function. For more information, see FindPatMaxPatterns.

Angle Range

Specifies the function's +/- tolerance to pattern rotation (0 to 180; default =15). The function still finds patterns that are outside of the specified range, but the accuracy may be somewhat compromised. An Angle Range setting greater than 0 reduces the speed at which patterns are located.

Scale Tolerance

Specifies the function's tolerance to changes in pattern scale.

0 = OFF (default) | Disables scale searching. When scale searching is disabled, the function still find patterns that are within about 10% of the original model size, but the response is degraded as the discrepancy increases.
1 = ON | Enables scale searching. When scale searching is enabled, the function performs limited scale adjustments in the range of plus and minus 10% of the original model size.

Thresh: Accept

Specifies the minimum acceptable pattern response score (0 to 100; default = 50). The function returns the Number to Find pattern responses that exceed the Thresh: Accept limit.

Thresh: Confuse

Specifies the maximum expected pattern response score (0 to 100; default = 70)for a pattern in the image that is not a true instance of the model. Setting this search parameter helps the function know which pattern responses to investigate and which can be safely ignored. This parameter is also known as a confusion threshold.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 5000), that the function searches for patterns before execution is halted and #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Show

Specifies the display mode for FindPatterns graphics on the image.

0 = hide all | All graphics are hidden, except when the cell containing the FindPatterns function is highlighted in the spreadsheet.
1 = result graphics only | A cross is displayed at the offset coordinate of the found model at all times.
2 = input and result graphics | Both the input image region and the cross are displayed at all times.

FindPatterns Outputs

Returns | A Patterns data structure containing a model and a list of pattern responses sorted by score, or #ERR if any of the input parameters are invalid.
Results | When FindPatterns is initially inserted into a cell, a result table is created in the spreadsheet.

FindPatterns Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Patterns.

Row | GetRow(Patterns, Index) | The row coordinate of the pattern position.
Col | GetCol(Patterns, Index) | The column coordinate of the pattern position.
Angle | GetAngle(Patterns, Index) | The orientation of the pattern position.
Scale | GetScale(Patterns, Index) | The size of the pattern found compared to the trained model, as a percentage of the model size.
Score | GetScore(Patterns, Index) | The pattern response score.


SortPatterns

Sorts patterns by their position in the image. For each pattern in the input Patterns data structure, SortPatterns computes the position of the pattern's response relative to the specified image fixture coordinate system. Patterns are sorted by one of the following:

  • X-coordinate
  • Y-coordinate
  • Angle
  • Angle distance
  • Distance

The sorted patterns are returned as a new Patterns data structure.

SortPatterns Inputs

Syntax: SortPatterns(Patterns,Number to Sort,Sort By,Fixture.Row,Fixture.Column,Fixture.Theta,Sort Tolerance,Show)

Parameter Description

Patterns

This argument must reference a spreadsheet cell that contains a valid Patterns data structure returned by either the FindPatMaxPatterns or FindPatterns function. For more information, see FindPatMaxPatterns or FindPatterns.

Number to Sort

Specifies the maximum number (1 to 255; default = 1) of patterns to sort.

Sort By

Specifies the sorting method.

0 = X (default)

Sort by distance along the x-axis, from closest to furthest, in descending order.

Closed EXAMPLE

1 = Y

Sort by distance along the y-axis, from closest to furthest, in descending order.

Closed EXAMPLE

2 = Angle

Sorts by the angle (0 to 360 degrees), as measured from the x-axis of the fixture coordinate system to the line segment defined by the pattern response point and the fixture origin, from closest to furthest, in descending order. For more information, see Offset Row.

Closed EXAMPLE

3 = Angular Distance

Sorts by the absolute value of the angle (-180 to 180 degrees), as measured from the x-axis of the fixture coordinate system to a line segment defined by the pattern response point and the fixture origin, from closest to furthest, in descending order.

Closed EXAMPLE

4 = Distance

Sorts by the distance from the fixture origin to the pattern's response point, from closest to furthest, in descending order.

Closed EXAMPLE

5 = Grid X

Sort by distance along the fixture's x-axis first, and then by distance along the y-axis, from closest to furthest, in descending order.

Note: SortPatterns returns #ERR if Grid X is selected and the function is referencing an image that has been calibrated to world coordinate values, such as a CalibrateImage or TransPatternsToWorld function's output. Grid X sorting can only be applied to pixel coordinates. To use the Grid X sorting method using world coordinates, the FindPatMaxPatterns or FindPatterns function being referenced by the SortPatterns function should reference the output of a TransformImage function, with the SortPatterns function sorting in pixel coordinates. The output data can then be transformed to world coordinates using the TransPatternsToWorld function.

Closed EXAMPLE

6 = Grid Y

Sort by distance along the fixture's y-axis first, and then by distance along the x-axis, from closest to furthest, in descending order.

Note: SortPatterns returns #ERR if Grid Y is selected and the function is referencing an image that has been calibrated to world coordinate values, such as a CalibrateImage or TransPatternsToWorld function's output. Grid Y sorting can only be applied to pixel coordinates. To use the Grid Y sorting method using world coordinates, the FindPatMaxPatterns or FindPatterns function being referenced by the SortPatterns function should reference the output of a TransformImage function, with the SortPatterns function sorting in pixel coordinates. The output data can then be transformed to world coordinates using the TransPatternsToWorld function.

Closed EXAMPLE

Fixture

Defines the referenced pattern relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the referenced pattern relative to a Fixture ensures that if the Fixture is rotated or translated, the referenced pattern is rotated or translated in relation to the Fixture. For more information, see Fixture.

The default setting is (0,0,0), the top leftmost corner of the image.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.

Sort Tolerance

Specifies the size percentage (1% to 500%; default = 50%) of the trained pattern height a found pattern must be to be included in the group of patterns when sorting by either Grid X or Grid Y.

Note: This parameter is only used when the Sort By parameter is set to either Grid X or Grid Y.

Show

Specifies the display mode for SortPatterns graphics on the image.

0 = hide all (default) | All graphics are hidden, except when the cell containing the SortPatterns function is highlighted in the spreadsheet.
1 = result graphics only | A cross is displayed for each found pattern at all times.
3 = show all: input, result, and match features | The input image region, a cross for each found pattern, and the match features are displayed at all times. Note: Match features are only displayed for PatMax-trained patterns.

SortPatterns Outputs

Returns | A Patterns data structure containing the sorted pattern response points, or #ERR if any of the input parameters are invalid.
Results | When SortPatterns is initially inserted into a cell, a result table is created in the spreadsheet. Note: If the value of the Number to Sort parameter is greater than zero, SortPatternsautomatically inserts a result table containing a maximum of 10 entries that correspond to the first 10 patterns in the Patterns data structure. If you wish to display more entries, you can expand the table by copying the last row and pasting additional rows at the end. Make sure to increment the index number of any newly-pasted row so that the proper pattern is indexed.

SortPatterns Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Patterns.

Row | GetRow(Patterns, Index) | The row coordinate of the pattern position.
Col | GetCol(Patterns, Index) | The column coordinate of the pattern position.
Angle | GetAngle(Patterns, Index) | The orientation of the pattern position.
Scale | GetScale(Patterns, Index) | The percent size of the original model.
Score | GetScore(Patterns, Index) | The pattern response score.


TrainPatMaxPattern

Extracts and trains a pattern from an image for use with the FindPatMaxPatterns function. For more information, see FindPatMaxPatterns.

TrainPatMaxPattern Overview

A PatMax® pattern is a collection of geometric features where each feature is a point on the boundary between two regions of dissimilar pixel values.TrainPatMaxPatterntrains a pattern, then FindPatMaxPatterns is used to locate one or more instances of that pattern in an image. PatMax offers three key features that distinguish it from other pattern-locationtechnologies available in machine vision:

  • High-speed location of objects whose appearance is rotated, scaled, and/or stretched
  • Location technology that is based on object shape, not on greyscale values
  • Very high accuracy

PatMax differs from other pattern-location technologies in that it is not based on pixel grid representations that cannot be efficiently and accurately rotated or scaled. Instead, PatMax uses a feature-based representation that can be transformed quickly and accurately for pattern matching.

Note: When a cell containing a trained PatMax pattern is highlighted the pattern's features are displayed. This allows the user to see the pattern that is trained without entering the TrainPatMaxPattern's Property sheet, which would retrain the pattern.

TrainPatMaxPattern Inputs

Syntax: TrainPatMaxPattern(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Pattern Region.X,Pattern Region.Y,Pattern Region.High,Pattern Region.Wide,Pattern Region.Angle,Pattern Region.Curve,External Region,Pattern Origin.Offset Row,Pattern Origin.Offset Column,Pattern Settings.Algorithm,Pattern Settings.Elasticity,Pattern Settings.Ignore Polarity,Pattern Settings.Sensitivity,Pattern Settings.Coarse Granularity,Pattern Settings.Fine Granularity,Reuse Training Images,Timeout,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Pattern Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area.

Note:
  • If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.
  • In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger. When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

Pattern Origin

Specifies the row and column of the training pattern's origin, as offsets from the center of the training region.

Offset Row | Specifies the row offset from the center of the trained pattern.
Offset Column | Specifies the column offset from the center of the trained pattern.

Pattern Settings

Specifies the settings for training the pattern.

Algorithm

Specifies which algorithm to usefor training the pattern.

0 = PatMax (default) | The PatMax algorithm offers higher accuracy than PatQuick, but requires more time to execute.
1 = PatQuick | The PatQuick algorithm offers lower accuracy than PatMax, but requires less time to execute.

Elasticity

Specifies the amount of perimeter deviation (0 to 10; 0 = default).

0 = No Tolerance

1 or Greater = Flexible Boundary

Ignore Polarity

Specifies whether matches can befound that contain color-inverted match features with respect to the trained pattern.

0 = Off (default) | Do not match color-inverted features.
1 = On | Allow color-inverted match features.

Sensitivity

0 = Not Implemented

Coarse Granularity

Specifies the coarse granularity, as a pixel value. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly(0 to 10; 0 = default).

Note: If a valueof less than 1.0 is specified, both Coarse Granularity and Fine Granularity parameter values are calculated automatically.

Fine Granularity

Specifies the fine granularity, as a pixel value. Fine granularity is used to find small features to determine the pattern location precisely (0 to 10;0 = default).

Note:
  • If a value of less than 1.0 is specified, both Coarse Granularity and Fine Granularity parameter values are calculated automatically.
  • The value for Fine Granularity cannot be greater than the value for Coarse granularity.
Reuse Training Image

Specifies whether or not the image used to train the pattern is saved and used when modifying the Pattern Settings parameters.

0 = Off (default)

The current image (i.e. the image specified in the Image parameter) is used to train/re-train the pattern.

1 = On

The image that was initially used to train the pattern is used to re-train the pattern in the event that one or more of the Pattern Settings parameters is modified. When first enabled, the image identified by the Image parameter is used to train the pattern and a copy of the image is saved in the job. Any subsequent changes made to the Pattern Settings parameters are made using the stored image.

Note:
  • When loading jobs that were built with In-Sight Explorer firmware prior to release 4.4.1, the pattern must be retrained with In-Sight Explorer firmware 4.4.1 or later to utilize this feature. The function returns #ERR if this parameter is enabled with a pattern that was trained in an earlier release of In-Sight Explorer; the pattern must be retrained to be used with this parameter.
  • When this parameter is enabled, if the Fixture input is modified, the Pattern Region (or External Region) is moved or modified, the function adjusts the training region in the input image, saves the new image and re-trains the pattern.
  • If the Reuse Training Image parameter is turned On (enabled), but a pattern has not already been trained, the function returns #ERR until the parameter has been turned Off (disabled) and a new pattern trained.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000), that the function searches for a valid pattern before execution is halted and #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied.

Show

Specifies the display mode for TrainPatMaxPatterngraphics on the image.

0 = hide all | All graphics are hidden, except when the cell containing the TrainPatMaxPatternfunction is highlighted in the spreadsheet.
1 = result graphics only | Trained features of the pattern are displayed at all times.
2 = input and result graphics | The input image region, pattern origin and the trained features are displayed at all times. Note: The color of a trained feature (Green, Yellow and Red) represents the quality of the feature candidate for matching. Green represents high quality. Red represents low quality. The Granularity parameters should be adjusted until all trained features are green or choose a better image to train. Distinct features (edges)and good image contrast yield the best results.
3 = show all: input, result and training image | The input image region, pattern origin, the trained features and the training image are displayed at all times.

TrainPatMaxPattern Outputs

Returns

A Patterns data structure containing a trained pattern, or #ERR if any of the input parameters are invalid. The function is Disabled by default to avoid accidentally training a new pattern on the next acquisition.

Results

When TrainPatMaxPatternis initially inserted into a cell, the Trained status automatically appears in the adjacent cell to the right. If a pattern cannot be trained, #ERR is inserted.

Note: While in the function's property sheet, supplemental information strings are provided as suggestions for better training a pattern. For a list of possible information strings, click Closed here.
  • Pattern may contain too few match features.
  • Difficult to automatically set feature granularity. Manually set Granularity.
  • Pattern may be less accurate than expected because the training image appears blurry.
  • The pattern results may be unstable because the coarse features have the same direction.
  • Execution time may increase because of numerous fine features; manually set Granularity.
  • Pattern may contain insufficient information to measure Angle or Scale reliably.

To insert information strings into the spreadsheet, use the GetInfoStringVision Data Access function.

TrainPatMaxPattern Vision Data Access Functions

One Vision Data Access function is automatically inserted into the spreadsheet:

Trained

 GetTrained(Pattern)

Returns 1 if a pattern has been successfully trained, and 0 if a pattern cannot be trained.

For more information, see Patterns, Pattern Match, or Property Sheet.


TrainPatMaxRedLine

Extracts and trains a pattern from an image for use with the FindPatMaxRedLine function. For more information, see FindPatMaxRedLine.

Note:
  • From In-Sight firmware 5.5.0 and later, the function's algorithm has been changed to return more accurate results and decrease the execution time in some circumstances.
  • Due to this change, when attempting to load a job containing this function configured on the In-Sight firmware 5.5.0 or later to an In-Sight vision system running firmware version 5.4.x or earlier, an error message is displayed and any cells that contains this function will result in #ERR.
  • This function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • A trained pattern consumes approximately 1MB when using the default Pattern Region (320 x 440), although the pattern size varies greatly depending on the size of the trained pattern.

TrainPatMaxRedLine Inputs

Syntax: TrainPatMaxRedLine (Image,Fixture.Row,Fixture.Column,Fixture.Theta,Pattern Region.X,Pattern Region.Y,Pattern Region.High,Pattern Region.Wide,Pattern Region.Angle,Pattern Region.Curve,External Region,Pattern Origin.Offset Row,Pattern Origin.Offset Column,Auto Select Coarse,Auto Select Fine,Coarse Granularity,Fine Granularity,Feature Threshold,Reuse Training Image,Timeout,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Pattern Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.

Tip: With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.
X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High (default = 320) | The dimension along the region's x-axis.
Wide (default = 440) | The dimension along the region's y-axis.
Angle (default = 0) | The orientation, in fixture coordinates.
Curve (default = 0) | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.
  • Mask: For more information, see Mask

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area. For more information, see Cell References - Relative/Absolute.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Pattern Origin

Specifies the row and column of the training pattern's origin, as offsets from the center of the training region.

Offset Row (default = 0) | Specifies the row offset from the center of the trained pattern.
Offset Column (default = 0) | Specifies the column offset from the center of the trained pattern.

Auto Select Coarse

Specifies whether or not automatically specify the image granularity to use for the coarse search phase. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly.

  • 0 = Off
  • 1 = On (default)
Auto Select Fine

Specifies whether or not automatically specifies the image granularity to use for the fine search phase. Fine granularity is used to find small features to determine the pattern location precisely.

  • 0 = Off
  • 1 = On (default)
Coarse Granularity

Specifies the coarse granularity, as a pixel value. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly (1 to 30; 4 = default).

Note: The Auto Select Coarse parameter is enabled by default; disable it to enable this parameter.

Fine Granularity

Specifies the fine granularity, as a pixel value. Fine granularity is used to find small features to determine the pattern location precisely (1 to 10; 1 = default).

Note:
  • The Auto Select Fine parameter is enabled by default; disable it to enable this parameter.
  • The value for Fine Granularity cannot be greater than the value for Coarse Granularity.
Feature Threshold

Specifies the minimum contrast of trained features; decrease the value to train additional low contrast features, or increase it to ignore them (1 to 100; 20 = default).
Reuse Training Image

Specifies whether or not the image used to train the pattern is saved and used when modifying the Pattern settings parameters (Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity, Fine Granularity or Noise Threshold).

0 = Off (default)

The current image (i.e. the image specified in the Image parameter) is used to train/re-train the pattern.

1 = On

The image that was initially used to train the pattern is used to re-train the pattern in the event that Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity, Fine Granularity and/or Noise Threshold parameters are modified. When first enabled, the image identified by the Image parameter is used to train the pattern and a copy of the image is saved in the job. Any subsequent changes made to the Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity, Fine Granularity or Noise Threshold parameters are made using the stored image.

Note:
  • When this parameter is enabled, if the Fixture parameter is modified, the Pattern Region parameter (or External Region parameter) is moved or modified, the function adjusts the training region in the input image, save the new image and re-train the pattern.
  • If the Reuse Training Image parameter is turned On (enabled), but a pattern has not already been trained, the function returns #ERR until the parameter has been turned Off (disabled) and a new pattern trained.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 0, disabling the timeout), that the function will search for a valid pattern before execution is halted and an #ERR is returned.

Show

Specifies the display mode for TrainPatMaxRedLine graphics on the image.

0 = hide all (default) | All graphics are hidden, except when the cell containing the TrainPatMaxRedLine function is highlighted in the spreadsheet.
1 = result graphics only | Trained features of the pattern are displayed at all times.
2 = input and result graphics | The input image region, pattern origin and the trained features are displayed at all times.
3 = show all: input, result and training image | The input image region, pattern origin, the trained features and the training image are displayed at all times.

TrainPatMaxRedLine Outputs

Returns | A Patterns data structure containing a trained pattern, or #ERR if any of the input parameters are invalid. The function is Disabled by default to avoid accidentally training a new pattern on the next acquisition. For more information, see Cell State Dialog.
Results | When TrainPatMaxRedLine is initially inserted into a cell, the Trained parameter status automatically appears in the adjacent cell to the right. If a pattern cannot be trained, then #ERR is inserted.

TrainPatMaxRedLine Vision Data Access Functions

One Vision Data Access function is automatically inserted into the spreadsheet. For more information, see Patterns.

Name | VDA Function | Description
Trained | GetTrained(Pattern) | Returns 1 if a pattern has been successfully trained, and 0 if a pattern cannot be trained.


TrainPatMaxRedLineColor

Extracts and trains a pattern (a trained, internal geometric description of an object you wish to find) from a color image for use with the FindPatMaxRedLineColor function. For more information, see FindPatMaxRedLineColor.

Note:
  • The TrainPatMaxRedLineColor and FindPatMaxRedLineColor functions are only available on In-Sight 7000 Gen2 series color vision systems and In-Sight 8000 series color vision systems running In-Sight firmware 5.6.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • When using a greyscale image, the TrainPatMaxRedLine and FindPatMaxRedLine function must be used. When attempting to use the TrainPatMaxRedLineColor and FindPatMaxRedLineColor functions on a greyscale image (for example, ColorToGreyscaleFilter's output), #ERR is returned.
  • The FindPatMaxRedLineColor function must reference the TrainPatMaxRedLineColor function. When referenced a different function (for example, a TrainPatMaxRedLine function), #ERR is returned.

TrainPatMaxRedLineColor Inputs

Sytanx: TrainPatMaxRedLineColor(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Pattern Region.X,Pattern Region.Y,Pattern Region.High,Pattern Region.Wide,Pattern Region.Angle,Pattern Region.Curve,External Region,Pattern Origin.Offset Row,Pattern Origin.Offset Column,Match Colors,Select Colors,Auto Select Coarse,Auto Select Fine,Coarse Granularity,Fine Granularity,Feature Threshold,Reuse Training Image,Timeout,Show Graphics)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Note: This parameter must reference a color image.

Fixture

Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. For more information, see Fixture and Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row (default = 0) | The row offset, in image coordinates.
Column (default = 0) | The column offset, in image coordinates.
Theta (default = 0) | The angle of orientation, in the image coordinate system.

Pattern Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode.With this parameter selected, you can press the Maximize Region button on the property sheet's toolbar to maximize the region and cover the entire image.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High (default = 320) | The dimension along the region's x-axis.
Wide (default = 440) | The dimension along the region's y-axis.
Angle (default = 0) | The orientation, in fixture coordinates.
Curve (default = 0) | The angular deviation between the region's x-axis and the opposing boundary line.

External Region

This parameter can reference a spreadsheet cell that contains the following functions:

  • Annulus. For more information, see Annulus.
  • Circle. For more information, see Circle.
  • Region. For more information, see Region.
  • EditAnnulus. For more information, see EditAnnulus.
  • EditCircle. For more information, see EditCircle.
  • EditCompositeRegion. For more information, see EditCompositeRegion.
  • EditPolygon. For more information, see EditPolygon.
  • EditRegion. For more information, see EditRegion.
  • Mask: For more information, see Mask

When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area. For more information, see Cell References - Relative/Absolute.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Pattern Origin

Specifies the row and column of the training pattern's origin, as offsets from the center of the training region.

Offset Row (default = 0) | Specifies the row offset from the center of the trained pattern.
Offset Column (default = 0) | Specifies the column offset from the center of the trained pattern.
Match Colors

Specify which colors to train in the Pattern Region.

0 =All Colors (default)

Specify to match all colors in the Pattern Region. For example, in the following image, both the blue (object) and grey (background) colors are trained.

As a result, the FindPatMaxRedLineColor function that references this function finds blue patterns on grey background. For more information, see FindPatMaxRedLineColor.

1 = Selected Colors

Specifies colors to train using the Select Colors parameter. For example, in the following image, you can select only the blue color (object) to train.

As a result, the FindPatMaxRedLineColor function that references this function finds all blue patterns on any background.

2 = No Matching

No color is trained. As a result, the FindPatMaxRedLineColor function that references this function finds all matched patterns regardless of any color, or any background.

Select Colors

Specifies colors to train by using the Select Colors dialog. You may reference a button or a numeric value in the job; non-zero values are treated as a pressed button and will trigger the Select Colors dialog. For more information, see Selecting Colors.

  • 0 = The Select Color button is not pressed (default).
  • 1 = The Select Color button is pressed.

Note: The Select Colors parameter is enabled only when the Match Colors parameter is set to Selected Colors.

Auto Select Coarse

Specifies whether or not automatically specify the image granularity to use for the coarse search phase. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly.

  • 0 = Off
  • 1 = On (default)
Auto Select Fine

Specifies whether or not automatically specifies the image granularity to use for the fine search phase. Fine granularity is used to find small features to determine the pattern location precisely.

  • 0 = Off
  • 1 = On (default)
Coarse Granularity

Specifies the coarse granularity, as a pixel value. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly (1 to 30; 4 = default).

Note: The Auto Select Coarse parameter is enabled by default; disable it to enable this parameter.

Fine Granularity

Specifies the fine granularity, as a pixel value. Fine granularity is used to find small features to determine the pattern location precisely (1 to 10; 1 = default).

Note:
  • The Auto Select Fine parameter is enabled by default; disable it to enable this parameter.
  • The value for Fine Granularity cannot be greater than the value for Coarse Granularity.
Feature Threshold

Specifies the minimum contrast of trained features; decrease the value to train additional low contrast features, or increase it to ignore them (1 to 100; 20 = default).
Reuse Training Image

Specifies whether or not the image used to train the pattern is saved and used when modifying the Pattern settings parameters (Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity, Fine Granularity).

0 = Off (default)

The current image (i.e. the image specified in the Image parameter) will be used to train/re-train the pattern.

1 = On

The image that was initially used to train the pattern will be used to re-train the pattern in the event that the Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity and/or Fine Granularity parameters are modified. When first enabled, the image identified by the Image parameter will be used to train the pattern and a copy of the image will be saved in the job. Any subsequent changes made to the Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity, or Fine Granularity parameter will be made using the stored image.

Note:
  • When this parameter is enabled, if the Fixture input is modified, the Pattern Region (or External Region) is moved or modified, the function will adjust the training region in the input image, save the new image and re-train the pattern.
  • If the Reuse Training Image parameter is turned On (enabled), but a pattern has not already been trained, the function will return #ERR until the parameter has been turned Off (disabled) and a new pattern trained.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 0, disabling the timeout), that the function will search for a valid pattern before execution is halted and an #ERR is returned.

Show Graphics

Specifies the display mode for TrainPatMaxRedLineColor graphics on the image.

Pattern Region

The Pattern Region and the Pattern Origin display.

  • 0 = Off (default)
  • 1 = On

Trained Image

The trained image displays.

  • 0 = Off (default)
  • 1 = On

Trained Features

The trained edge features display with green lines.

  • 0 = Off (default)
  • 1 = On

Match Colors

Display the trained match colors at sampled locations. Samples are displayed as circles where the color and location of the circle indicates the trained color.

  • 0 = Off (default)
  • 1 = On

TrainPatMaxRedLineColor Outputs

Returns | A Patterns data structure containing a trained pattern, or #ERR if any of the input parameters are invalid. The function is Disabled by default to avoid accidentally training a new pattern on the next acquisition. For more information, see Cell State Dialog.
Results | When TrainPatMaxRedLineColor is initially inserted into a cell, the Trained status automatically appears in the adjacent cell to the right. If a pattern cannot be trained, then #ERR is inserted.

TrainPatMaxRedLineColor Vision Data Access Functions

One Vision Data Access function is automatically inserted into the spreadsheet. For more information, see Patterns.

Name | VDA function | Description
Trained | GetTrained(Pattern) | Returns 1 if a pattern has been successfully trained, and 0 if a pattern cannot be trained.

Selecting Colors

When the Match Colors parameter is set to Selected Colors, you need to select colors to train in the Pattern Region using the Select Colors dialog.

  1. Click the Select Colors button in the TrainPatMaxRedLineColor property sheet. The Select Colors dialog and the magic wand cursor display.

  2. Click the areas where you want to train colors in the Pattern Region. Once selected, the selected areas are colored in and surrounded by a moving border.

    Note:
    • When selecting multiple areas, enable the [image] icon in the Select Colors dialog or hold down the CTRL key, and click the areas.
    • When deselecting areas, enable the [image] icon in the Select Colors dialog and click the areas.
    • If you click the outside of the Pattern Region, the selected areas are all deselected.

  3. Specify the tolerance using the Select Colors dialog. To adjust the value, you can click within the bar, or drag the bar. The tolerance is applied once you release the mouse button.

    Note:

    The tool examines all the pixels that were clicked (= input pixel), and performs a basic diff operation. If the diff result is less than or equal to the tolerance value, the pixels are selected. If you increase the tolerance towards to 100%, all pixels within the Pattern Region are selected. If you decrease the tolerance to 0%, the only pixels that are the exact RBG value of the input pixel are selected.

  4. To accept the selected colors and the tolerance, press the OK button. To cancel, click the Cancel button.

    Tip: You can also click the [image] or [image] button in the Job Edit Toolbar to accept or cancel.
  5. The TrainPatMaxRedLineColor property sheet displays again.


Overview of PatMax Pattern

The purpose of this topic is to provide information about the basic functionality of the PatMax Pattern functions (4.x.x - current firmware) job files. The default settings found in PatMax Pattern functions work well only in cases where the image and pattern to be trained have good contrast and little or no background clutter, such as a textured surface. Even in cases where the image is clear and uncluttered, it is still useful to optimize the function for speed, efficiency, and accuracy.

The PatMax Pattern functions are illustrated here, but the same principles apply to the next gen PatMax RedLine functions (5.1.0 - current firmware) as seen in Overview of PatMax RedLine. The EasyBuilder version of PatMax Pattern hides certain key parameters which are necessary for optimizing performance. Therefore, this document will deal only with the Spreadsheet PatMax Pattern functions. The same principles can be applied to EasyBuilder by round-tripping into the spreadsheet to edit the EasyBuilder PatMax Pattern functions.

PatMaxPattern Theory of Operation

Create a Suitable Pattern Model for TrainPatMaxPattern

Optimize TrainPatMaxPattern

Optimize FindPatMaxPatterns


PatMax Pattern Theory of Operation

The FindPatMaxPattern function uses a two-step process to locate and score a pattern. In the first step, the raw image is searched using a coarse pattern filter to locate potential candidates that might be a good match. All the parameters are considered: Accept, Contrast, Clutter in Score, Angle, Scale, Aspect, XY Overlap, etc. Each parameter is given a weighted score and the final score is a combination of all the individual scores. Even if one or more of the parameters are scored very poorly, it is possible for the remaining parameters to produce a score that exceeds the Accept parameter value. The data for every candidate that exceeds the Accept parameter value is placed into a memory array.

Note: Even if only one object is present, it is possible for multiple candidates to be found.

Consider the case of a circular object such as a coin. The coarse filter may not detect much of the fine detail on the face of the coin, but can easily detect the circular perimeter. The problem is that there are an infinite number of potential angular matches to a circle because a circle looks the same at any rotation angle. Based on any other detail the coarse filter can detect, it can come up with several potential candidates and place each one into memory.

The second step uses a fine pattern filter to review each of the candidates stored in memory. Each of the parameters is scored again, but this time much more accurately. The candidate with the highest final score is then returned as the result. If N patterns are to be found, then the top N candidates are returned in the order of their scores.

Note: If the coarse filter in the first step does not find a particular "correct" candidate and place it into memory, the fine filter in the second step cannot score it. The second step does not scan the raw image again for any missed candidates. Therefore, it is critically important to define the pattern model and the parameters in a way that ensures the "correct" candidate will always be found in the first step, even if it is not a particularly good match.

For example, suppose a poor but correct candidate scores only 59.5 in the coarse search. If the Accept parameter is set to 60, this candidate will be rejected, and the fine search will never see it. If the Accept parameter is lowered to 59, then this candidate will be considered by the fine search and may even return a very high score.


Create a Suitable Pattern Model for TrainPatMaxPattern

Create a Suitable Pattern Model in TrainPatMaxPattern

One problem with a circular feature is that it is very ambiguous when considering rotation angle. Similarly, a simple edge feature is ambiguous when considering scale. A robust pattern is one in which the vertical, horizontal, rotation, and scale attributes are unambiguous.

The circular pattern below provides X, Y, and scale information which is unambiguous, but there is no detectible rotation information.

By modifying the pattern as follows, there is no longer any ambiguity in rotation.

The following patterns have good X, Y, and Rotation information, but very little scale information. There is a 2X difference in scale, but FindPatMaxPattern cannot reliably detect it. The previous image also serves to illustrate how corner features, when combined with other features, alleviate the scale ambiguity.

Another attribute of a reliably detectible pattern is that it should not be cluttered with unnecessary or unwanted details. For example, suppose the smaller connector in the first image below, may have a variable number of pins. If we want to find the angle of the keyed connector fitting, regardless of the number or position of pins in the connector, we must train a model consisting of just the connector outline without the pins, as shown in the left image. Note that this can be done by either removing the unwanted clutter features physically, if possible, or by utilizing an EditCompositeRegion function with a Subtract zone to mask the pins.

Note: In the right image, the pattern of the connector outline is found at a 45-degree angle, even though the pins were not masked in this image. That is because the FindPatMaxPattern function was configured for this image to match only features that were trained and ignores everything else. (Because it is also possible to configure it to not ignore untrained features.)

Every feature trained in the TrainPatMaxPattern model is considered as an equally important part of the model. For more information, see Optimize TrainPatMaxPattern. If the pins in the above example or other unwanted features such as surface texture are included in the model, they are outlined in green. FindPatMaxPattern attempts to match every green feature with equal vigor, so if the unwanted features provide a better "match" than the actual desired features, FindPatMaxPattern returns an incorrect result. Consider the following images in which the feature we care about is the group of three dots. The pattern model was created excessively large in the left image for this example so that it includes other features that are of no interest.

The FindPatMaxPattern function returns a successful "Pass" result in the right image even though 1/3 of the desired feature is missing. That is because the missing feature only constitutes a tiny percentage of the total model. Unless the minimum Accept parameter in FindPatMax Pattern is set to a very high value this is considered a good match. The problem with setting a very high Accept parameter value is that the first step of the FindPatMaxPattern algorithm (the initial Coarse search) is more likely to miss good candidates and cause unnecessary "Fail" results.

Although the TrainPatMaxPatterns Pattern Region and the FindPatMaxPatterns Find Region parameters can use any of the standard internal or external Region structures, the FindPatMaxPattern function runs faster and consumes the least amount of memory if the regions are simple rectangles and not rotated or curved. In other words, use rectangular regions aligned to the pixel grid unless there is a compelling need to rotate, curve, or use composite shapes.


Optimize TrainPatMaxPattern

It is assumed you are already familiar with configuring spreadsheet functions, so the first four parameters are not discussed here. Beginning with the Pattern Origin parameter, the default Offset Row and Offset Column (0,0) places the pattern origin at the geometric center of the Pattern Region. Any Offset row or column entered moves the origin away from the center by the specified amount.

Consider the following square pattern. In the first image the default Offset Row and Offset Column (0,0) is used, but in the second image the Offset Row and Offset Column is set to (14,14), to place the origin at the center of the larger connector. In either case, the FindPatMaxPattern function then reports the location of the origin crosshairs as the location of the found pattern.

The next group of parameters are the Pattern Settings.

The Algorithm parameter options are PatMax and PatQuick. PatQuick uses the coarse search to find pattern matches very quickly, but then skips the fine scoring step, so it is not as accurate as PatMax.

The Elasticity parameter is measured in pixel units from 0 to 10. It allows a small amount of flexibility in the found pattern. For example, if Elasticity is set to 3, then any feature within 3 pixels of its trained position is considered an equivalent match. Consider the following example in which the model is trained on a perfect part:

Next, consider this grossly overexposed image in which the same feature is partially washed out. The red lines indicate pattern model features that were not matched when the Elasticity was set to 0. Note that about 50% of the pattern is not found.

Now set the Elasticity to 3 when training the model on the perfect part. The following image shows that almost all features are found within 3 pixels of their trained positions, so this is considered a near-perfect match:

The next parameter is the Ignore Polarity checkbox. When enabled, the pattern can be matched even if the polarity is reversed. In the following image, half the image has been inverted to illustrate this point. The entire pattern is found even though the original image was grossly washed out and then half of it inverted:

Coarse Granularity and Fine Granularity are extremely important parameters which are almost always overlooked or ignored, yet they provide one of the best optimizations available. The default values of (0,0) allow the tool to automatically attempt to determine the best granularity settings. The problem with this approach is that the tool has no knowledge of which features are desired and which ones the user sees as clutter, so it attempts to model every feature. This very often produces an extremely poor model which then causes the FindPatMaxPattern function to mis-identify correct matches. Consider this model created with the default Coarse Granularity and Fine Granularity of (0,0):

Now assume that the goal is to simply locate the position of this Data Matrix code, but not to find an exact match because it will be different on every part. To accomplish this, we need fewer Fine Granularity details. To determine the optimal settings, we start with both Coarse Granularity and Fine Granularity set to 10, then alternate between decrementing both settings until a crude outline is recognizable, as shown below. In this case, a Coarse Granularity of 5 and a Fine Granularity of 5 is used. The pattern is crude, but contains enough information to recognize a roughly square shape.

Now set the Fine Granularity to 3 to improve the model slightly, but not too much. The idea is to get as much detail as possible around the perimeter of the square without adding too much detail in the interior. Here is the result:

The end result is a pattern model that is very robust. Note that even if none of the interior details are matched in any future image, the majority of the pattern is the perimeter outline which, in this example, is all we care about.

The purpose of this example is to illustrate that the Coarse Granularity and Fine Granularity can be used to restrict the model elements primarily to those features that matter most, but in some cases it may be impossible to restrict all of the unwanted features. Even so, excellent results can be obtained.

The following image contains a different Data Matrix code, yet achieved a score above 97 with the above model. The reason for this is that 100% of the perimeter details were matched, and by sheer luck a number of the "unwanted" interior features also matched, as seen in the FindPatMaxPattern images below.

Even if almost none of the interior matched, the score would be above 77 as shown in this modified image. In other words, with an appropriate Accept parameter value, this model could produce virtually a 100% success rate on any similar Data Matrix code.

One additional benefit of manually optimizing the Coarse Granularity and Fine Granularity parameters is that it allows the function to run faster. The lower the Coarse Granularity and Fine Granularity values are, the longer it takes to process the image. So when speed is important, set the Coarse Granularity and Fine Granularity as high as possible, but low enough to ensure an accurate match.

The final parameter to be discussed here is the Reuse Training Image checkbox. When enabled, it saves the training image. This allows all the parameters discussed above to be modified later without reloading the training image. However, if the Fixture or Pattern Region are modified in any way, a new training image is saved, so be sure to reload the original training image in this case.

Summary of TrainPatMaxPattern Optimizations

  • Pattern Origin: Modify the Offset Row and Offset Column so the function returns location information relative to a feature of interest.
  • Algorithm: Use PatQuick for speed or PatMax for accuracy.
  • Elasticity: Define the number of pixels (from 0-10) any model feature can be allowed to drift and still be considered a good match.
  • Ignore Polarity: Use this when light and shadow or other image artifacts may cause any pattern feature to appear as either white/black or black/white.
  • Coarse Granularity and Fine Granularity: Use these parameters to reduce unwanted features or clutter in the model and to speed up processing time, larger numbers are faster and will reduce processing time.
  • Reuse Training Image: Enable this while experimenting with different iterations of the above parameters to avoid the need to reload the training image each time.


Optimize FindPatMaxPatterns

The first few parameters will be skipped since they are similar to most other vision tools. Beginning with the Pattern parameter, the following group of parameters will be discussed:

The Pattern parameter contains the cell address of the TrainPatMaxPattern function containing the model to be found. It is also possible to train multiple models and use logic expressions to choose which model should be used at any given time. For example, if models of five different coins have been trained, and the goal is to find only the dimes in any image of coins. The logic lookup function Choose() can be used to select the cell containing the Dime model, and then the cell address of the Choose() function is inserted into the Pattern parameter field. For more information about Choose(), see the Help file in In-Sight Explorer.

The Number to Find parameter specifies the maximum number of matching candidates the function returns. If there are more candidates found than the set value, the highest scoring candidates are returned in the results.

The Accept parameter specifies the minimum score that must be achieved by any candidate to be returned as a found result. This parameter applies to both the initial coarse search of the image, and the final fine score.

Note: If the coarse filter in the first step does not find a particular "correct" candidate and place it into memory, the fine filter in the second step cannot score it. The second step does not scan the raw image again for any missed candidates. Therefore, it is critically important to define the pattern model and the parameters in a way that ensures the "correct" candidate is always found in the first step, even if it is not a particularly good match. For example, suppose a poor but correct candidate scores only 59.5 in the coarse search. If the Accept parameter is set to 60, this candidate is rejected, and the fine search never sees it. If the Accept parameter is lowered to 59, then this candidate is considered by the fine search and may even return a very high score.

The Contrast parameter defines the minimum contrast a feature must have relative to its background to be considered a match. The default value of 10 rarely needs to be changed. However, if the desired features of the model have very good contrast of 50, while background clutter such as surface texture has low contrast of 20, then set the Contrast parameter to 40. This allows the desired features to be found while ignoring the lower contrast clutter.

The Clutter in Score checkbox defines whether clutter in the image should lower the final score. Clutter is defined as anything not trained in the pattern model, even if it is a valid feature of the part. Consider the trained model in the left image. In the right image the pins are not outlined in green because they are not part of the model, so they would be considered as clutter.

The question in this case is, do we care about the clutter? If we do not care whether the pins are there or not, and we only care about finding the circle, then we do not want the presence or absence of the pins to affect the final score. On the other hand, if we do not want the clutter features to be present, then we do want the score to be affected (i.e., lower) when they are present.

Since the model was trained without the pins present, when Clutter in Score is disabled, we get a score of 99.997 because all elements of the circle were found and we do not care about the pins, as shown in the left image. In the right image, Clutter in Score has been enabled, so the score drops to 76.852. By setting the Accept threshold to 80, we can ensure that only patterns without pins will be found.

The alternative is to set the Accept parameter value lower and let the pinned patterns be found, but then use an external logic test such as InRange() to reject any result below 80.

The next parameter in the list is the Outside Region percentage. This is rarely used and generally should not be used. However, it is included for those rare cases when the location of the pattern in the Field of View is highly unpredictable and may sometimes fall outside the defined search region. This parameter allows the user to define what percentage of the pattern can be outside the region without affecting the score. In other words, if the Outside Region limit is set to 10% and only 9% of the pattern falls outside, the pattern can still get a near-perfect score.

The Find Tolerances are very important and should always be adjusted. The default settings are rarely correct for any given application.

These settings are not hard limits. The FindPatMaxPatterns function can find results outside the ranges set for Angle and Scale. The purpose of these settings is to define the limits of what is considered a "perfect" match. In other words, if the Angle Start and Angle End are set to +/-15 degrees, then any candidate within that range can achieve a perfect score. However, candidates outside that range are still found, but with their score reduced. The further out of range, the lower the score is. A candidate will be rejected only if the score drops below the Accept parameter. The same principle applies to the Scale and Aspect Ratio (if enabled). If a hard limit is desired for any of these parameters, use an external logic test such as InRange() to reject any results that fall out of the desired limits.

Note that these parameters have an effect on speed as well. The larger the ranges, the slower the function runs. This is because the function must search the entire specified range to ensure it has found the best candidate. If the actual parts are hard-fixtured for example, and will never experience any angular variation, it makes no sense to force the tool to search in a +/-15 degree range. In this case, set the Angle Start and Angle End both to 0. Similarly, if the parts are always the same size, it makes no sense to allow any Scale range, so leave both Scale Start and Scale End set to 100. On the other hand, if the parts are legitimately expected to vary in size by an expected tolerance of 2%, then set the Scale Start to 98 and Scale End to 102, but no more than that. Parts outside that range will still be found, but with lower scores.

These parameters affect speed as well as score, sometimes very significantly. For maximum efficiency and accuracy, set the ranges to the minimum practical values that permit the pattern to be found and scored well.

The final set of parameters are about overlap. These include XY Overlap, Angle Overlap, and if enabled, Scale Overlap, and Aspect Overlap. These parameters control the ability of the FindPatMaxPatterns function to find candidates that overlap each other. Consider a bag of coins dumped randomly into a tray. Since many of the coins likely fall on top of other coins, these parameters can be used to allow the function to locate partially occluded patterns (coins). These parameters are rarely modified from the defaults, but can be if needed.

Summary of FindPatMaxPatterns Optimizations

  • Pattern: Reference a single TrainPatMaxPattern cell or a logic cell that returns one of several choices.
  • Number to Find: Set the maximum number of candidates to be found.
  • Accept: Set the minimum score that produces an acceptable match, for both the coarse and fine searches.
  • Contrast: Set the minimum contrast for features of interest. Lower contrast clutter will be ignored.
  • Clutter in Score: Use to lower the score when unwanted details are found within or around the pattern.
  • Outside Region: Use to specify whether a portion of the pattern can fall outside the search region.
  • Find Tolerances: Set the minimum ranges needed to find the correct patterns.
  • Find Overlapping: Set the maximum amount of overlap or occlusion of one pattern with another.


Overview of PatMax RedLine

The purpose of this topic is to provide information about the basic functionality of the PatMax RedLine functions (5.1.0 - current firmware) job files. The default settings found in PatMax RedLine work well only in cases where the image and pattern to be trained have good contrast and little or no background clutter, such as a textured surface. Even in cases where the image is clear and uncluttered, it is still useful to optimize the function for speed, efficiency, and accuracy.

Note: The EasyBuilder version of PatMax RedLine hides certain key parameters which are necessary for optimizing performance. Therefore, this document only describes the Spreadsheet PatMax RedLine functions. The same principles can be applied to EasyBuilder by round-tripping into the spreadsheet to edit the EasyBuilder tool.
Note: The TrainPatMaxRedLine Color and FindPatMaxRedLine Color tools are not illustrated here, but the same principles apply as the greyscale PatMax RedLine functions.

PatMaxRedLine Theory of Operation

Create a Suitable Pattern Model for TrainPatMaxRedLine

Optimize TrainPatMaxRedLine

Optimize FindPatMaxRedLine


PatMax RedLine Theory of Operation

The FindPatMax RedLine function uses a two-step process to locate and score a pattern. In the first step, the raw image is searched using a coarse pattern filter to locate potential candidates that might be a good match. Most of the parameters are considered: Accept Threshold, Ignore Polarity, Accuracy Mode, Clutter in Score, Contrast Threshold, XY Overlap, Use Coarse Percentage, and Coarse Accept Percentage. Each parameter is given a weighted score and the final score is a combination of all the individual scores. Even if one or more of the parameters are scored very poorly, it is possible for the remaining parameters to produce a score that exceeds the Accept Threshold. Angle and Scale, however, are hard limits and anything scoring outside of these parameters is not returned. The data for every candidate that passes the Accept Threshold is placed into a memory array.

Note: Even if only one object is present, it is possible for multiple candidates to be found.

Consider the case of a circular object such as a coin. The coarse filter may not detect much of the fine detail on the face of the coin, but can easily detect the circular perimeter. The problem is that there are an infinite number of potential angular matches to a circle because a circle looks the same at any rotation angle. Based on any other detail the coarse filter can detect, it can come up with several potential candidates and place each one into memory.

The second step uses a fine pattern filter to review each of the candidates stored in memory. Each of the parameters is scored again, but this time much more accurately. The candidate with the highest final score is then returned as the result. If N patterns are to be found, then the top N candidates are returned in the order of their scores.

Note: If the coarse filter in the first step does not find a particular "correct" candidate and place it into memory, the fine filter in the second step cannot score it. The second step does not scan the raw image again for any missed candidates. Therefore, it is critically important to define the pattern model and the parameters in a way that ensures the "correct" candidate will always be found in the first step, even if it is not a particularly good match.

For example, suppose a poor but correct candidate scores only 59.5 in the coarse search. If the Accept Threshold is set to 60, this candidate will be rejected, and the fine search will never see it. If the Accept Threshold is lowered to 59, then this candidate will be considered by the fine search and may even return a very high score.


Create a Suitable Pattern Model for TrainPatMaxRedLine

Create a Suitable Pattern Model in TrainPatMaxRedLine

One problem with a circular feature is that it is very ambiguous when considering rotation angle. Similarly, a simple edge feature is ambiguous when considering scale. A robust pattern is one in which the vertical, horizontal, rotation, and scale attributes are unambiguous.

The circular pattern below provides X, Y, and scale information which is unambiguous, but there is no detectible rotation information.

By modifying the pattern as follows, there is no longer any ambiguity in rotation.

The following patterns have good X, Y, and Rotation information, but very little scale information. There is a 2X difference in scale, but FindPatMaxRedLine cannot reliably detect it. The previous image also serves to illustrate how corner features, when combined with other features, alleviate the scale ambiguity.

Another attribute of a reliably detectible pattern is that it should not be cluttered with unnecessary or unwanted details. For example, suppose the smaller connector in the first image below, may have a variable number of pins. If we want to find the angle of the keyed connector fitting, regardless of the number or position of pins in the connector, we must train a model consisting of just the connector outline without the pins, as shown in the left image. Note that this can be done by either removing the unwanted clutter features physically, if possible, or by utilizing an EditCompositeRegion function with a Subtract zone to mask the pins.

Note: In the right image, the pattern of the connector outline is found at a 45-degree angle, even though the pins were not masked in this image. That is because the FindPatMaxRedLine function only tries to match the features that were trained and ignores everything else.

Every feature trained in the model is considered as an equally important part of the model. If the pins in the above example or other unwanted features such as surface texture are included in the model, they are outlined in green. FindPatMaxRedLine attempts to match every green feature with equal vigor, so if the unwanted features provide a better "match" than the actual desired features, FindPatMaxRedLine returns an incorrect result. Consider the following images in which the feature we care about is the group of three dots. The pattern model was created excessively large in the left image for this example so that it includes other features that are of no interest.

The FindPatMaxRedLine function returns a successful "Pass" result in the right image even though 1/3 of the desired feature is missing. That is because the missing feature only constitutes a tiny percentage of the total model. Unless the minimum Accept Threshold is set to a very high value this is considered a good match. As discussed previously, the problem with setting very high Accept Thresholds is that the first step of the FindPatMaxRedLine algorithm (the initial Coarse search) will be more likely to miss good candidates and cause unnecessary "Fail" results.

Although the TrainPatMaxRedLine Pattern Region and the FindPatMaxRedLine Find Region parameters can use any of the standard internal or external Region structures, the FindPatMaxRedLine tool runs faster and consumes the least amount of memory if the regions are simple rectangles and not rotated or curved. In other words, use rectangular regions aligned to the pixel grid unless there is a compelling need to rotate, curve, or use composite shapes.


Optimize TrainPatMaxRedLine

It is assumed you are already familiar with configuring spreadsheet functions, so the first four parameters are not discussed here. Beginning with the Pattern Origin parameter, the default Offset Row and Offset Column (0,0) places the pattern origin at the geometric center of the Pattern Region. Any Offset row or column entered moves the origin away from the center by the specified amount.

Consider the following square pattern. In the first image the default Offset Row and Offset Column (0,0) is used, but in the second image the Offset Row and Offset Column is set to (14,14), to place the origin at the center of the larger connector. In either case, the FindPatMaxRedLine function then reports the location of the origin crosshairs as the location of the found pattern.

The next settings are Auto Select Coarse and Auto Select Fine checkboxes. When checked, the function runs with the default settings, which is usually not desirable. Uncheck both boxes and adjust the Coarse Granularity and Fine Granularity manually. Coarse Granularity and Fine Granularity are extremely important parameters which are almost always overlooked or ignored, yet they provide one of the best optimizations available. The default values are used when Auto Select Coarse and Auto Select Fine are enabled. If Auto Select Coarse and Auto Select Fine are selected, it tries to calculate granularities that minimize background noise while still finding the pattern. It tries to model all relevant features while ignoring the clutter. Consider the following model created with the default Coarse Granularity and Fine Granularity:

Now assume that the goal is to simply locate the position of this Data Matrix code, but not to find an exact match because it will be different on every part. To accomplish this, we need fewer Fine Granularity details. To determine the optimal settings, we start with both Coarse Granularity and Fine Granularity set to 10, then alternate between decrementing both settings until a crude outline is recognizable, as shown below. In this case, a Coarse Granularity of 4 is used. The pattern is crude, but contains enough information to recognize a roughly square shape.

Now set the Fine Granularity to 2 to improve the model slightly, but not too much. The idea is to get as much detail as possible around the perimeter of the square without adding too much detail in the interior. Here is the result:

The end result is a pattern model that is very robust. Note that even if none of the interior details are matched in any future image, the majority of the pattern is the perimeter outline which, in this example, is all we care about.

The purpose of this example is to illustrate that the Coarse Granularity and Fine Granularity can be used to restrict the model elements primarily to those features that matter most, but in some cases it may be impossible to restrict all of the unwanted features. Even so, excellent results can be obtained. The following image contains a different Data Matrix code, yet achieved a score above 85.018 with the above model. The reason for this is that 100% of the perimeter details were matched, and by sheer luck a number of the "unwanted" interior features also matched.

Even if almost none of the interior had matched, the score would been above 85 as shown in the image below. In other words, with an appropriate Accept Threshold this model could produce virtually a 100% success rate on any similar Data Matrix code.

One additional benefit of manually optimizing the Coarse Granularity and Fine Granularity parameters is that it allows the function to run faster. The lower the Coarse Granularity and Fine Granularity values are, the longer it takes to process the image. So when speed is important, set the Coarse Granularity and Fine Granularity as high as possible, but low enough to ensure an accurate match.

The examples in this section have good contrast, so the Feature Threshold was left at the default setting of 20. However, in cases where low contrast clutter such as surface texture is present, it is beneficial to increase the contrast setting to a level that ignores the surface texture, but not the features of interest.

The final parameter to be discussed here is the Reuse Training Image checkbox. When enabled, it saves the training image. This allows all the parameters discussed above to be modified later without reloading the training image. However, if the Fixture or Pattern Region are modified in any way, a new training image is saved, so be sure to reload the original training image in this case.

Summary of TrainPatMaxRedLine Optimizations

  • Pattern Origin: Modify the Offset Row and Offset Column so the function returns location information relative to a feature of interest.
  • Coarse Granularity and Fine Granularity: Use these parameters to reduce unwanted features or clutter in the model and to speed up processing time, larger numbers are faster and will reduce processing time.
  • Feature Threshold: Default setting is 20. Reduce this setting for desireable features that are only slightly darker or lighter than the background.
  • Reuse Training Image: Enable this while experimenting with different iterations of the above parameters to avoid the need to reload the training image each time.


Optimize FindPatMaxRedLine

The first few parameters will be skipped since they are similar to most other vision tools. Beginning with the Pattern parameter, the following group of parameters will be discussed:

The Pattern parameter contains the cell address of the TrainPatMaxRedLine function containing the model to be found. It is also possible to train multiple models and use logic expressions to choose which model should be used at any given time. For example, if models of five different coins have been trained, and the goal is to find only the dimes in any image of coins. The logic lookup function Choose() can be used to select the cell containing the Dime model, and then the cell address of the Choose() function is inserted into the Pattern parameter field.

The Number to Find parameter specifies the maximum number of matching candidates the function returns. If there are more candidates found than the set value, the highest scoring candidates are returned in the results.

The Accept Threshold parameter specifies the minimum score that must be achieved by any candidate to be returned as a found result. This threshold applies to both the coarse and fine scores by default, unless changed in the Advanced Settings.

Note: If the coarse filter in the first step does not find a particular "correct" candidate and place it into memory, the fine filter in the second step cannot score it. The second step does not scan the raw image again for any missed candidates. Therefore, it is critically important to define the pattern model and the parameters in a way that ensures the "correct" candidate is always found in the first step, even if it is not a particularly good match. For example, suppose a poor but correct candidate scores only 59.5 in the coarse search. If the Accept Threshold is set to 60, this candidate is rejected, and the fine search never sees it. If the Accept Threshold is lowered to 59, then this candidate is considered by the fine search and may even return a very high score. The coarse and fine Accept Thresholds can be different if desired.

The parameters in FindPatMaxRedLine are almost identical to FindPatMaxPatterns, but with at least one notable difference: in the FindPatMaxRedLine tool there is a Coarse Acceptance Percentage parameter under Advanced Settings. This parameter allows the user to specify a different Accept Threshold for the initial coarse search than what is used for the fine search. This helps to eliminate false rejects in the coarse step. Also noteworthy is that while FindPatMaxRedLine is much faster, it also uses more processing memory. For very large job files where speed is not the primary concern, use the standard FindPatMaxPatterns instead.

The Ignore Polarity checkbox defines whether the pattern can be matched even if the polarity is reversed from the original trained polarity.

The Accuracy Mode parameter specifies the level of accuracy required by the search. Low Accuracy uses a faster algorithm, High Accuracy uses a finer scoring algorithm which requires more time. High Accuracy does not necessarily give you a better score, but does provide more accurate positioning of the found pattern.

The Clutter in Score checkbox defines whether clutter in the image should lower the final score. Clutter is defined as anything not trained in the pattern model, even if it is a valid feature of the part. Consider the trained model in the left image. In the right image the pins are not outlined in green because they are not part of the model, so they would be considered as clutter.

The question in this case is, do we care about the clutter? If we do not care whether the pins are there or not, and we only care about finding the circle, then we do not want the presence or absence of the pins to affect the final score. On the other hand, if we do not want the clutter features to be present, then we do want the score to be affected (i.e., lower) when they are present.

Since the model was trained without the pins present, when Clutter in Score is disabled, we get a score of 97.883 because all elements of the circle were found and we do not care about the pins, as shown in the left image. In the right image, Clutter in Score has been enabled, so the score drops to 72.236. By setting the Accept Threshold to 80, we can ensure that only patterns without pins will be found.

The alternative is to set the Accept Threshold level lower and let the pinned patterns be found, but then use an external logic test such as InRange() to reject any result below 80.

The Contrast Threshold parameter defines the minimum contrast a feature must have relative to its background to be considered a match. The default value of 20 rarely needs to be changed. However, if the desired features of the model have very good contrast of 50, while background clutter such as surface texture has low contrast of 30, then set the Contrast Threshold to 40. This allows the desired features to be found while ignoring the lower contrast clutter.

The Find Tolerances are very important and should always be adjusted. The default settings are rarely correct for any given application.

These settings are hard limits. The tool will not find results outside the ranges set for Angle and Scale. The purpose of these settings is to define the limits of what is considered a "perfect" match. In other words, if the Angle Start and Angle End are set to +/-15 degrees, then any candidate within that range can achieve a perfect score.

Note that these parameters have an effect on speed as well. The larger the ranges, the slower the function runs. This is because the function must search the entire specified range to ensure it has found the best candidate. If the actual parts are hard-fixtured for example, and will never experience any angular variation, it makes no sense to force the tool to search in a +/-15 degree range. In this case, set the Angle Start and Angle End both to 0. Similarly, if the parts are always the same size, it makes no sense to allow any Scale range, so leave both Scale Start and Scale End set to 100. On the other hand, if the parts are legitimately expected to vary in size by an expected tolerance of 10%, then set the Scale Start to 90 and Scale End to 110, but no more than that. All matching patterns within Scale Tolerances of +/- 10% are returned.

These parameters affect speed as well as score, sometimes very significantly. For maximum efficiency and accuracy, set the ranges to the minimum practical values that permit the pattern to be found and scored well.

The next parameter is XY Overlap. This parameter controls the ability of the tool to find candidates that overlap each other. Consider a bag of coins dumped randomly into a tray. Since many of the coins likely fall on top of other coins, this parameter can be used to allow the tool to locate partially occluded patterns (coins). This parameter is rarely modified from the default, but can be if needed.

The final parameters are under Advanced Settings and they are Use Coarse Percentage and Coarse Accept Percentage. This is useful when you want different Accept Thresholds for the fine search and for the coarse search. The Coarse Accept Percentage is expressed as a percentage of the primary Accept Threshold. For example, if the primary Accept Threshold is set to 80, and Coarse Accept Percentage is set to 60%, then the resulting Coarse Accept Threshold is 48. This helps to eliminate false rejects in the coarse step while retaining a higher threshold for the fine step.

Summary of FindPatMaxRedLine Optimizations

  • Pattern: Reference a single TrainPatMaxRedLine cell or a logic cell that returns one of several choices.
  • Number to Find: Set the maximum number of candidates to be found.
  • Accept Threshold: Set the minimum score that produces an acceptable match, for Fine searches.
  • Ignore Polarity: Check this box to find a pattern, even if the polarity is reversed.
  • Accuracy Mode: Specifies the level of accuracy required in a result pose. Can be set to Low or High.
  • Clutter in Score: Use to lower the score when unwanted details are found within or around the pattern.
  • Contrast Threshold: Set the minimum contrast for features of interest. Lower contrast clutter will be ignored.
  • Find Tolerances: Set the minimum ranges needed to find the correct patterns.
  • Advanced Settings: Specify a different (lower) Accept Threshold for the coarse search step.


Geometry Functions

Geometry functions allow the spreadsheet programmer to easily compute the distance between standard geometric constructs, including circles, points, and line segments.

Note: If a Geometry function is using world coordinate data as a reference, the resulting graphics will not be displayed correctly.
  • Fit: Constructs geometric shapes from points and lines.
  • Measure: Computes distances and angles between circles, points, and lines.

Fit

Measure


Fit Functions

The Fit functions construct geometric shapes from points and lines.

  • BoundingRectangle: Determines a bounding rectangle around a specified (indexed) blob.
  • CircleFromNPoints: Fits a circle from three or more points.
  • LineFromNPoints: Fits a line from two or more points.
  • SegmentFromLines: Averages endpoints to make a new line segment.

BoundingRectangle

CircleFromNPoints

LineFromNPoints

SegmentFromLines


BoundingRectangle

Determines a bounding rectangle around a specified (indexed) blob. The function finds a rectangle that encloses all points of a blob based on the given function inputs.

BoundingRectangle Inputs

Syntax: BoundingRectangle(Blobs,Index,Alignment,Angle,Padding.High,Padding.Wide,Show)

Parameter Description

Blobs

This argument must reference a spreadsheet cell that contains a valid Blobs data structure returned by the ExtractBlobs, FindBlobs, or SortBlobs function.

Index

Specifies the Index of the Blob within Blobs structure.

Alignment

Specifies the alignment of the found rectangle. For example:

0 = Blob Coordinate Frame (default) | Specifies that the rectangle be at the same angle as the blob angle. Note: The angle of the blob can be returned by the GetAngle function.
1 = Image Coordinate Frame | Specifies the rectangle that best fits the blob at an angle of 0°.
2 = User Coordinate Frame | Specifies the rectangle that best fits the blob at the angle used by the Angle parameter.

Angle

Specifies the desired angle (-360 to 360) at which to find the bounding rectangle.

Padding

Specifies the amount of amount of space, in pixels, between the blob and the rectangle.

High | Specifies the amount of amount of space, in pixels, (0 to ((image height / 2) – 1)) between the top and bottom of the blob and the rectangle.
Wide | Specifies the amount of amount of space, in pixels, (0 to ((image width/ 2) – 1)) between the left and right side of the blob and the rectangle.

Show

Specifies the display mode for BoundingRectangle graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the BoundingRectangle function is highlighted in the spreadsheet.
1 = result graphics only | The bounding rectangle region will be displayed at all times.

BoundingRectangle Outputs

Returns | A Region data structure that defines the best bounding rectangle from the indexed blob, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

BoundingRectangle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Region) | The row offset of the region's origin, in image coordinates.
Col | GetCol(Region) | The column offset of the region's origin, in image coordinates.
High | GetHigh(Region) | The dimension along the region's x-axis.
Wide | GetWide(Region) | The dimension along the region's y-axis.
Angle | GetAngle(Region) | The orientation, in image coordinates.


CircleFromNPoints

Fits a circle using three or more input points.

CircleFromNPoints Inputs

Syntax: CircleFromNPoints(Point Row 0,Point Col 0,Point Row 1,Point Col 1,Point Row 2,Point Col 2,...,Point Row N,Point Col N,Show)

Parameter Description

Point 0

Specifies the coordinates of the first point.

Point Row 0 | The x-coordinate of the first point.
Point Col 0 | The y-coordinate of the first point.

Point 1

Specifies the coordinates of the second point.

Point Row 1 | The x-coordinate of the second point.
Point Col 1 | The y-coordinate of the second point.

Point 2

Specifies the coordinates of the third point.

Point Row 2 | The x-coordinate of the third point.
Point Col 2 | The y-coordinate of the third point.

Point 3..N

Optionally specifies the coordinates of any additional points.

Point Row N | The x-coordinate of the Nth point.
Point Col N | The y-coordinate of the Nth point.

Show

Specifies the graphics items to be displayed on a permanent basis.

0 = hide all | All graphics items will be hidden except when the cell containing the CircleFromNPoints function is the active cell in the spreadsheet.
1 = result graphics only | The fitted circle graphic will be displayed at all times. The input points will only be displayed when the cell containing the CircleFromNPoints function is the active cell in the spreadsheet.
2 = input and result graphics | The fitted circle and the input points will be displayed at all times.

CircleFromNPoints Outputs

Returns | A CircleFit data structure containing the row, column, radius and sigma of the fitted circle.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

CircleFromNPoints Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see CircleFit.

Row | GetRow(CircleFit) | The x-coordinate of the center of the circle.
Col | GetCol(CircleFit) | The y-coordinate of the center of the circle.
Radius | GetRadius(CircleFit) | The radius of the circle.
Sigma | GetSigma(CircleFit) | The square root of the sum of the squares of the distances from the points to the circle divided by the number of points.

Additional data elements can be accessed using the following Vision Data Access functions:

Distance | GetDistance(CircleFit, Index) | The distance between the indexed point and the circle. If the value is negative, the point is within the circle. If the indexed point is invalid, an #ERR is returned.
MaxDist | GetMaxDist(CircleFit) | The distance between the circle and the point farthest from the circle. If the value is negative, the point is within the circle.
MaxDistIndex | GetMaxDistIndex(CircleFit) | The index of the point farthest from the circle.
NPointsUsed | GetNPointsUsed(CircleFit) | The number of points used to fit the circle.


LineFromNPoints

Fits a line using two or more input points.

LineFromNPoints Inputs

Syntax: LineFromNPoints(Point Row 0,Point Col 0,Point Row 1,Point Col 1,[...Point Row N,Point Col N,Show])

Parameter Description

Point 0

Specifies the coordinates of the first point.

Point Row 0 | The x-coordinate of the first point.
Point Col 0 | The y-coordinate of the first point.

Point 1

Specifies the coordinates of the second point.

Point Row 1 | The x-coordinate of the second point.
Point Col 1 | The y-coordinate of the second point.

Point 2..N

Specifies the coordinates of any additional points.

Point Row N | The x-coordinate of the Nth point.
Point Col N | The y-coordinate of the Nth point.

Show

Specifies the graphics items to be displayed on a permanent basis.

0 = hide all | All graphics items will be hidden except when the cell containing the LineFromNPoints function is the active cell in the spreadsheet.
1 = result graphics only | The fitted line graphic will be displayed at all times. The input points will only be displayed when the cell containing the LineFromNPoints function is the active cell in the spreadsheet.
2 = input and result graphics | The fitted line and the input points will be displayed at all times.

LineFromNPoints Outputs

Returns | A LineFit data structure if two or more valid points are included in data, or #ERR if only one or no valid point is included in data.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

LineFromNPoints Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table.

Row0 | GetRow(LineFit, 0) | The x-coordinate of the first endpoint.
Col0 | GetCol(LineFit, 0) | The y-coordinate of the first endpoint.
Row1 | GetRow(LineFit, 1) | The x-coordinate of the second endpoint.
Col1 | GetCol(LineFit, 1) | The y-coordinate of the second endpoint.
Chi2 | GetChi2(LineFit) | The sum of the squares of the distances from the points to the line.

Additional data elements can be accessed using the following Vision Data Access functions. For more information, see LineFit.

Distance | GetDistance(LineFit, Index) | The distance between the indexed point and the line.
MaxDist | GetMaxDist(LineFit) | The point that is farthest from the line.
MaxDistIndex | GetMaxDistIndex(LineFit) | The index of the point that is farthest from the line.
NPointsUsed | GetNPointsUsed(LineFit) | The number of points used to compute the line.


SegmentFromLines

Computes a new line segment by averaging two input lines. The function averages the first endpoint of the first line with the first endpoint of the second line. Similarly, it averages the second endpoint of the first line with the second endpoint of the second line; the result is a mean line segment.

SegmentFromLines Inputs

Syntax: SegmentFromLines(Line 0.X 0,Line 0.Y 0,Line 0.X 1,Line 0.Y 1,Line 1.X 0,Line 1.Y 0,Line 1.X 1,Line 1.Y 1,Show)

Parameter Description

Line 0

Specifies the coordinates of the first line.

X 0 | The x-coordinate of the first endpoint of the first line.
Y 0 | The y-coordinate of the first endpoint of the first line.
X 1 | The x-coordinate of the second endpoint of the first line.
Y 1 | The y-coordinate of the second endpoint of the first line.

Line 1

Specifies the coordinates of the second line.

X 0 | The x-coordinate of the first endpoint of the second line.
Y 0 | The y-coordinate of the first endpoint of the second line.
X 1 | The x-coordinate of the second endpoint of the second line.
Y 1 | The y-coordinate of the second endpoint of the second line.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all | The available graphics items will be hidden except when the cell containing the function is the active cell in the spreadsheet.
1 = result graphics only | The graphics items associated with the returned data structure will be displayed at all times. Other graphics items will only be displayed when the function is the active cell in the spreadsheet.
2 = input and result graphics | The graphics items associated with the returned data structure and input image region will be will be displayed at all times.

SegmentFromLines Outputs

Returns | Line data structure containing the mean line segment.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

SegmentFromLines Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table.

Row0 | GetRow(Line, 0) | The x-coordinate of the first endpoint.
Col0 | GetCol(Line, 0) | The y-coordinate of the first endpoint.
Row1 | GetRow(Line, 1) | The x-coordinate of the second endpoint.
Col1 | GetCol(Line, 1) | The y-coordinate of the second endpoint.

For more information, see Structures, Property Sheet, Geometry Functions, or Fit Functions.


Measure Functions

The Measure functions compute distances and angles between circles, points, and lines.

  • BlobToBlob: Measures the minimum or maximum distance between the boundaries of two blobs.
  • BlobToLine: Measures the minimum or maximum distance between a blob boundary and a line.
  • BlobToPoint: Measures the minimum or maximum distance between a blob boundary and a point.
  • BlobToRadian: Measures the distance between a blob boundary and a point at a specified angle.
  • CircleToCircle: Computes the minimum distance between two circles.
  • LineToCircle: Computes the minimum distance between a line and a circle.
  • LineToLine: Computes the intersection of two lines.
  • MidLineToMidLine: Computes the distance from the midpoint of one line segment to another.
  • PointToCircle: Compute the minimum distance from a point to a circle.
  • PointToLine: Computes the minimum distance from a point to a line.
  • PointToPoint: Computes the directed distance between two points.
  • PointToPointAngle: Computes the angle defined by two points.
  • PointToPointDistance: Computes the distance between two points.

BlobToBlob

BlobToLine

BlobToPoint

BlobToRadian

CircleToCircle

LineToCircle

LineToLine

MidLineToMidLine

PointToCircle

PointToLine

PointToPoint

PointToPointAngle

PointToPointDistance


BlobToBlob

Measures the minimum or maximum distance between the boundaries of two blobs.

BlobToBlob Inputs

Syntax: BlobToBlob(Blobs 0,Index 0,Blobs 1,Index 1,Find By,Show)

Parameter | Description
Blobs 0 | This argument must reference a spreadsheet cell that contains a valid Blobs data structure.

Index 0

This argument references a zero-based index in the Blobs data structure.

Blobs 1

This argument must reference a spreadsheet cell that contains a valid Blobs data structure.

Index 1

This argument references a zero-based index in the Blobs data structure.
Find By

Specifies how the distance will be measured.

0 = Minimum Distance | Finds the distance between the closest points of the boundaries of two blobs.
1 = Maximum Distance | Finds the distance between the furthest points of the boundaries of two blobs.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = Hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = Result graphics only | A line segment showing the minimum or maximum distance between the two blobs will be displayed at all times.
2 = Input and result graphics | The two blobs, and the line segment between them, will be displayed at all times.

BlobToBlobOutputs

Returns | A Dist data structure containing the directed distance between a blob and the nearest or furthest point on another blob boundary.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

Example

In this example, the BlobToBlob function is measuring the minimum distance between the boundaries of two blobs.

BlobToBlobVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the nearest or furthest point on the boundary of the first blob, depending on the setting of the Find By parameter.
Col0 | GetCol(Dist, 0) | The y-coordinate of the nearest or furthest point on the boundary of the first blob, depending on the setting of the Find By parameter.
Row1 | GetRow(Dist, 1) | The x-coordinate of the nearest or furthest point on the boundary of the second blob, depending on the setting of the Find By parameter.
Col1 | GetCol(Dist, 1) | The y-coordinate of the nearest or furthest point on the boundary of the second blob, depending on the setting of the Find By parameter.
Angle | GetAngle(Dist) | The angle between the boundary points of the first blob and second blob.
Distance | GetDistance(Dist) | The distance between the boundary points of the first blob and second blob.


BlobToLine

Measures the minimum or maximum distance between a blob boundary and a line. In this example, the BlobToLine function is measuring the maximum distance between the second blob's boundary and a line.

BlobToLineInputs

Syntax: BlobToLine(Blobs,Index,Line.X 0,Line.Y 0,Line.X 0,Line.Y 0,Find By,Show)

Parameter Description

Blobs

This argument must reference a spreadsheet cell that contains a valid Blobs data structure.

Index

This argument references a zero-based index in the Blobs data structure.

Line

Specifies the coordinates of the line.

X 0 | The x-coordinate of the first endpoint of the line.
Y 0 | The y-coordinate of the first endpoint of the line.
X 1 | The x-coordinate of the second endpoint of the line.
Y 1 | The y-coordinate of the second endpoint of the line.

Find By

Specifies how the distance will be measured.

0 = Minimum Distance | Finds the distance between the closest point of the blob's boundary and the line.
1 = Maximum Distance | Finds the distance between the furthest point of the blob's boundary and the line.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum or maximum distance between the blob and the line will be displayed at all times.
2 = input and result graphics | The blob and the line, and the line segment between them, will be displayed at all times.

BlobToLine Outputs

Returns | A Dist data structure containing the directed distance between the line and the nearest or furthest point on the blob boundary.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

BlobToLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the nearest or furthest point on the blob boundary.
Col0 | GetCol(Dist, 0) | The y-coordinate of the nearest or furthest point on the blob boundary.
Row1 | GetRow(Dist, 1) | The x-coordinate of the nearest or furthest point on the line.
Col1 | GetCol(Dist, 1) | The y-coordinate of the nearest or furthest point on line.
Angle | GetAngle(Dist) | The angle between the blob boundary point and the line.
Distance | GetDistance(Dist) | The distance between the blob boundary point and the line.


BlobToPoint

Measures the minimum or maximum distance between a blob boundary and a point. In this example, the BlobToPoint function is measuring the minimum distance between the third blob and a point.

BlobToPointInputs

Syntax: BlobToPoint(Blobs,Index,Point.X,Point.Y,Find By,Show)

Parameter Description

Blobs

This argument must reference a spreadsheet cell that contains a valid Blobs data structure.

Index

This argument references a zero-based index in the Blobs data structure.

Point

Specifies the coordinates of the point.

X | The x-coordinate of the point.
Y | The y-coordinate of the point.

Find By

Specifies how the distance will be measured.

0 = Minimum Distance | Finds the distance between the closest point of the blob's boundary and the point.
1 = Maximum Distance | Finds the distance between the furthest point of the blob's boundary and the point.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum or maximum distance between the blob and the point will be displayed at all times.
2 = input and result graphics | The blob and the point, and the line segment between them, will be displayed at all times.

BlobToPoint Outputs

Returns | A Dist data structure containing the directed distance between the point and the nearest or furthest point on the blob boundary.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

BlobToPoint Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the nearest or furthest point on the blob boundary.
Col0 | GetCol(Dist, 0) | The y-coordinate of the nearest or furthest point on the blob boundary.
Row1 | GetRow(Dist, 1) | The x-coordinate of the point.
Col1 | GetCol(Dist, 1) | The y-coordinate of the point.
Angle | GetAngle(Dist) | The angle between the blob boundary point and the point.
Distance | GetDistance(Dist) | The distance between the blob boundary point and the point.


BlobToRadian

Measures the distance between a blob boundary and a point at a specified angle. In this example, the BlobToRadian function is measuring the distance between the third blob and a point, at a user-specified angle.

Note: The user-specified angle must be set such that the point will intersect the blob, or the function will return #ERR.

BlobToRadian Inputs

Syntax: BlobToRadian(Blobs,Index,Point.X,Point.Y,Point.Angle,Show)

Parameter Description

Blobs

This argument must reference a spreadsheet cell that contains a valid Blobs data structure.

Index

This argument references a zero-based index in the Blobs data structure.

Point

Specifies the coordinates of the point, and the angle of the intersection.

X | The x-coordinate of the point.
Y | The y-coordinate of the point.
Angle | The angle of the intersection between the point and the blob. Note: If the point and blob boundary are parallel, the function will return #ERR. The point and blob boundary must intersect.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum or maximum distance between the blob and the radial line will be displayed at all times.
2 = input and result graphics | The blob and the radial line, and the line segment between them, will be displayed at all times.

BlobToRadian Outputs

Returns | A Dist data structure containing the directed distance between the radial line and the furthest point on the blob boundary.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

BlobToRadian Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the furthest point on the blob boundary.
Col0 | GetCol(Dist, 0) | The y-coordinate of furthest point on the blob boundary.
Row1 | GetRow(Dist, 1) | The x-coordinate specified in the Point parameter.
Col1 | GetCol(Dist, 1) | The y-coordinate specified in the Point parameter.
Angle | GetAngle(Dist) | The angle between the blob boundary point and the radial line point.
Distance | GetDistance(Dist) | The distance between the blob boundary point and the radial line point.


CircleToCircle

Computes the minimum distance between two circles. If the two circles intersect, the points of intersection are computed and returned. If one circle is inside the other, the computed distance will be negative.

CircleToCircle Inputs

Syntax: CircleToCircle(Circle 0.X,Circle 0.Y,Circle 0.Radius,Circle 1.X,Circle 1.Y,Circle 1.Radius,Show)

Parameter Description

Circle 0

Specifies the coordinates and size of the first circle.

X | The x-coordinate of the center of the first circle.
Y | The y-coordinate of the center of the first circle.
Radius | The radius of the first circle, in pixels.

Circle 1

Specifies the coordinates and size of the second circle.

X | The x-coordinate of the center of the second circle.
Y | The y-coordinate of the center of the second circle.
Radius | The radius of the second circle, in pixels.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the two circles will be displayed at all times.
2 = input and result graphics | The two circles and the line segment between them will be displayed at all times.

CircleToCircle Outputs

Returns | A Dist data structure containing a point on the first circle, a point on the second circle, the distance between points, and the angle of the directed distance.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

CircleToCircle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | If not intersecting, the x-coordinate of a point on the first circle. If intersecting, the x-coordinate of the first point of intersection.
Col0 | GetCol(Dist, 0) | If not intersecting, the y-coordinate of a point on the first circle. If intersecting, the y-coordinate of the first point of intersection.
Row1 | GetRow(Dist, 1) | If not intersecting, the x-coordinate of a point on the second circle. If intersecting, the x-coordinate of the second point of intersection.
Col1 | GetCol(Dist, 1) | If not intersecting, the y-coordinate of a point on the second circle. If intersecting, the y-coordinate of the second point of intersection.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | If not intersecting, the distance between points; otherwise 0.


LineToCircle

Computes the minimum distance between a line and a circle.

LineToCircle Inputs

Syntax: LineToCircle(Line.X 0,Line.Y 0,Line.X 1,Line.Y 1,Circle.X,Circle.Y,Circle.Radius,Show)

Parameter Description

Line

Specifies the coordinates of the line.

X 0 | The x-coordinate of the first endpoint of the line.
Y 0 | The y-coordinate of the first endpoint of the line.
X 1 | The x-coordinate of the second endpoint of the line.
Y 1 | The y-coordinate of the second endpoint of the line.

Circle

Specifies the coordinates and the size of the circle.

X | The x-coordinate of the center of the circle.
Y | The y-coordinate of the center of the circle.
Radius | The radius of the circle, in pixels.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the input line and the circle will be displayed at all times.
2 = input and result graphics | The input line and circle, and the line segment between them, will be displayed at all times.

LineToCircle Outputs

Returns
  • If the line and the circle do not intersect, the function returns a Dist data structure containing a point on the line, a point on the circle, the distance between points, and the angle of the directed distance. For more information, see Structures.
  • If the line and circle intersect, the function returns a Dist data structure containing the two points of intersection, the angle of line segment, and a distance of exactly zero.

Results

When the function is initially inserted into a cell, a result table is created in the spreadsheet.

LineToCircle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | If not intersecting, the x-coordinate of a point on the first circle. If intersecting, the x-coordinate of the first point of intersection.
Col0 | GetCol(Dist, 0) | If not intersecting, the y-coordinate of a point on the first circle. If intersecting, the y-coordinate of the first point of intersection.
Row1 | GetRow(Dist, 1) | If not intersecting, the x-coordinate of a point on the second circle. If intersecting, the x-coordinate of the second point of intersection.
Col1 | GetCol(Dist, 1) | If not intersecting, the y-coordinate of a point on the second circle. If intersecting, the y-coordinate of the second point of intersection.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | If not intersecting, the distance between points; otherwise 0.


LineToLine

Computes the point and angle of the intersection between two lines. If the lines do not intersect, the distance between the lines is computed and returned instead.

LineToLine Inputs

Syntax: LineToLine(Line 0.X 0,Line 0.Y 0,Line 0.X 1,Line 0.Y 1,Line 1.X 0,Line 1.Y 0,Line 1.X 1,Line 1.Y 1,Show)

Parameter Description

Line 0

Specifies the coordinates of the first line segment.

X 0 | The x-coordinate of the first endpoint of the first line.
Y 0 | The y-coordinate of the first endpoint of the first line.
X 1 | The x-coordinate of the second endpoint of the first line.
Y 1 | The y-coordinate of the second endpoint of the first line.

Line 1

Specifies the coordinates of the second line segment.

X 0 | The x-coordinate of the first endpoint of the second line.
Y 0 | The y-coordinate of the first endpoint of the second line.
X 1 | The x-coordinate of the second endpoint of the second line.
Y 1 | The y-coordinate of the second endpoint of the second line.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the two input lines will be displayed at all times.
2 = input and result graphics | The input lines and the line segment between them will be displayed at all times.

LineToLine Outputs

Returns

If the two lines intersect, the function returns a Dist data structure containing the point of intersection, the angle between the directed lines segments, and a distance equal to 0.

If the two lines do not intersect, the function returns a Dist data structure containing a point for each line, the distance between the lines, and the angle between the directed line segments.

Results

When the function is initially inserted into a cell, a result table is created in the spreadsheet.

LineToLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | If intersecting, the x-coordinate of the point of intersection. If not intersecting, the x-coordinate of the first endpoint of Line 0.
Col0 | GetCol(Dist, 0) | If intersecting, the y-coordinate of the point of intersection. If not intersecting, the y-coordinate of the first endpoint of Line 0.
Row1 | GetRow(Dist, 1) | If intersecting, the x-coordinate of the point of intersection. If not intersecting, the x-coordinate of the point on Line 1 nearest the first endpoint of Line 0.
Col1 | GetCol(Dist, 1) | If intersecting, the y-coordinate of the point of intersection. If not intersecting, the y-coordinate of the point on Line 1 nearest the first endpoint of Line 0.
Angle | GetAngle(Dist) | The angle between the directed line segments.
Distance | GetDistance(Dist) | The distance between lines.


MidLineToMidLine

Computes the distance from the midpoint of one line segment to the midpoint of a second line segment.

MidLineToMidLine Inputs

Syntax: MidLineToMidLine(Line 0.X 0,Line 0.Y 0,Line 0.X 1,Line 0.Y 1,Line 1.X 0,Line 1.Y 0,Line 1.X 1,Line 1.Y 1,Show)

Line 0

Specifies the coordinates of the first line segment.

X 0 | The x-coordinate of the first endpoint of the first line.
Y 0 | The y-coordinate of the first endpoint of the first line.
X 1 | The x-coordinate of the second endpoint of the first line.
Y 1 | The y-coordinate of the second endpoint of the first line.

Line 1

Specifies the coordinates of the second line segment.

X 0 | The x-coordinate of the first endpoint of the second line.
Y 0 | The y-coordinate of the first endpoint of the second line.
X 1 | The x-coordinate of the second endpoint of the second line.
Y 1 | The y-coordinate of the second endpoint of the second line.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | Cross showing the intersection of the two lines, if any.
2 = input and result graphics | The two input lines and the cross showing their intersection will be displayed at all times.

MidLineToMidLine Outputs

Returns | Dist data structure containing the directed distance between line segments.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

MidLineToMidLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the first midpoint.
Col0 | GetCol(Dist, 0) | The y-coordinate of the first midpoint.
Row1 | GetRow(Dist, 1) | The x-coordinate of the second midpoint.
Col1 | GetCol(Dist, 1) | The y-coordinate of the second midpoint.
Angle | GetAngle(Dist) | The angle between the two midpoints.
Distance | GetDistance(Dist) | The distance between the two midpoints.


PointToCircle

Computes the minimum distance from a point to the nearest point on a circle. If the point is inside the circle, distance is reported as a negative number.

PointToCircle Inputs

Syntax: PointToCircle(Point.X,Point.Y,Circle.X,Circle.Y,Circle.Radius,Show)

Parameter Description

Point

Specifies the coordinates of the point, which will be used as the origin.

X | The x-coordinate of the point.
Y | The y-coordinate of the point.

Circle

Specifies the coordinates and size of the circle.

X | The x-coordinate of the center of the circle.
Y | The y-coordinate of the center of the circle.
Radius | The radius of the circle.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the point and the circle will be displayed at all times.
2 = input and result graphics | The point and the circle, and the line segment between them, will be displayed at all times.

PointToCircle Outputs

Returns | Dist data structure containing the directed distance between the point and the nearest point on the circle.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

PointToCircle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the point.
Col0 | GetCol(Dist, 0) | The y-coordinate of the point.
Row1 | GetRow(Dist, 1) | The x-coordinate of the nearest point on the circle.
Col1 | GetCol(Dist, 1) | The y-coordinate of the nearest point on the circle.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | The point-to-point distance.

For more information, see Property Sheet, Geometry Functions and Measure Functions.


PointToLine

Computes the minimum distance from a point to a line.

In this example, the PointToLine function is measuring the distance between a point and a line. The point is the origin, and the angle is calculated based on its position relative to the line.

PointToLine Inputs

Syntax: PointToLine(Point.X,Point.Y,Line.X 0,Line.Y 0,Line.X 1,Line.Y 1,Show)

Parameter Description

Point

Specifies the coordinates of the point, which will be used as the origin.

X | The x-coordinate of the point.
Y | The y-coordinate of the point.

Line

Specifies the coordinates of the line.

X 0 | The x-coordinate of the first endpoint of the line.
Y 0 | The y-coordinate of the first endpoint of the line.
X 1 | The x-coordinate of the second endpoint of the line.
Y 1 | The y-coordinate of the second endpoint of the line.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the point and the input line will be displayed at all times.
2 = input and result graphics | The point, the input line, and the line segment between them will be displayed at all times.

PointToLine Outputs

Returns | Dist data structure containing the directed distance between the point and the nearest point on the line.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

PointToLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the point.
Col0 | GetCol(Dist, 0) | The y-coordinate of the point.
Row1 | GetRow(Dist, 1) | The x-coordinate of the nearest point on the line.
Col1 | GetCol(Dist, 1) | The y-coordinate of the nearest point on the line.
Angle | GetAngle(Dist) | The point-to-line angle.
Distance | GetDistance(Dist) | The point-to-line distance.

For more information, see Property Sheet, Geometry Functions and Measure Functions.


PointToPoint

Computes the directed distance between two points.

In this example, the PointToPoint function is measuring the distance between two points. The angle is calculated based on the first point's position relative to the second.

PointToPoint Inputs

Syntax: PointToPoint(Point 0.X,Point 0.Y,Point 1.X,Point 1.Y,Show)

Parameter Description

Point 0

Specifies the coordinates of the first point, which will be used as the origin.

X | The x-coordinate of the first point.
Y | The y-coordinate of the first point.

Point 1

Specifies the coordinates of the second point.

X | The x-coordinate of the second point.
Y | The y-coordinate of the second point.

Show

Specifies the display mode for the function's graphical overlays on top of the image.

0 = hide all | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the two input points will be displayed at all times.
2 = input and result graphics | The two input points and the line segment between them will be displayed at all times.

PointToPoint Outputs

Returns | Dist data structure containing the directed distance between the points.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

PointToPoint Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Dist.

Row0 | GetRow(Dist, 0) | The x-coordinate of the first point.
Col0 | GetCol(Dist, 0) | The y-coordinate of the first point.
Row1 | GetRow(Dist, 1) | The x-coordinate of the second point.
Col1 | GetCol(Dist, 1) | The y-coordinate of the second point.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | The point-to-point distance.

For more information, see Property Sheet, Geometry Functions and Measure Functions.


PointToPointAngle

Computes the angle between two points.

PointToPointAngle Inputs

Syntax: PointToPointAngle(Point 0.X,Point 0.Y,Point 1.X,Point 1.Y)

Parameter Description

Point 0

Specifies the coordinates of the first point, which will be used as the origin.

X | The x-coordinate of the first point.
Y | The y-coordinate of the first point.

Point 1

Specifies the coordinates of the second point.

X | The x-coordinate of the second point.
Y | The y-coordinate of the second point.

PointToPointAngle Outputs

Returns

A value containing the angle between the two points, relative to the image row axis.
Note: Unlike most other Measure functions in the Geometry category, PointToPointAngle does not insert a Dist data structure or result table into the spreadsheet.

For more information, see Property Sheet, Geometry Functions, or Measure Functions.


PointToPointDistance

Computes the distance between two points.

PointToPointDistance Inputs

Syntax: PointToPointDistance(Point 0.X,Point 0.Y,Point 1.X,Point 1.Y)

Parameter Description

Point 0

Specifies the coordinates of the first point.

X | The x-coordinate of the first point.
Y | The y-coordinate of the first point.

Point 1

Specifies the coordinates of the second point.

X | The x-coordinate of the second point.
Y | The y-coordinate of the second point.

PointToPointDistance Outputs

Returns

A value containing the distance between the two points.
Note: Unlike most other Measure functions in the Geometry category, PointToPointDistance does not insert a Dist data structure or result table to the spreadsheet.

For more information, see Property Sheet, Geometry Functions, or Measure Functions.


Graphics Functions

Graphics functions are used to customize the spreadsheet with interactive controls and to provide a more informative data display during runtime operation of an In-Sight sensor. Graphics functions are divided into the following categories:

  • Controls: Inserts interactive graphics controls into the spreadsheet.
  • Displays: Inserts graphics displays into the spreadsheet.
  • Image: Plot overlay graphics on top of the image.

Controls

Displays

Image


Controls Functions

Controls functions insert interactive elements into the spreadsheet that allow users to make simple configuration changes to an In-Sight job without having to use the Insert Function dialog or property sheet. Controls are solely interactive when the Access Level for the current user is set to Full or Protected; they cannot be accessed when the Access level is Locked.

Controls functions include:

  • Authorize: Inserts a labeled push button control into the spreadsheet that allows you to perform authorization.
  • Button: Inserts a labeled push button control.
  • CheckBox: Inserts a labeled checkbox control.
  • Dialog: Inserts a labeled dialog box control.
  • EditAnnulus: Inserts a labeled, interactive annulus control.
  • EditCircle: Inserts a labeled, interactive circle control.
  • EditCompositeRegion: Inserts a labeled, interactive composite region control.
  • EditFloat: Inserts a floating-point edit control.
  • EditInt: Inserts an integer edit control.
  • EditLine: Inserts a labeled, interactive line control.
  • EditMaskedRegion: Inserts a labeled, interactive region control.
  • EditMultiGraphics: Inserts a labeled, interactive control, that allows you to edit multiple region of interest inputs.
  • EditPassword: Inserts a text edit control. For security, the text string is displayed as asterisks.
  • EditPoint: Inserts a labeled, interactive point control.
  • EditPolygon: Inserts a labeled, interactive polygon region control.
  • EditPolylinePath: Inserts a labeled, interactive path region control.
  • EditRegion: Inserts a labeled, interactive region control.
  • EditString: Inserts a text edit control.
  • Link: Inserts a labeled link control.
  • ListBox: Inserts a drop-down list control.
  • MessageBox: Inserts a MessageBox control.
  • Select: Inserts a labeled Select button control.
  • Wizard: Inserts a labeled Wizard control.

Authorize

Button

Checkbox

Dialog

EditAnnulus

EditCircle

EditCompositeRegion

EditFloat

EditInt

EditLine

EditMaskedRegion

EditMultiGraphics

EditPassword

EditPoint

EditPolygon

EditPolylinePath

EditRegion

EditString

Link

ListBox

MessageBox

Select

Wizard


Authorize

Inserts a labeled push button control into the spreadsheet that allows you to perform two types of authorization: Authorize-Only and Double-Blind. When Authorize-Only is performed, User 1 (typically an operator) makes changes and User 2 (typically a supervisor) verifies the changes. When Double-Blind is performed, User 1 makes changes and User 2 is required to re-enter the changes made by User 1. The authorization results can be tracked by Audit Messages. For more information, see Audit Message Settings Dialog.

The Authorize function supports EditInt, EditFloat and EditString functions controls, and can be added to the spreadsheet, a Dialog, EasyView or Custom View. For more information on the function controls, see EditInt, EditFloat, and EditString. For more information on Dialog, EasyView, or CustomView, see Dialog, EasyView Settings Dialog, or Custom View Settings Dialog.

Note:
  • To access the property sheet for an Authorize function, right-click the button and select Edit Function.
  • For more information on how to configure a spreadsheet containing the Authorize function, how to perform authorization, and what kind of audit messages are generated, see Perform Authorization.

Authorize Inputs

Syntax:Authorize(Label,Type,Level,Cell Ref,Cell Ref)

Parameter | Description
Label | The name that will appear on the button.
Type

Type of Authorization.

  • 0 = None (default): No authorization will occur.
  • 1 = Authorize-Only: User 2 authorizes the changes made by User 1.
  • 2 = Double-Blind: User 2 re-enters the exact values previously entered by User 1.
Level

The minimum Access Level for User 2. For more information, see User Access Settings Dialog

  • 0 = None (default): Any user with valid In-Sight logon credentials can perform authorization. User 1 is allowed to authorize their own entries.
  • 1 = Protected: User 2 must be different than User 1, and have In-Sight Access Level of Protected or Full.
  • 2 = Full: User 2 must be different than User 1, and have In-Sight Access Level of Full.
Cell Ref | The upper left cell of a cell range on which authorization is performed.
Cell Ref | The lower right cell of a cell range on which authorization is performed.
Note:
  • The maximum size of the cell range is 10 (wide) x 20 (height).
  • When performing authorization in the spreadsheet, both Cell Ref parameters need to be specified.
  • When performing authorization in a Dialog, Custom View or EasyView and both Cell Ref parameters are not specified (= 0), the Authorize function uses the Dialog, Custom View or EasyView for the cell range. In this case, the entire Dialog, Custom View or EasyView will be displayed in the Authorize dialog (unsupported edit controls are disabled).
  • If one Cell Ref parameter is specified and the other Cell Ref parameter is not specified, #ERR is returned.

Authorize Outputs

Results

A labeled Button [image] control that performs authorization.


Button

Inserts a labeled push button control into the spreadsheet. Optionally, a button press can be configured to signal a spreadsheet event trigger.

Tip: To access the property sheet for a Button, right-click the button and select Edit Function.
Note:
  • A Button control may be controlled programmatically via In-Sight Native Mode commands, using the EV SetCellValue command. Enter a 1 to press the button down, and a 0 to release the button. Ensure that the command to release the button after pressing it is sent, otherwise the button will remain as though it were pressed on.
  • A button click generates two events. The state of the button changes from 0 to 1 when pressing the button down, then from 1 to 0 when releasing the button. If a button is configured to generate a soft event, the event is only triggered once on the down press of the button.

Button Inputs

Syntax: Button(Name,Trigger)

Parameter Description

Name

Specifies a text string label; this name will appear on the button itself.

Trigger

Optionally specifies a trigger signal to occur when the button is pressed.

-1 = none (default) | No trigger will be signaled.
32 = manual | A manual trigger will be signaled.
(80 to 87) = soft (0 to 7) | A soft trigger event will be signaled.

Button Outputs

Returns | A value of 1 when the button is pressed; otherwise the return value is 0.
Results | A labeled Button [image] control.

Button Example

  1. Assume cells A3 and A4 are configured as follows:

    A3=Button("Test",-1)

    A4=Count(A3,9999999,0,0)

    The spreadsheet looks like this:

  2. Press the button in cell A3. Cell A4 references cell A3 to count the number of times the "Test" button is pressed. The value in cell A4 is now 1.000.


CheckBox

Inserts a labeled checkbox control into the spreadsheet.

Note: To access the property sheet for a CheckBox, right-click the CheckBox and select Edit Function.

CheckBox Inputs

Syntax: CheckBox(Name)

Parameter | Description
Name | Specifies a text string label to appear next to the CheckBox.

CheckBox Outputs

Returns | A value of 0 when cleared (unchecked), and 1 when selected (checked.)
Results | A labeled CheckBox [image] control.

CheckBox Example

A spreadsheet is configured as follows:

A3=CheckBox("On")

A4=A3

Cell A4 references cell A3 to determine the on/off status of the "On" checkbox. When the checkbox is cleared, the value 0.000 is returned in cell A4. When the checkbox is selected, the value 1.000 is returned.


Dialog

Inserts a dialog box control into the spreadsheet. Dialogs contain special cells that are not visible in the spreadsheet (beginning at row 400).

  • Dialogs may contain text and values, and selected Graphics controls, Math, Text String, Input/Output, Clocked Data Storage and Vision Data Access functions. For more information, see Controls Functions, Math, String Functions, Input/Output Functions, Clocked Data Storage Functions, or Vision Data Access Functions.
  • Up to 20 dialogs can be inserted into a spreadsheet, and multiple dialogs can be linked together by a Wizard function. For more information, see Wizard.
  • Dialogs can be executed either manually by the user or automatically when referenced via the Select function. For more information, see Select.
Note:
  • By default, dialog cells are not visible in the spreadsheet. To view the dialog cells, you need to enable the View Entire Spreadsheet option (Menu > View Entire Spreadsheet).
  • By default, all Dialog functions within the job will contain a Cancel button. To exclude the Cancel button from the Dialog, disable the Allow Cancel in Dialog Function Sensor menu option. For more information, see Sensor Menu: Spreadsheet View.
  • To access the property sheet for a Dialog, right-click the dialog control and select Edit Function. For more information, see Property Sheet.
  • A Dialog control that is copied cannot be pasted into multiple cells.
  • When pasting a Dialog, all cell references will become absolute cell references. For more information, see Cell References - Relative/Absolute
  • When pasting a Dialog from one job into another job, the Dialog control is copied, but the contents of the Dialog are not copied.
  • Charts are not supported in Dialogs. For more information, see Chart.
  • If a button (e.g. OK, Next, Cancel) within a Dialog has the same location as the cell where the Dialog was launched, releasing the mouse click activates the button within the Dialog. An alternative is to either increase or decrease the height of the Dialog by one cell or to launch the Dialog by highlighting the cell and pressing the ENTER key.

  • When a Dialog function's Dialog Title parameter references a cell that contains an editable string value (e.g. EditString, ListBox or Concatenate) within the Dialog (using a GetString function, if necessary), and the cell's value is changed, the cell is updated immediately to show the new value. However, the Dialog Title still shows the old value. The Dialog Title will be updated when the Dialog is re-opened. In addition, if the Dialog is referenced by a Wizard function whose Mode is set to 1 (Sequential), the Wizard Menu still shows the old value after changing the cell's string value. The Wizard Menu will be updated when the Wizard is re-opened.

Dialog Inputs

Syntax: Dialog (Label,Dialog Title,High,Wide)

Parameter | Description
Label | The name that will appear in the spreadsheet.
Dialog Title | The name that will appear in the dialog's title bar (up to 39 characters).
High | Specifies the height of the dialog, in number of cells (1 to 20; default = 5).
Wide | Specifies the width of the dialog, in number of cells (3 to 10; default = 5).

Dialog Outputs

Returns | A value of 1 when the dialog is on display; otherwise returns 0.
Results | A labeled Dialog [image] control.

Dialog Example

A spreadsheet is configured as follows:

A4 = Dialog("Test","Test Dialog",5,5)

Clicking on the Dialog [image] control in cell A4 displays the following dialog:

You may now insert text labels, numeric values, and formulas into the dialog as you would into the spreadsheet.

Dialog Menu Bar Options

File Menu Options | Related Topic
Import Cells | Import/Export Cells Dialog
Export Cells | Import/Export Cells Dialog
Page Setup | Page Setup Dialog
Print Preview | Print Preview
Print | Print Dialog
Edit Menu Options |
Undo | Edit Menu: Spreadsheet View
Redo | Edit Menu: Spreadsheet View
Cut | Edit Menu: Spreadsheet View
Copy | Edit Menu: Spreadsheet View
Paste | Edit Menu: Spreadsheet View
Clear | Edit Menu: Spreadsheet View
Find | Edit Menu: Spreadsheet View
Go To... | Edit Menu: Spreadsheet View
Cell Graphics | Edit Menu: Spreadsheet View
Maximize Region | Edit Menu: Spreadsheet View
Cell State | Cell State Dialog
View Menu |
Toolbars (Standard Toolbar, Formatting Toolbar, Job Edit Toolbar, Formula Bar) | Toolbars: Spreadsheet View and Spreadsheet Cell Execution and Editing Reference
Grid Lines |
Insert Menu |
Function | Insert Function Dialog
Absolute Reference | Cell References - Relative/Absolute
Relative Reference | Cell References - Relative/Absolute
Comment | Comment Dialog
Symbolic Tag | Symbolic Tag Editor
Format Menu |
Cells | Format Cells Dialog
Rows (Row Height, Auto Fit) | Row Height Dialog and Format Menu
Columns (Column Width, Auto Fit) | Column Width Dialog and Format Menu

Dialog Toolbar Buttons

Button | Function
 | Print
 | Print Preview
 | Cut
 | Copy
 | Paste
 | Undo
 | Redo
 | Find
 | Bold
 | Italicize
 | Align text to the left
 | Align text to the center.
 | Align text to the right.
 | Increase the number of decimal places.
 | Decrease the number of decimal places.
 | Background color. For more information, see Format Cells Dialog.
 | Foreground color. For more information, see Format Cells Dialog.
 | Absolute cell reference. For more information, see Cell References - Relative/Absolute.
 | Relative cell reference. For more information, see Cell References - Relative/Absolute.
 | Insert Function dialog. For more information, see Insert Function Dialog.
 | Cell Graphics
 | Maximize Region
 | Cell state. For more information, see Cell State Dialog.
 | Comment. For more information, see Comment Dialog.
 | Symbolic Tag. For more information, see Symbolic Tag Editor.
 | Accept the current modification
 | Cancel the current modification and restore previous values (if any)
 | Formula Bar. For more information, see Spreadsheet Cell Execution and Editing Reference.


EditAnnulus

Inserts an interactive annulus control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the position and size of the annulus can be adjusted. For more information, see Interactive Graphics Mode.

Note:
  • To access the property sheet for EditAnnulus, right-click the EditAnnulus control and select Edit Function.
  • If the External Region parameter (e.g. ExtractBlobs function) references an EditAnnulus function whose Internal Radius parameter is set to zero, #ERR may be returned. In this circumstance, use an EditCircle function instead of the EditAnnulus function. For more information, see EditCircle.

EditAnnulus Inputs

Syntax: EditAnnulus(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Move,Size,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input annulus is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Move

Disables or enables the ability to adjust the input annulus position.

0 = OFF | Annulus cannot be moved.
1 = ON (default) | Annulus can be moved.

Size

Disables or enables the ability to adjust the input annulus radii.

0 = OFF | Annulus cannot be resized.
1 = ON (default) | Annulus can be resized.
Note: Both the inner radius and the outer radius of the annulus can be adjusted.

Name

Specifies a text label for the EditAnnulus control element in the spreadsheet.

Show

Specifies the display mode for the EditAnnulus graphics overlay on the image.

0 = hide all | The annulus will be hidden, except when the cell containing the EditAnnulus function is highlighted in the spreadsheet.
2 = input graphics only | The annulus will be displayed at all times.

EditAnnulus Outputs

Results

A result table will automatically be created in the cells adjacent to the right of the EditAnnulus [image] control.

EditAnnulus Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Annulus) | The row offset of the center of the annulus, in image coordinates.
Col | GetCol(Annulus) | The column offset of the center of the annulus, in image coordinates.
Inner Radius | GetRadius(Annulus, 0) | The inner radius of the annulus.
Outer Radius | GetRadius(Annulus, 1) | The outer radius of the annulus.


EditCircle

Inserts an interactive circle control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the position and size of the circle can be adjusted. For more information, see Interactive Graphics Mode.

Note: To access the property sheet for EditCircle, right-click the EditCircle control and select Edit Function.

EditCircle Inputs

Syntax: EditCircle(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Move,Size,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input circle is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Move

Disables or enables the ability to adjust the input circle position.

0 = OFF | Circle cannot be moved.
1 = ON (default) | Circle can be moved.

Size

Disables or enables the ability to adjust the input circle radius.

0 = OFF | Circle cannot be resized..
1 = ON (default) | Circle can be resized.

Name

Specifies a text label for the EditCircle control element in the spreadsheet.

Show

Specifies the display mode for the EditCircle graphics overlay on the image.

0 = hide all | The circle will be hidden, except when the cell containing the EditCircle function is highlighted in the spreadsheet.
2 = input graphics only | The circle will be displayed at all times.

EditCircle Outputs

Results

A result table will automatically be created in the cells adjacent to the right of the EditCircle [image] control.

EditCircle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Region) | The x-coordinate of the position.
Col | GetCol(Region) | The y-coordinate of the position.
Radius | GetRadius(Region) | The radius of the circle.


EditCompositeRegion

Inserts an interactive composite region control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the composite region can be modified. A composite region can consist of multiple subregions. A subregion can be an Annulus, Circle, Polygon, or Region. Each subregion is an add operation (included in the image analysis) or subtract operation (excluded from the image analysis). The subtract operation is also known as "masking". For more information, see Interactive Graphics Mode, Annulus, Circle, EditPolygon, or Region.

Note:

  • To access the property sheet for EditCompositeRegion, right-click the EditCompositeRegion control and select Edit Function.

  • A maximum of 32 subregions can be added to the composite region.

  • A right-click menu is available when in Interactive Graphics Mode, which allows you to add or remove a subregion, or change a selected subregion's operation (add or subtract):

General Tab

The General tab is used to define the parameters of the EditCompositeRegion function.

EditCompositeRegion Inputs

Syntax: EditCompositeRegion(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Add Subregions,Remove Subregions,Edit Subregions,Move Entire Composite,Rotate,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input composite region is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Add Subregions

If checked, subregions can be added in Interactive Graphics Mode.

Remove Subregions

If checked, subregions can be removed in Interactive Graphics Mode.

Edit Subregions

If checked, subregions can be modified in Interactive Graphics Mode.

Move Entire Composite

If checked, the entire composite region can be moved in Interactive Graphics Mode.
Rotate | If checked, the entire composite region can be rotated in Interactive Graphics Mode.

Name

Specifies a text label for the EditCompositeRegion control element in the spreadsheet.

Show

Specifies the display mode for the EditCompositeRegion graphics overlay on the image.

0 = hide all | The composite region will be hidden, except when the cell containing the EditCompositeRegion function is highlighted in the spreadsheet.
2 = input graphics only | The composite region will be displayed at all times.

Region Tab

The Regions tab allows you to insert, remove and edit subregions. A subregion can be an Annulus, Circle, Polygon or Region that is used to perform an add or subtract operation.

Region Tab Controls

  • Insert: Inserts an Annulus, Circle, Polygon or Region subregion.

  • Remove: Removes the highlighted subregion from the list.

  • Move Up: Moves the highlighted subregion up in the list.

  • Move Down: Moves the highlighted subregion down in the list.

    Note: The composite region is built in sequence, based on the order of the subregions within the list. For more information, see Order of Subregions.
  • Subregion Properties: Displays the properties for the highlighted subregion.

EditCompositeRegion Output

Results

A labeled Button control.

EditCompositeRegion Example

Opening the EditCompositeRegion Property Sheet

  1. Right-click cell A2 and select Insert Function to open the Insert Function dialog.

  2. In the left side of the Insert Function dialog, expand the Graphics list of tool categories.

  3. Select the Controls tool category.

  4. Select the EditCompositeRegion function from the function list and press the OK button or double-click the function name.

  5. The EditCompositeRegion property sheet opens.

General Tab

  1. Optionally, expand the Fixture parameter and specify the Row, Column and Theta values. Setting the composite region relative to a fixture ensures that if the fixture is rotated or translated, the composite region will be rotated or translated in relation to the fixture.

  2. Determine what actions should be allowed while in Interactive Graphics Mode (adding, removing and editing subregions, and moving and rotating the entire composite region) and enable or disable the appropriate checkboxes (Add Subregions, Remove Subregions, Edit Subregions, Move Entire Composite and Rotate).
  3. Optionally, specify a Name for the text label for the EditCompositeRegion control in the spreadsheet.
  4. Determine when overlay graphics should be displayed. To hide the overlay graphics, except when the cell containing the EditCompositeRegion function is highlighted in the spreadsheet, select hide all from the Show drop-down list. To always display the overlay graphics, choose input graphics only.

Regions Tab

  1. By default, a Region is automatically included in the list of subregions. For this example, a Circle subregion will be used; highlight the Region and click the Remove button.

  2. From the Insert drop-down list, select Circle to add a Circle subregion.

  3. Click the Edit Graphics [image] toolbar button to graphically adjust the subregion.

    Note: Alternately, highlight the subregion and manually enter the Circle Properties.

  4. By default, the Circle is using an add operation. Adjust the Circle as necessary to cover the region of interest.

  5. Right-click within the image area and click Add Subregion > Circle to add a second Circle subregion.

  6. By default, the second Circle is using a subtract operation. Adjust the Circle as necessary to mask the portions of the image that should not be included in the inspection.

  7. To accept the modifications, press ENTER. The graphic will appear over the image, but beneath the semitransparent spreadsheet. To cancel the modifications, press ESC. Once the changes are accepted, the new values will automatically be entered into the property sheet.

  8. For this example, the ExtractBlobs function is used to perform a Blob analysis on the unmasked subregion. Insert the ExtractBlobs function into cell A4. For more information, see ExtractBlobs.

  9. Configure the ExtractBlobs parameters. For the External Region parameter, specify cell A2, the cell containing the EditCompositeRegion function. The ExtractBlobs function then only locates Blobs found in the unmasked subregion.


EditFloat

Inserts a floating-point edit control into the spreadsheet. The control behaves like other interactive numeric input controls.

Note: To access the property sheet for an EditFloat control, right-click the control and select Edit Function.

EditFloat Inputs

Syntax: EditFloat(Min,Max)

Parameter | Description
Min | Specifies the minimum value that the edit box control will accept (-9999999 to 9999999; default = 0).
Max | Specifies the maximum value that the edit box control will accept (-9999999 to 9999999; default = 100).

EditFloat Outputs

Returns | The value entered into the control.
Results | An EditFloat [image] control.


EditInt

Inserts an integer edit control into the spreadsheet. The control works like all other In-Sight interactive numeric input controls.

Note: To access the property sheet for an EditInt control, right-click the control and select Edit Function.

EditInt Inputs

Syntax: EditInt(Min,Max)

Parameter | Description
Min | Specifies the minimum value that the edit box control will accept (-9999999 to 9999999; default = 0).
Max | Specifies the maximum value that the edit box control will accept (-9999999 to 9999999; default = 255).

EditInt Outputs

Returns | The value entered into the control.
Results | An EditInt [image] control.


EditLine

Inserts an interactive line control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the position and size of the line can be adjusted. For more information, see Interactive Graphics Mode.

Note: To access the property sheet for EditLine, right-click the EditLine control and select Edit Function.

EditLine Inputs

Syntax: EditLine(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Move Point 0,Move Point 1,Name,Show)

Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, the cell containing the Image data structure returned by AcquireImage.

Fixture

Specifies the image coordinate system in which the input line is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Move Point 0

Disables or enables the ability to adjust the input Point 0 position.

0 = OFF | Point 0 cannot be moved.
1 = ON (default) | Point 0 can be moved.

Move Point 1

Disables or enables the ability to adjust the input Point 1 position.

0 = OFF | Point 1 cannot be moved.
1 = ON (default) | Point 1 can be moved.

Name

Specifies a text label for the EditLine control element in the spreadsheet.

Show

Specifies the display mode for the EditLine graphics overlay on the image.

0 = hide all | The line will be hidden, except when the cell containing the EditLine function is highlighted in the spreadsheet.
2 = input graphics only | The line will be displayed at all times.

EditLine Outputs

Results

A result table will automatically be created in the cells adjacent to the right of the EditLine [image] control.

EditLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row0 | GetRow(Line,0) | The row offset of the first endpoint, in image coordinates.
Col0 | GetCol(Line,0) | The column offset of the first endpoint, in image coordinates.
Row1 | GetRow(Line,1) | The row offset of the second endpoint, in image coordinates.
Col1 | GetCol(Line,1) | The column offset of the second endpoint, in image coordinates.


EditMaskedRegion

Inserts a region control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the composite region can be modified. A masked region within the ROI is used to indicate an area of the image that should not be processed. For more information, see Interactive Graphics Mode.

Note:
  • To access the property sheet for EditMaskedRegion, right-click the EditMaskedRegion control and select Edit Function.
  • A right-click menu is available in the Interactive Graphics Mode, which allows you to add or delete a region.

EditMaskedRegion Inputs

Syntax: EditMaskedRegion(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Add Mask,Remove Masks,Edit Masks,Move,Size,Rotate,Curve,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input composite region is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Add Masks

If checked, additional masks can be added in the Interactive Graphics Mode.

Remove Masks

If checked, masks can be removed in the Interactive Graphics Mode.

Edit Masks

If checked, masks can be modified in the Interactive Graphics Mode.

Move

If checked, the entire composite region can be moved in the Interactive Graphics Mode.
Size | If checked, the region can be re-sized in the Interactive Graphics Mode.
Rotate | If checked, the region can be rotated in the Interactive Graphics Mode.
Bend | If checked, the region can be bent in the Interactive Graphics Mode.

Name

Specifies a text label for the EditMaskedRegion control element in the spreadsheet.

Show

Specifies the display mode for the EditMaskedRegion graphics overlay on the image.

0 = hide all | The region will be hidden, except when the cell containing the EditMaskedRegion function is highlighted in the spreadsheet.
2 = input graphics only | The region will be displayed at all times.

EditMaskedRegion Outputs

Results

An EditRegion [image] control.

EditMaskedRegion Interactive Graphics Mode

Item | Controls | Description
1 | Resizable Endpoint Boundary (x4) | Defines the four corners of the rectangular region. Click on an end-point boundary to resize the ROI from one of its corners.
2 Mask

Defines the area of the image that will not undergo image analysis. The mask can be moved and resized within the ROI. A total of 99 masks may be added to a ROI. When a mask is added, it will be added to beginning of the ROI (if no other masks have been added), or behind the previously added mask.

Note: Masks may not overlap. If they are configured to overlap, a 1 pixel buffer will automatically be inserted to prevent them from overlapping.
3 | Scan Direction Indicator (x2) | Defines which direction the ROI will scan for features.
4 | Edge Detection Indicator | Defines the area within the ROI where edge transitions will be detected; also enables adding new masks to the ROI.
5 | Rotation Handle | Allows the ROI to be rotated 360°.
6 | Bend Handle | Allows the ROI to be bent into an arc or annular shape.

EditMaskedRegion Mouse Actions

By placing the mouse cursor over various parts of the ROI, the mouse cursor will automatically transform, enabling the following actions:

Mouse Icon | Description
 | Allows you to drag the ROI anywhere within the image.
 | Allows you to resize the ROI horizontally or vertically; also used to resize the mask.
 | Allows two separate actions, depending on where the mouse cursor is placed. When the mouse cursor is placed on the Rotation Handle, you can rotate the ROI 360° from its current orientation. When the mouse cursor is placed on the Bend Handle, you can reshape the ROI into an arc or annular shape.
 | Allows you to drag the mask within the ROI.
 | Allows you to add or delete a mask from the ROI. When this icon appears, right-click the mouse to open a menu with two options: Add Mask or Delete Mask.


EditMultiGraphics

Inserts an interactive control into the spreadsheet for manipulating a variable list of Controls (EditAnnulus, EditCircle, EditCompositeRegion, EditLine, EditMaskedRegion, EditPoint, EditPolygon, EditPolylinePath and/or EditRegion) functions. When the control is clicked, the display switches to Interactive Graphics Mode, where the position of all of the referenced Controls functions can be adjusted; each Controls function must be edited individually (all of the other Controls functions' overlay graphics will still be displayed). For more information, see Controls Functions or Interactive Graphics Mode.

Note:
  • After entering Interactive Graphics Mode to adjust the Controls functions' regions of interest, press the OK button in the Job Edit Toolbar, or press the ENTER key to accept the changes. To leave Interactive Graphics Mode without accepting the changes, press the Cancel button in the Job Edit Toolbar.
  • The EditMultiGraphics function does not have a property sheet; it is based on three parameters and a variable list of arguments that reference existing Controls functions.
  • The maximum cell length allowed in a cell is 255 characters. If more than 255 characters are used to specify the variable arguments, an error message will be displayed. When a string is used to specify the variable arguments, use a cell range.
  • The EditMultiGraphics will ignore any functions in its variable list which are either #ERR or conditionally disabled, and will only display the Controls functions that can be edited.
  • To display the overlay graphics of the referenced Controls functions, ensure that the Show parameter of the referenced functions is set to display the overlay graphics at all times. Otherwise, the overlay graphics will only be displayed when the EditMultiGraphics function is highlighted or the individual cell containing the overlay graphics is highlighted.

EditMultiGraphics Inputs

Syntax: EditMultiGraphics(Image,Name,Show Labels,Edit Control 0,Edit Control 1,...)

Parameter | Description
Image

This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Note: The EditMultiGraphics function must share the same Image reference as the Controls functions it is referencing. If one or more of the Controls functions that are being referenced by the EditMultiGraphics function do not share the same Image reference, the function will result in a #ERR state.

Name

Specifies a text label for the EditMultiGraphics control element in the spreadsheet.

Show Labels

Specifies the display mode for the EditMultiGraphics labels on the image.

0 = hide all | The labels will be hidden, except when the cell containing the EditMultiGraphics function is highlighted in the spreadsheet.
1 = input graphics only | The labels will be displayed at all times.
Edit Control 0

Specifies a cell reference to a Controls function. The EditMultiGraphics function supports the following Controls functions: EditAnnulus, EditCircle, EditCompositeRegion, EditLine, EditMaskedRegion, EditPoint, EditPolygon, EditPolylinePath and EditRegion. For more information, see Controls Functions.

Note: The maximum number of Controls functions that can be referenced is determined by which of the following scenarios occurs first: the maximum number of cell references a function may accept (255 references), or the maximum string length of a cell's expression (255 characters).
Edit Control 1 | Specifies a cell reference to a Controls function.

EditMultiGraphics Outputs

Results

An EditMultiGraphics [image] control. The function will return #ERR if the function is referencing a cell that does not contain a supported Controls function or the EditMultiGraphics function's Image reference does not match the Image reference of the referenced Controls functions.


EditPassword

Inserts a text edit control into the spreadsheet. For security, the text string that is entered will always be displayed as asterisks. The EditPassword control works like other interactive text input boxes.

Note:
  • To access the property sheet for an EditPassword control, once the function has been inserted into the spreadsheet, right-click the control and select Edit Function.
  • The text string is case-sensitive.
  • The number of asterisks displayed equals the value specified for the Max String Length parameter.

EditPassword Inputs

Syntax: EditPassword (Max String Length)

Parameter | Description
Max String Length | Specifies the maximum text string length (in characters) that the edit box control will accept (1 to 255; default = 8).

EditPassword Outputs

Returns | The text string entered into the control, displayed as asterisks. Note: Although only asterisks are displayed, any cell referencing the EditPassword function will receive and display the actual string.
Results | An EditPassword control.


EditPoint

Inserts an interactive point control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the position of the point can be adjusted. For more information, see Interactive Graphics Mode.

Note: To access the property sheet for EditPoint, right-click the EditPoint control and select Edit Function.

EditPoint Inputs

Syntax: EditPoint(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Move,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input point is defined.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in fixture coordinates.

Move

Disables or enables the ability to adjust the input point position.

0 = OFF | The input point cannot be moved.
1 = ON (default) | The input point can be moved.

Name

Specifies a text label for the EditPoint control element in the spreadsheet.

Show

Specifies the display mode for the EditPoint graphics overlay on the image.

0 = hide all | The point will be hidden, except when the cell containing the EditPoint function is highlighted in the spreadsheet.
2 = input graphics only | The point will be displayed at all times.

EditPoint Outputs

Results

A result table will automatically be created in the cells adjacent to the right of the EditPoint [image] control.

EditPoint Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Line) | The row offset, in image coordinates.
Col | GetCol(Line) | The column offset, in image coordinates.


EditPolygon

Inserts an interactive polygon control into the spreadsheet. When first inserted into a cell, the function's property sheet will be displayed. Go to the Points tab to enable the [image] Edit Graphics menu option and enter Interactive Graphics Mode. For more information, see Interactive Graphics Mode.

Note: To access the property sheet for the EditPolygon function after it has been configured, right-click the Polygon data structure and select Edit Function. Double-clicking the Polygon data structure switches the display to Interactive Graphics Mode, where the polygon can be graphically modified.

EditPolygon Inputs

Syntax: EditPolygon(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Add Points,Remove Points,Move Points,Move Entire Polygon,Scale,Rotate,Name,Show)

General Tab

Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input polygon is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Add Points

If checked, points can be added to the polygon during graphical editing.

Remove Points

If checked, points can be removed from the polygon during graphical editing.

Note: To remove the point, press and hold the Shift key while clicking on the point you want to delete.

Move Points

If checked, points can be moved within the polygon during graphical editing.

Move Entire Polygon

If checked, the entire polygon can be moved during graphical editing.

Scale

If checked, the polygon can be scaled during graphical editing.

Rotate

If checked, the polygon can be rotated during graphical editing.

Name

Specifies a text label for the EditPolygon control element in the spreadsheet.

Show

Specifies the display mode for the EditPolygon graphics overlay on the image.

0 = hide all | The polygon will be hidden, except when the cell containing the EditPolygon function is highlighted in the spreadsheet.
2 = input graphics only | The polygon will be displayed at all times.

Points Tab

The Points tab of the EditPolygon function is comprised of a table that lists the number of points, and their Row/Column location, which can be manually specified using the Row and Column edit controls to the right of the table. Press the Insert button to add points.

By default, the polygon shape is comprised of three points. The Remove button is enabled if there are more than three points, and is used to remove a point from the polygon.

EditPolygon Outputs

Results

A Polygon data structure.


EditPolylinePath

Inserts an interactive composite one-dimensional polyline region control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the polyline path can be modified. For more information, see Interactive Graphics Mode.

Note:
  • To access the property sheet for EditPolylinePath, right-click the EditPolylinePath control and select Edit Function.
  • A right-click menu is available during graphical editing, which allows you to add a path segment or delete a path segment.
  • The InspectEdgeForDefect function can not be used in conjunction with an InspectEdge function that utilizes an EditPolylinePath function as an external region.
  • The Maximize Region button is disabled for EditPolylinePath.

EditPolylinePath Inputs

Syntax: EditPolylinePath(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Add Segment,Remove Segments,Edit Segments,Move,Size,Rotate,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input composite region is defined.

Row | The row offset in image coordinates.
Column | The column offset in image coordinates.
Theta | The orientation in image coordinates.

Add Points

If checked, a point can be added to the polyline while in the Interactive Graphics Mode.

Remove Points

If checked, points can be removed while in the Interactive Graphics Mode.
Move Points | If checked, points can be moved while in the Interactive Graphics Mode.

Move Entire Polyline

If checked, the entire polyline path can be moved while in the Interactive Graphics Mode.

Scale

If checked, the entire polyline path can be scaled while in the Interactive Graphics Mode.
Rotate | If checked, the entire polyline path can be rotated in the Interactive Graphics Mode.

Name

Specifies a text label for the EditPolylinePath control element in the spreadsheet.

Show

Specifies the display mode for the EditPolylinePath graphics overlay on the image.

0 = hide all | The composite region will be hidden, except when the cell containing the EditPolylinePath function is highlighted in the spreadsheet.
2 = input graphics only | The composite polyline path will be displayed at all times.

EditPolylinePath Outputs

Results

An EditRegion [image] control.

EditPolylinePath Interactive Graphics Mode

Item | Controls | Description
1 | End Points | Defines the first and last points of the polyline. The triangle shape indicates the polyline path direction.
2 | Scan Direction Indicator | Defines which direction the polyline will scan for features.
3 | Polyline Path | Graphically displays the plot of the polyline.
4 | Rotation Handle | Allows the ROI to be rotated 360°.
5 | Polyline Path Vertices | Defines the path of the polyline segment(s). Click on a vertices to position the polyline.

EditPolylinePath Mouse Actions

By placing the mouse cursor over various parts of the ROI, the mouse cursor will automatically transform, enabling the following actions:

Mouse Icon | Description
 | Allows you to drag the entire ROI anywhere within the image.
 | Allows you to scale either the entire ROI horizontally or vertically, or the ROI surrounding the polyline horizontally or vertically.
 | Allows you to rotate the entire ROI 360° from its current orientation.
 | Allows you to move the polyline within the ROI.
 | Allows you to add a point to the polyline path. Up to 99 points may be added to a polyline. If 99 points have been added to a polyline, this option is disabled.

EditPolylinePath Right-click Context Menu

Right-click Location Context Menu
Over a Point
  • Delete Point
  • Delete Points Before
  • Delete Points After
Over an Edge
  • Insert Point


EditRegion

Inserts an interactive graphical region control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode where the size, position, rotation, and curvature of the region can be adjusted. For more information, see Interactive Graphics Mode.

Note: To access the property sheet for an EditRegion control, right-click the control and select Edit Function.

EditRegion Inputs

Syntax: EditRegion(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Move,Size,Rotate,Bend,Name,Show)

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input region is defined.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Move

Disables or enables the ability to adjust the input region position.

0 = OFF | The region cannot be moved.
1 = ON (default) | The region can be moved.

Size

Disables or enables the ability to adjust the input region height and width.

0 = OFF | The height and width cannot be adjusted.
1 = ON (default) | The height and width can be adjusted.

Rotate

Disables or enables the ability to adjust the input region orientation.

0 = OFF | The region cannot be rotated.
1 = ON (default) | The region can be rotated.

Bend

Disables or enables adjustment capability of the input region curvature.

0 = OFF | The curvature cannot be modified.
1 = ON (default) | The curvature can be modified.

Name

Specifies a text label for the EditRegion control element in the spreadsheet.

Show

Specifies the display mode for the EditRegion graphical overlay on top of the image.

0 = hide all (default) | The region will be hidden, except when the cell containing the EditRegion function is highlighted in the spreadsheet.
2 = input graphics only | The region will be displayed at all times.

EditRegion Outputs

Results

An EditRegion [image] control, along with a corresponding results table that will be created in the adjacent cells to the right.

EditRegion Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Region) | The x-coordinate of the position.
Col | GetCol(Region) | The y-coordinate of the position.
High | GetHigh(Region) | The height of the region.
Wide | GetWide(Region) | The width of the region.
Angle | GetAngle(Region) | The orientation of the region.
Curve | GetCurve(Region) | The curvature of the region.


EditString

Inserts a text edit control into the spreadsheet. The EditString control works like other interactive text input boxes.

Note: To access the property sheet for an EditString control, right-click the control and select Edit Function.

EditString Inputs

Syntax: EditString(Max String Length)

Parameter | Description
Max String Length | Specifies the maximum text string length (in characters) that the edit box control will accept (1 to 255; default = 8).

EditString Outputs

Returns | The text string entered into the control.
Results | An EditString control.


Link

Inserts a labeled Link control into the spreadsheet. Link controls are conceptually similar to hypertext links in an HTML browser, providing a fast method for "jumping" between different spreadsheet cells on networked In-Sight devices. Links can be executed either manually by user input or automatically when referenced by a Select function. For more information, see Select.

Note:
  • To access the property sheet for a Link control, right-click the control and select Edit Function.
  • When using the Link function to log on to another system, the total execution time to process the Job on the target system could increase. When this execution time nears or exceeds the time between acquisition triggers, some triggers could be missed.

Link Inputs

Syntax: Link(Label,Host Name,Dialog Label/Cell,Cursor Position)

Parameter Description

Label

The name of the Link control as it will appear in the spreadsheet.

Host Name

The network Host Name of the In-Sight sensor to which you would like to link. Leave this parameter blank when linking between locations within the same spreadsheet. For more information, see Network Settings Dialog.

Note:
  • When linking across the network, the User Name and Password of the active user must identically match an existing User Name and Password in the User List on the In-Sight sensor that is the link destination. For more information, see User Access Settings Dialog.
  • If an invalid host name is specified, the connection may take up to 30 seconds to timeout.

Dialog Label / Cell

The Label of an existing Dialog or Wizard control that the Link will open, or a reference to the spreadsheet cell to show in the upper-left corner of the spreadsheet at the link destination. If a Label is specified for a Wizard control, the first dialog in the Wizard will automatically open when the Link control is executed. For more information, see Dialog and Wizard.

Cursor Position

A reference to the cell that will be highlighted at the link destination.

  • Cursor Position is ignored if the Dialog Label parameter refers to a Wizard control.
  • If the Dialog Label is valid, but the cell reference specified for the Cursor Position is not contained within that dialog, then executing the Link control still opens the dialog.
  • If the Dialog Label is left unspecified or is invalid, then executing the Link control will jump to the Cursor Position (if defined) in the current spreadsheet.
  • If neither the Dialog Label nor the Cursor Position are valid, then executing the Link control will jump to cell A0 in the current spreadsheet.

Link Outputs

Returns

A labeled Link [image] control that "jumps" to the specified link location when executed.
Note: If the Link jumps to a valid Dialog or Wizard at the destination, closing or exiting that Dialog/Wizard will return you to the point of origin.

Link Example: Linking to a Cell in the Spreadsheet

  1. Assume cell M2 is populated as follows:

    M2 = Link("Jump","","","A5")

    A Link control labeled "Jump" is displayed in cell M2:

  2. Click the Link control to execute the function. The highlighted cursor jumps to cell A5. If cell A5 is not visible within the current view of the spreadsheet, the spreadsheet automatically repositions itself as necessary so that cell A5 is visible.

Example: Linking to a Cell in the Spreadsheet

  1. Assume cell A2 is populated as follows:

    A2 = Link("Jump","","J5","L9")

    A Link control labeled "Jump" is displayed in cell A2:

  2. Click the Link control to execute the function. The highlighted cursor jumps to cell L9, and the upper-left cell is J5.

Example: Linking to a Dialog in the Current Spreadsheet

  1. Assume cell A2 is populated as follows:

    A2 = Link("Jump","","Step 1","")

    A Link control labeled "Jump" is displayed in cell A2:

  2. Click the Link control to execute the function. The Dialog labeled "Step 1" in the current spreadsheet opens. If the dialog does not exist, then executing the Link control has no effect.

Example: Linking to a Dialog Across the Network

  1. Assume cell A2 is populated as follows:

    A2 = Link("Jump","is8402_010203","Step 1","")

    A Link control labeled "Jump" is displayed in cell A2:

  2. Click the Link control to execute the function. Executing the Link control initiates an automatic logon to the remote In-Sight host named "is8400_010203" (if allowed by the permissions defined in the User List dialog), where the Dialog labeled "Step 1" is opened. For more information, see User Access Settings Dialog.

  3. Dismiss the dialog on the remote system, either by pressing the OK or Cancel buttons, to be restored back to the system from which the Link control was initiated.
Note: If the Link refers to a Wizard on the remote system instead of a Dialog, the connection will be restored to the initiating system only when the Finish or Cancel button is pressed.


ListBox

Inserts a drop-down list control in the spreadsheet.

Note: Since the ListBox function can accept a variable number of strings, this function is not configured through a property sheet. This function can be configured directly in the cell or in the Formula Bar on the Job Edit toolbar.

ListBox Inputs

Syntax: ListBox("String0","String1","String2",...)

Parameter | Description
String0, 1, 2, ... | A variable-length list of individual text strings, each of which returns a different value when selected by a user from the drop-down list.

ListBox Outputs

Returns | A value representing the index number (zero-based) of the selected item.
Results | A ListBox [image] control. Note: The text string that is currently selected from the list can also be accessed using the GetString Vision Data Access function. For more information, see GetString(ListBox)

ListBox Example

A spreadsheet is configured as follows:

A3=ListBox("Item1","Item2","Item3")

A4=A3

The function in cell A3 creates the list control, with "Item1" as the default selection. The index value of Item1 is 0, so the value in cell A4 will be 0.000.

If the user selects "Item2", then the value in cell A4 will be 1.000. If "Item3" is selected, the value in cell A4 will be 2.000.

ListBox Vision Data Access Functions

Additional data elements can be accessed using the following Vision Data Access functions:

GetString

GetString(ListBox)

Returns the text string.


MessageBox

Displays a "pop-up" message box containing a user-defined text string.

Note: To access the property sheet for a MessageBox control, right-click the control and select Function.

MessageBox Inputs

Syntax: MessageBox(Title,Text,Status,Timeout,Button Labels)

Parameter Description

Title

The name that will appear in the title bar of the MessageBox.

Text

The text message to display.

Status

A reference to the cell containing the conditional expression or value that displays the MessageBox. While the value in the referenced cell evaluates to 0, the MessageBox will not be displayed. Whenever the value in the referenced cell evaluates to any non-zero value, the MessageBox will appear.

Timeout

The amount of time to wait (-1 to 9999999 ms; default = 5000) before the MessageBox will be dismissed if no user input is received. If Timeout is set to 0 or -1, the MessageBox will appear indefinitely until user input is received.

Button Labels

Specifies the type of user input button(s) to display at the bottom of the MessageBox. When a button is pressed, the MessageBox is no longer displayed, and the function will return a value; the returned value depends on which button is pressed.

0 = Yes, No (default) | Clicking Yes returns a value of 1.000. Clicking No returns 0.000.
1 = OK, Cancel | Clicking OK returns a value of 1.000. Clicking Cancel returns 0.000.
2 = Close | Clicking Close will always return a value of 1.000.

MessageBox Outputs

Returns
  • A value of 0.000 or 1.000 if a button was clicked by the user, or -1.000 if the specified Timeout period was reached.
  • Returns #ERR if any of the input parameters are invalid.

MessageBox Example

A spreadsheet is configured as follows:

A2=MessageBox("Warning!","This is an example of a message box.",B2,5000,1)

B2=CheckBox("Test")

When the CheckBox in cell B2 is selected, the MessageBox defined in cell A2 will automatically appear:

If the user clicks OK, a value of 1.000 will be returned in cell A2. If the user clicks Cancel, a value of 0.000 will be returned in cell A2. If the 5000 millisecond Timeout is reached before any user input is received, a value of -1.000 will be returned to cell A2.


Select

The Select function executes the Graphics Controls function contained in a spreadsheet cell, chosen from a variable list of indexed cell references.

Note: Since the Select function can accept a variable number of references to cells containing dialogs, this function is not configured through a property sheet. This function can be configured directly in the cell or in the formula bar on the Job Edit toolbar. For more information, see Property Sheet.

Select Inputs

Syntax: Select(Title,Index,Auto,Control0,Control1,Control2,...)

Parameter Description

Title

The name of the Select function as it will appear in the spreadsheet next to the Select [image] control.

Index

Specifies the position number (zero-based) of the Control to execute from the variable list of cell references. The first cell reference is Index 0, the second is Index 1, and so on.

Auto

Specifies whether the Select function can execute automatically (depending on a conditional value in another spreadsheet cell) and manually, or just manually.

0 = manual | The Controls function in the indexed cell will execute only when the Select button is pressed.
1 = manual or programmatic | The Controls function in the indexed cell will execute when the Select button is pressed, or automatically when the Index value changes.

Control0, 1, 2, ...

The variable-length list of references to spreadsheet cells that must contain an OCRMaxAutoTune, Dialog, Wizard, Link, Button, or Select function. For more information, see OCRMaxAutoTune, Dialog, Wizard, Link, Button, or Select.

Select Outputs

Results

A labeled Select [image] control that executes a Graphics Control function from the indexed list of cell references.

For more information, see Controls Functions or Graphics Functions.


Wizard

Inserts a Wizard control in the spreadsheet. Wizards reference two or more cells containing Dialog functions to create a collection of dialogs that can be either navigated one step at a time or accessed via pop-up menu. The last dialog in a Wizard operating in sequential mode includes a Finish button that accepts the changes made in the individual dialogs. For more information, see Dialog.

Note:
  • Since the Wizard function can accept a variable number of references to cells containing dialogs, this function is not configured through a property sheet. This function can be configured directly in the cell or in the Formula Bar on the Job Edit toolbar.

  • When a Dialog function's Dialog Title parameter references a cell that contains an editable string value (e.g. EditString, ListBox or Concatenate) within the Dialog (using a GetString function, if necessary), and the cell's value is changed, the cell is updated immediately to show the new value. However, the Dialog Title still shows the old value. The Dialog Title will be updated when the Dialog is re-opened. In addition, if the Dialog is referenced by a Wizard function whose Mode is set to 1 (Sequential), the Wizard Menu still shows the old value after changing the cell's string value. The Wizard Menu will be updated when the Wizard is re-opened.

Wizard Inputs

Syntax: Wizard(Name,Mode,Dialog0,Dialog1,[Dialog2],...)

Parameter Description

Name

The name of the Wizard as it will appear in the spreadsheet.

Mode

Specifies whether the Wizard opens dialogs via pop-up menu or sequentially.

0 = Menu | Dialogs can be opened in any order from the pop-up menu list.
1 = Sequential | Dialogs are opened in the order in which the cells containing the dialogs are referenced in the Wizard function's parameter list.

Dialog0, 1, 2, ...

Specifies the dialogs to include in the Wizard by referencing the spreadsheet cells which contain Dialog functions. The order in which the dialogs will be displayed (in sequential mode) or listed (in pop-up menu mode) is determined by the order that the cells are referenced in the Wizard function's parameter list.

Wizard Outputs

Results

A labeled Wizard [image] control that launches the Wizard when executed, either manually by a button press or automatically by a Select function. For more information, see Select.

Wizard Example

A spreadsheet is configured as follows:

A3=Dialog("Dialog1","Step 1",5,5)

A4=Dialog("Dialog2","Step 2",5,5)

A5=Dialog("Dialog3","Step 3",5,5)

A6=Wizard("Wizard Example",1,A3,A4,A5)

The Wizard function in cell A6 references dialogs in cells A3, A4, and A5, which will be accessed in Sequential Mode (since the Mode argument is 1.) When the Wizard is executed, it initially displays the dialog labeled "Dialog1". You may dismiss the Wizard by clicking Cancel, or click Next to continue on to the next dialog in the Wizard. The last dialog, labeled "Dialog3", is shown here:

Alternatively, the second argument to the Wizard function may be changed to zero (0) so that the Wizard will be accessed in Menu Mode:

A6=Wizard("Wizard Example",0,A3,A4,A5)

Now, when the Wizard is opened it features a Menu that allows you to choose which dialog to open:

After selecting a dialog from the list, it is displayed with a Menu button that allows you to return to the menu from any dialog (Step 2 shown here):


Displays Functions

The following functions insert graphics into the spreadsheet.

  • Chart: Implements a strip chart display element occupying a row of the spreadsheet.
  • ColorLabel: Displays a colored text string with optional colored background.
  • MultiStatus: Implements a simulated LED status array.
  • Status: Implements a simulated multi-colored status LED with text label.
  • StatusLight: Inserts a simulated LED status light with labels; the color of the status light and the labels can both be user-specified.

Chart

ColorLabel

MultiStatus

Status

StatusLight


Chart

Inserts a strip chart display element that occupies a row of the spreadsheet. The size of the chart can be adjusted by adjusting the row height.

Note: Charts are not supported in Dialogs.

Chart Inputs

Syntax: Chart(Event,Value,Number,Name,Range: Min,Range: Max)

Parameter | Description
Event | Specifies the update event to clock the next value into the chart. This argument must be a cell reference to either A0 (the AcquireImage cell) or to a cell containing an Image or Event function.
Value | Specifies the number to be charted. This argument usually contains a reference to a spreadsheet cell containing a number that updates on every cycle. (-9999999 to 9999999; default = 0).
Number | Specifies the number of values to chart (2 to 5000; default = 10).
Name | Specifies the text string label that appears in the chart display.
Range: Min | Specifies the minimum vertical chart coordinate (-9999999 to 9999999; default = 0).
Range: Max | Specifies the maximum vertical chart coordinate (-9999999 to 9999999; default = 0).
Note: If Range: Min and Range: Max are set to 0, the chart will continually scale the vertical coordinate range according to the input values.


ColorLabel

Inserts a color label display element in the spreadsheet. The label fills the cell with the background color and writes text in the foreground color.

ColorLabel Inputs

Syntax: ColorLabel(Name,Fore Color,Back Color)

Parameter | Description
Name | Specifies a text string label to appear in the foreground.
Fore Color | Specifies the foreground color.
Back Color | Specifies the background color.


MultiStatus

Inserts an array of simulated LED status lights into the spreadsheet. The function displays the specified bits from a control value as a single LED with two color states.

MultiStatus Inputs

Syntax: MultiStatus(Value,Start Bit,Number of Bits,Reverse Order,Color 0,Color 1)

Parameter Description

Value

Specifies the control value (0 to 65535; default = 0).

Start Bit

Specifies the first bit of the control value (0 to 15; default = 0).

Number of Bits

Specifies how many bits to display (1 to 16; default = 10). Each bit corresponds to one LED.

Reverse Order

Determines which bit represents the most significant bit (MSB) of the array.

0 = OFF (default) | Left-most bit is the MSB
1 = ON | Right-most bit is the MSB

Color 0

Sets the LED color used to represent a zero bit. (0 to 16; default = Yellow)

Color 1

Sets the LED color used to represent a one bit. (0 to 16; default = Green)

MultiStatus Example

A spreadsheet is configured as follows:

A1 = EditInt(0,255)

A2 = MultiStatus(A1,0,8,0,0,0)

If you increment the EditInt control in cell A1, you can observe how the MultiStatus function displays the binary representation of the cell it references (in this case, A1):


Status

Inserts a simulated LED status light display element into the spreadsheet. The Status cell displays the specified value as a red, yellow, or green LED, with text labels for each color.

Status Inputs

Syntax: Status(Status,Label: Green,Label: Yellow,Label: Red)

Parameter Description

Status

References a cell containing the status Monitor Value. An indicator, known as the Status Color, is displayed, depending on the Monitor Value as follows:

Monitor Value | Status Color
< 0 | Red
= 0 | Yellow
> 0 | Green

Label: Green

Specifies the text that will be displayed when Status is greater than zero.

Label: Yellow

Specifies the text that will be displayed when Status is equal to zero.

Label: Red

Specifies the text that will be displayed when Status is less than zero.

For more information, see Displays Functions and Graphics Functions.


StatusLight

Inserts a simulated LED status light display element into the spreadsheet; the color of the status light and the labels can both be user-specified. The StatusLight cell displays the specified color LED with text labels for each color. For more information, see Basic Colors.

StatusLight Inputs

Syntax: StatusLight(Status,Label: Positive,Label: Zero,Label: Negative,Color: Positive,Color: Zero,Color: Negative)

Parameter | Description
Status | References the cell containing the status monitor value.
Label: Positive | Specifies the text that will be displayed when Status is a positive value.
Label: Zero | Specifies the text that will be displayed when Status is zero.
Label: Negative | Specifies the text that will be displayed when Status is a negative value.
Color: Positive | Specifies the Status LED color that will be displayed when Status is a positive value. (Default = Green)
Color: Zero | Specifies the Status LED color that will be displayed when Status is zero. (Default = Yellow)
Color: Negative | Specifies the Status LED color that will be displayed when Status is a negative value. (Default = Red)

Example

Assume cells A2 and B2 are configured as follows:

A2=EditInt(-1,1)

B2=StatusLight($A$2,"Pass","Warn","Fail",8,9,7)

When cell A2 contains the value 1, cell B2 returns the following:


Image Functions

Image functions plot graphic overlays on top of the image.

  • PlotArc: Plots an arc segment in the image.
  • PlotCircle: Plots a circle in the image.
  • PlotCompositeRegion: Plots a composite region in the image.
  • PlotCross: Plots a cross in the image.
  • PlotData: Plots the graphics stored in a Data structure.
  • PlotLine: Plots a line segment in the image.
  • PlotPoint: Plots a point crosshair in the image.
  • PlotPolygon: Plots a polygon shape in the image.
  • PlotRegion: Plots a region outline in the image.
  • PlotString: Plots a text string in the image.

PlotArc

PlotCircle

PlotCompositeRegion

PlotCross

PlotData

PlotLine

PlotPoint

PlotPolygon

PlotRegion

PlotString


PlotArc

Plots an arc segment on the image, counter-clockwise from the first endpoint to the second.

PlotArc Inputs

Syntax: PlotArc(Arc.Center Row,Arc.Center Column,Arc.Start Row,Arc.Start Column,Arc.End Row,Arc.End Column,Name,Color,Show)

Parameter Description

Arc

Specifies the image coordinates of the Arc to be plotted.

Center Row | The row coordinate of the arc center.
Center Column | The column coordinate of the arc center.
Start Row | The row coordinate of the first endpoint.
Start Column | The column coordinate of the first endpoint.
End Row | The row coordinate of the second endpoint.
End Column | The column coordinate of the second endpoint.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotArc Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotCircle

Plots a circle on the image.

PlotCircle Inputs

Syntax: PlotCircle(Circle.Row,Circle.Column,Circle.Radius,Name,Color,Show)

Parameter Description

Circle

Specifies the image coordinates of the circle to be plotted.

Row | The row coordinate of the circle's center.
Column | The column coordinate of the circle's center.
Radius | The radius of the circle.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotCircle Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotCompositeRegion

Plots a composite region outline on the image.

PlotCompositeRegion Inputs

Syntax: PlotCompositeRegion(Composite Region,Name,Color,Show)

Parameter Description

Composite Region

Specifies a reference to an EditCompositeRegion, EditMaskedRegion or EditPolylinePath function to be plotted. For more information, see EditCompositeRegion, EditMaskedRegion, or EditPolylinePath.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotCompositeRegion Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotCross

Plots a cross on the image.

PlotCross Inputs

Syntax: PlotCross(Cross.Row,Cross.Column,Cross.Angle,Cross.High,Cross.Wide,Name,Color,Show)

Parameter Description

Cross

Specifies the image coordinates of the Cross to be plotted.

Row | The row coordinate of the cross's center.
Column | The column coordinate of the cross's center.
Angle | The cross orientation.
High | The cross height.
Wide | The cross width.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotCross Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotData

Plots all of the graphics stored in a Data data structure.

Note: When used in conjunction with the Repeat or RepeatUntil functions to generate a loop, the PlotData function should be placed outside the loop of spreadsheet cells being iterated. For more information, see Repeat or RepeatUntil.

PlotData Inputs

Syntax: PlotData(Data)

Parameter | Description
Data | Specifies a reference to a Data data structure, returned by a StoreData function. For more information, see StoreData.

PlotData Outputs

Returns

A Plot data structure containing the graphics stored in a Data data structure.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotLine

Plots a line segment in the image.

PlotLine Inputs

Syntax: PlotLine(Line.Row 0,Line.Column 0,Line.Row 1,Line.Column 1,Name,Color,Show,Start Point Adornment,End Point Adornment)

Parameter Description

Line

Specifies the image coordinates of the Line to be plotted.

Row 0 | The row coordinate of the line's first endpoint.
Column 0 | The column coordinate of the line's first endpoint.
Row 1 | The row coordinate of the line's second endpoint.
Column 1 | The column coordinate of the line's second endpoint.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

Start Point Adornment

Specifies the adornment for the starting point of the line.

0 = None (default)

1 = Arrowhead

End Point Adornment

Specifies the adornment for the ending point of the line.

0 = None (default)

1 = Arrowhead

PlotLine Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotPoint

Plots a Point crosshair in the image.

PlotPoint Inputs

Syntax: PlotPoint(Point.Row,Point.Column,Name,Color,Show)

Parameter Description

Point

Specifies the image coordinates of the point to be plotted.

Row | The row coordinate of the point.
Column | The column coordinate of the point.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotPoint Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotPolygon

Plots a polygon region outline on the image.

PlotPolygon Inputs

Syntax: PlotPolygon(Composite Region,Name,Color,Show)

Parameter Description

Composite Region

Specifies a reference to an EditPolygon function to be plotted. For more information, see EditPolygon.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotPolygon Outputs

Returns

A Plot data structure containing the graphic.

Note: The polygon will not be graphically displayed if its length exceeds approximately 4950 points.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotRegion

Plots a region outline on the image.

PlotRegion Inputs

Syntax: PlotRegion(Region.Row,Region.Column,Region.High,Region.Wide,Region.Angle,Region.Curve,Name,Color,Show)

Parameter Description

Region

Specifies the image coordinates of the Region to be plotted.

Row | The row coordinate of the region's origin.
Column | The column coordinate of the region's origin.
High | The region height.
Wide | The region width.
Angle | The region orientation.
Curve | The region curvature.

Name

Specifies a text label to display with the graphic on the image.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotRegion Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


PlotString

Plots a text string on the image.

Tip: After inserting the PlotString function into the spreadsheet, highlight the function's spreadsheet cell and use the Format Cells dialog to format the Font, Font Size and Font Style of the PlotString cell and the plotted text string.

PlotString Inputs

Syntax: PlotString(String,Point.Row,Point.Column,Color,Show)

Parameter Description

String

Specifies the text string to be plotted.

Point

Specifies the image coordinates of the string to be plotted.

Row | The row coordinate of the string.
Column | The column coordinate of the string.

Color

Specifies the color (Default = Green) of the plotted graphic.

Show

Specifies the display mode for the graphic overlay on the image.

0 = OFF | The graphic will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = ON (default) | The graphic will be displayed at all times.

PlotString Outputs

Returns

A Plot data structure containing the graphic.

For more information, see Image Functions, Graphics Functions, or Property Sheet


Mathematics Functions

Mathematics functions are used to construct formulas using standard math operators, logic, statistics, and trigonometry. Mathematics functions are grouped into the following categories:

  • Logic: provide boolean algebra and conditional testing capabilities to the In-Sight spreadsheet.
  • Lookup: search a range of values for a maximum, minimum, or index number; return row, column, and #ERR data; suppress #ERR cells to avoid error propagation through multiple functions.
  • Math: provide various mathematical functions such as absolute value, power, truncation, rounding, and random number generation.
  • Operators: relational operators including =, <>, >, <, >=, <=.
  • Statistics: return maximum, minimum, mean (average), and standard deviation data for a group of values.
  • Trigonometry: provide functions for (and relating to) sine, cosine, tangent, pi, degrees, and radians.

Logic

Lookup

Math

Operators

Statistics

Trigonometry


Logic

Logic functions provide Boolean algebra and conditional testing capabilities to the In-Sight spreadsheet. All bitwise functions perform the corresponding logical operation on each bit position in the binary representation of the arguments and return the resulting binary number in decimal form. For example, bit 0 of Value0 is compared to bit 0 of Value1, bit 1 of Value0 is compared to bit 1 of Value1, etc. Bitwise functions are particularly useful with MultiStatus and Discrete I/O Functions, when combining the results of multiple true/false conditions into a GUI display or discrete output. For more information, see MultiStatus or Discrete I/O Functions.

Operator | Symbol
NOT | !
AND | &&
OR | ||
Equivalent to | ==
Not equal to | <> (or !=)
Note:

  • When certain snippets are inserted into the spreadsheet, the formula that appears in the Job Edit Toolbar may contain characters such as !, &&, ||, ==, <>, >=, <=, and !=.

  • The AND and && operators will function differently if an empty cell or a cell containing a string is present in the list of arguments.

For all Logic functions:

  • FALSE = 0
  • TRUE = any non-zero result

Function

Description

And(Value1, Value2, ...)

Returns 1 if all values are non-zero. (Logical AND [image] the result is TRUE when both values are TRUE.)

Note:

  • If arguments reference an empty cell or a cell containing a string, those values are ignored. If all arguments reference empty cells or cells containing strings, the function returns #ERR.

  • The AND and && operators will function differently if an empty cell or a cell containing a string is present in the list of arguments. The AND function ignores cells that are empty or only contain strings, while the && operator does not ignore them. If cell A5 is an empty cell, the function A5&&2 will return 0. If cell A5 contains a string, such as "a", the function A5&&2 will return #ERR.

Closed Examples

  • And(45, -77) returns 1.
  • And(65534, 0) returns 0.
  • And(-3, -2, -1, 1, 2, 3) returns 1.
  • And(-1, 0, 1) returns 0.

BitAnd(Value1, Value2, ...)

Returns the bitwise AND of values.

Note: Processes only the lower 16 bits.

Closed Examples

  • BitAnd(45, 77) returns 13.
  • 45 = 0000 0000 0010 1101 in binary.
  • 77 = 0000 0000 0100 1101 in binary.
  • Individually comparing each common bit in these two 16-bit binary numbers using the And operation yields 0000 0000 0000 1101, which = 13 in decimal.

BitNot(Value)

Returns the bitwise inverse of Value.

Note: Processes only the lower 16 bits.

Closed Examples

  • BitNot(45) returns 65490.
  • 45 = 0000 0000 0010 1101 in binary.
  • Inverting each 0 to a 1 and each 1 to a 0 yields 1111 1111 1101 0010 in binary, which is 65490 in decimal.

BitOr(Value1, Value2, ...)

Returns the bitwise OR of values.

Note: Processes only the lower 16 bits.

Closed Examples

  • BitOr(45, 77) returns 109.
  • 45 = 0000 0000 0010 1101 in binary.
  • 77 = 0000 0000 0100 1101 in binary.
  • Individually comparing each common bit in these two 16-bit binary numbers using the Or operation yields 0000 0000 0110 1101, which = 109 in decimal.

BitXor(Value1, Value2, ...)

Returns the bitwise XOR (exclusive OR) of Values. (Logical XOR [image] the result is TRUE if one – and only one – of the bits is TRUE. The result is FALSE if 2 or more bits are equal.)

Note: Processes only the lower 16 bits.

Closed Examples

  • BitXor(45, 77) returns 96.
  • 45 = 0000 0000 0010 1101 in binary
  • 77 = 0000 0000 0100 1101 in binary.
  • 0110 0000 are the only non-common bits between 45 and 77, as demonstrated below.
45 | 77 | XOR per bit | XOR bit
0 | 0 | two 0s ≥ XOR [image] FALSE | 0 (FALSE)
0 | 1 | only one 1 ≥ XOR [image] TRUE | 1 (TRUE)
1 | 0 | only one 1 ≥ XOR [image] TRUE | 1 (TRUE)
0 | 0 | two 0s ≥ XOR [image] FALSE | 0 (FALSE)
1 | 1 | two 1s ≥ XOR [image] FALSE | 0 (FALSE)
1 | 1 | two 1s ≥ XOR [image] FALSE | 0 (FALSE)
0 | 0 | two 0s ≥ XOR [image] FALSE | 0 (FALSE)
1 | 1 | two 0s≥ XOR [image] FALSE | 0 (FALSE)

0110 0000 = 96 in decimal.

If(Cond, Value1, Value2)

Returns Value1 if Cond is non-zero; otherwise, returns Value2.

Note: If the condition or the arguments reference empty cells, they are interpreted as a zero (FALSE).

InRange(Value, Start, End)

Returns TRUE if Min(Start,End) ≤ Value ≤ Max(Start,End).

Not(Value)

Returns 0 if Value is non-zero, or 1 if Value is 0. (Logical Inverse)

Closed Examples

  • Not(-12345) returns 0.
  • Not(3.14) returns 0.
  • Not(2-1) returns 0.
  • Not(1-1) returns 1.

Or(Value1, Value2, ...)

Returns 0 if all values are zero; otherwise, returns 1. (Logical OR [image] the result is TRUE if any of the Values are TRUE.)

Closed Examples

  • Or(45, -77) returns 1.
  • Or(-1, 0, 1) returns 1.
  • Or(0, 1-1) returns 0.


Lookup

Function

Description

Choose(Index, Value0, [Value1, ...])

Returns the value of the indexed argument from a variable-length list.

Column(Cell)

Returns the column number of a spreadsheet Cell.

Note: Column A = 0.0 and Column Z = 25.0

CountError(Cell1, [Cell2, ...])

Returns the number of errors in one or more cells or cell ranges.

ErrFree(Cell or Cell Range)

Converts #ERR to empty cells to suppress error propagation.

If(Cond, Value1, Value2)

Returns Value1 if Test is nonzero; returns Value2 if Test is zero.

MaxI(Value0, [Value1, ...])

Returns the index of the maximum Value from a variable-length list of values.

MinI(Value0, [Value1, ...])

Returns the index of the minimum Value from a variable-length list of values.

NthMaxI(N, Value0, [Value1, ...])

Returns the index of the Nth-largest Value from a variable-length list of values.

NthMinI(N, Value0, [Value1, ...])

Returns the index of the Nth-smallest Value from a variable-length list of values.

Row(Cell)

Returns the row number a spreadsheet Cell.

Switch(FindCase, Default, Case0, Value0, [Case1, Value1, ...])

Returns the value corresponding to the first Case that matches the FindCase. If the indexed case is FALSE, then the specified Default value will be returned. If more than one Case in the formula matches the FindCase, then the value corresponding to the first matching Case will be returned.

Closed Switch Example

A4 = Switch(A2,-1,2,"C",3,"B",A3,"A")

  • If cell A2=2, the value returned in cell A4 would be C.
  • If cell A2=3, the value returned in cell A4 would be B.
  • If cell A2=5, the value returned to cell A4 would be the default, -1, because there is no Case in the formula that matches the FindCase.
Note: For function arguments that require a text string, you cannot supply the string directly through If, Switch, or Choose. For example, Len(If(...)) is invalid. To resolve this issue, place If, Switch, or Choose in a separate cell and create a reference to that cell.


Math

Function | Description
Abs(Value) | Returns the absolute value of Value.
Exp(Value) | Returns e raised to the power of Value.
Mod(Value1, Value2) | Returns the remainder of Value1 divided by Value2.
Power(Base, Exp) | Returns Base raised to the power of Exp.
Rand(Event) | Returns a random Number (0.0 to 1.0) on an input Event. Each event triggers a new random number. Note: Rand must be the only item in the cell.
Round(Value) | Returns Value rounded to the nearest integer.
RoundDown(Value) | Returns Value truncated down to the next-smaller integer.
RoundUp(Value) | Returns Value rounded up to the next-larger integer.
Sqrt(Value) | Returns the square root of Value.
Sum(Value1, [Value2, ...]) | Returns the sum of a variable-length list of Values.
Trunc(Value) | Returns Value truncated toward zero to an integer. The result is Value without any fraction.

For more information, see Insert Function Dialog or Mathematics Functions.


Operators

Note: When certain snippets are inserted into the spreadsheet, the formula that appears in the Job Edit Toolbar may contain characters such as !, &&, ||, ==, <>, >=, <=, and !=. These characters are alternative code for the following logical and comparison operators:
Operator | Symbol
NOT | !
AND | &&
OR | ||
Equivalent to | ==
Not equal to | <> (or !=)
Operator | Description
= | Equality
<> | Inequality
> | Greater than
< | Less than
>= | Greater than or equal to
<= | Less than or equal to

For more information, see Mathematics Functions or Insert Function Dialog.


Statistics

Function | Description
ComputeStats | Computes statistics for a referenced value. For more information, see ComputeStats.
Max(Value0, [Value1, ...]) | Returns the maximum Value from a variable-length list of Values.
Mean(Value0, [Value1, ...]) | Returns the average of a variable-length list of Values.
Min(Value0, [Value1, ...]) | Returns the minimum Value from a variable-length list of Values.
NthMax(N, Value0, [Value1, ...]) | Returns Nth-largest value from a variable-length list of Values.
NthMin(N, Value0, [Value1, ...]) | Returns Nth-smallest value from a variable-length list of Values.
SDev(Value0, Value1, [Value2, ...]) | Returns the biased standard deviation (where the denominator is N-1) of a variable-length list of Values.
SDevUnbiased(Value0, Value1, [Value2, ...]) | Returns the unbiased standard deviation (where the denominator is N) of a variable-length list of Values.


ComputeStats

Calculates statistics for a referenced value.

ComputeStatsInputs

Syntax: ComputeStats(Event,Value,CountWhen Offline,ResetEvents.Manual,ResetEvents.Online,Reset Events.Job Load)

Parameter Description

Event

Specifies the event on which to incrementthe counter.This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Value

Specifies a required reference to the cell containing the source ofthe data to be computed.If no cell is referenced, the function returnsa #ERR for all results.

Count When Offline

Specifies whether statistics will be calculatedwhile the sensor is Offline.For more information, see Online/Offline.

0 = OFF | Do not calculate statistics whenthe sensor is Offline.
1 = ON (default) | Calculate statistics when the sensoris Offline.

Reset Events

Forces the computations to reset dependingon specific events.

Manual

Specifies whether the computations will bereset when the specified Event occurs.This parameter automatically references the Reset button, which is insertedinto the spreadsheet when the function is initially created.

Note: If this checkboxis manually toggled in the PropertySheet, the reference to the Reset button will be removed.To use theReset button, this parameter must reference the cell containing the Resetbutton.
0 = OFF (default) | Do not reset computations when thespecified Event occurs.
1 = ON | Reset computations when the specifiedEvent occurs.

Online

Specifies whether the computations will bereset when the sensor is put Online.

0 = OFF | Do not reset computations when thesensor is put Online.
1 = ON (default) | Reset computations when the sensoris put Online.

Job Load

Specifies whether the computations will bereset when a job is loaded.

0 = OFF | Do not reset computations when ajob is loaded.
1 = ON (default) | Reset computations when a job isloaded.

ComputeStatsOutputs

Returns | A Stats data structure containingthe computed statistics or #ERR if any of the input parameters are invalid.
Results | When ComputeStatsis initially inserted into a cell, a result table and a Reset button arecreated in the spreadsheet.When the Reset button is pressed, all counterswill be reset to zero.

ComputeStatsVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Stats.

Latest | GetLatest(Stats) | The most recent value.
Minimum | GetMin(Stats) | The smallest value used to compute the statistics.
Maximum | GetMax(Stats) | The largest value used to compute the statistics.
Mean | GetMean(Stats) | The mean (average) of the values.
Sum | GetSum(Stats) | The sum of the values.
Standard Deviation | GetSDev(Stats) | The standard deviation of the values.
Variance | GetVariance(Stats) | The variance in the values.
Range | GetRange(Stats) | The range between the minimum and maximum values.
NumError | GetErrorCount(Stats) | The total number of errors from the referenced value.
NumSamples | GetNumSamples(Stats) | The total number of samples used for calculations.


Trigonometry

Function | Description
ACos(Value) | Returns the arc cosine of Value in degrees. Note: -1 ≤ Value ≤ 1
ASin(Value) | Returns the arc sine of Value in degrees. Note: -1 ≤ Value ≤ 1
ATan(Value) | Returns the arc tangent of Value in degrees, ±90.
ATan2(DY,DX) | Returns the arc tangent of the vector (x,y) = (DY,DX) in degrees, ±180.
Cos(Angle) | Returns the cosine of Angle in degrees.
Degrees(Radians) | Returns an angle in degrees, given a value in radians.
Pi | Returns the value of pi ≈ 3.142.
Radians(Degrees) | Returns an angle in radians, given a value in degrees.
Sin(Angle) | Returns the sine of Angle in degrees.
Tan(Angle) | Returns the tangent of Angle in degrees.

For more information, see Mathematics Functions or Insert Function Dialog.


Text Functions

Text functions format alphanumeric data strings for display in the spreadsheet interface, as well as for communication between In-Sight sensors and remote devices. Text functions are grouped into two categories:

  • Binary: Binary Text functions format binary data packets for use with the TCPDevice function. These functions can be used to send Modbus TCP packets to a Modbus TCP server device.
  • String: String functions format alphanumeric data for display and for communications between the In-Sight vision system and a remote device.
Note: 2-byte characters are not supported by the Text functions.

Binary

String


Binary Text Functions

The Binary Text functions format binary data packets for use with the TCPDevice function. These functions can be used to send Modbus TCP packets to a Modbus TCP server device. When using these functions to send Modbus packets, the TCPDevice's function Packet Type parameter must be set to Modbus.

Parameter

Description
BGetDouble(Binary, Offset, [Byte/Word Order])

Returns a double-precision floating-point value in a Binary structure as a single-precision result.

Binary | Reference to a Binary, Device, or a Query structure, returned from a BStringf, TCPDevice or QueryDevice function (respectively).
Offset | Specifies the Offset, in bytes.
Byte/Word Order | Specifies the byte order for words and bytes read by the function. 0 = Big Endian (default) 1 = Little Endian 2 = Big Endian with 16-bit word swapping 3 = Little Endian with 16-bit word swapping

BGetFloat(Binary, Offset, [Byte/Word Order])

Returns a floating-point value in a Binary structure.

Binary | Reference to a Binary, Device, or a Query structure, returned from a BStringf, TCPDevice or QueryDevice function (respectively).
Offset | Specifies the Offset, in bytes.
Byte/Word Order | Specifies the byte order for words and bytes read by the function. 0 = Big Endian (default) 1 = Little Endian 2 = Big Endian with 16-bit word swapping 3 = Little Endian with 16-bit word swapping

BGetInt(Binary, Offset, Bytes, [Sign], [Byte/Word Order])

Returns an integer value in a Binary structure.

Binary | Reference to a Binary, Device, or a Query structure, returned from a BStringf, TCPDevice or QueryDevice function (respectively).
Offset | Specifies the Offset, in bytes.
Bytes | 1, 2, or 4.
Sign | 0 = signed (default) 1 = unsigned
Byte/Word Order | Specifies the byte order for words and bytes read by the function. 0 = Big Endian (default) 1 = Little Endian 2 = Big Endian with 16-bit word swapping 3 = Little Endian with 16-bit word swapping

BGetString(Binary, Offset, Bytes, [Byte Swap])

Returns a string in a Binary structure.

Binary

Reference to a Binary, Device, or a Query structure, returned from a BStringf, TCPDevice or QueryDevice function (respectively).

Offset

Specifies the Offset, in bytes.

Bytes

Length to be extracted.

Byte Swap

Specifies the byte order written by the function. Due to the Modbus implementation, it may be necessary to swap adjacent bytes of a string when reading or writing to a PLC over Modbus.

Note: The byte swapping used in this function is not related to Big Endian or Little Endian byte swapping. For example, when enabled, if the input string from the Binary parameter was "BADC\0" ("0" is the string terminating NULL value), the result output would be "ABCD\0".

0 = do not swap string bytes (default)

1 = swap string bytes

BLen(Binary)

Returns the length of a Binary structure. Binary must reference either a Device structure or a Query structure, returned from a TCPDevice or QueryDevice function (respectively).

BStringf(Byte/Word Order, Format-String, Value1, [Value2, ...])

Returns a Binary structure that contains a binary string constructed using a specified format.

Byte/Word Order

Specifies the byte order for words and bytes written by the function.

Note: The Byte/Word Order parameter only applies to numeric types, and does not affect the encoding of binary structures or string types.

0 = Big Endian (default)

1 = Little Endian

2 = Big Endian with 16-bit word swapping

3 = Little Endian with 16-bit word swapping

Format-String

Available Format-string parameters:

Parameter | Description
%c | 1 byte
%h | 2 byte
%d | 4 byte
%f | 4 byte float
%e | 8 byte float
%b | Binary structure
%s | String
%~s | String is to be byte-swapped
Note:
  • The format-string parameters are case-sensitive.
  • The format-string must be enclosed in quotes (").

Value

Specifies a variable length list of values to encode as Binary (Value1, Value2, ...); each Value will be converted to the type specified by the Format-String parameter.

Binary Text Functions Example

This example uses two In-Sight systems named SYSTEM0 and SYSTEM1. SYSTEM0 is the Modbus Client, and SYSTEM1 is the Modbus Server.

SYSTEM0 contains the following functions in its spreadsheet:

A2=TCPDevice("SYSTEM1",502,0,4,1000)

B2=QueryDevice($A$0,A2,0,0,0,0,0,6,0,3,20,4,0,1)

A3=BLen(B2)

A4=BGetInt(B2,9,2)

A5=BGetString(B2,10,1)

SYSTEM1 contains the following value:

F4=65

When the spreadsheet on SYSTEM0 executes:

  • The TCPDevice function in cell A2 establishes a TCP/IP Modbus connection with SYSTEM1.
  • The QueryDevice function in cell B2 sends a Modbus Read Multiple Registers command to SYSTEM1, specifying that the data contained in F4 is to be imported by SYSTEM0 (in binary format).

The results returned in the spreadsheet of SYSTEM0 are as follows:

  • A3=11, which is the length of the binary data packet imported from the Modbus Server, SYSTEM1.
  • A4=65, which is the integer value contained in cell F4 on SYSTEM1.
  • A5="A", which is the integer value in F4 interpreted as a string.
Note: In this example, a TCPDevice function is not used on SYSTEM1, the Modbus Server, because In-Sight automatically responds to any Modbus commands that it receives.

The actual data packets sent/received by the SYSTEM0 in the example above are:

Data | Command Packet
00 |
00 |
00 |
00 |
00 |
06 | Length (6 bytes)
00 |
03 | Function (Read Multiple Registers)
20 04 | Ref# (cell-address = F4)
00 01 | Word count (0001)
Data | Response Packet
00 |
00 |
00 |
00 |
00 |
05 | Length (5 bytes)
00 |
03 | Function (Read Multiple Registers)
02 | Byte count (2 bytes)
00 65 | Result value (00 65 in decimal; Modbus uses Big endian)


String Functions

String functions format alphanumeric data for display and for communications between the In-Sight vision system and a remote device.

Note:
  • Index parameters are zero-based. In other words, the first character of a string has an index of 0, the second character has an index of 1, and so on.
  • Text strings that are one character wider than the cell width are sometimes clipped. Increasing the column width or adding a space character to the string will display the entire string.

Function

Description

Code(Text)

Returns the integer value corresponding to the ASCII code for the first character in a string.

Closed Code Example

If cell A2 contains the alphanumeric string, "ABC123", then the function Code(A2) returns 65.000, the ASCII code for "A".

Concatenate(Arg1, [Arg2, Arg3, ...])

Returns the concatenation of multiple alphanumeric text strings. Numeric arguments are automatically converted to text.

Note: The In-Sight 2000-110/120/120C vision sensor is only capable of returning Pass/Fail data as Output data, and the return value is converted to 0 or 1.

Closed Concatenate Example

If cell A2 contains the alphanumeric string "A1B1", cell A3 contains the alphanumeric string "C1D2", and cell A4 contains the floating-point number 4.556, then the function Concatenate(A2,A3,A4) returns "A1B1C1D24.556"
Encrypt(Key, Value, Output Format)

Encrypts result data and returns an encrypted string. For more information, see Encrypt.

Exact(Text1, Text2)

Returns 1 if Text1 and Text2 are identical, else 0.

Note: Exact is case-sensitive.

Closed Exact Examples

  • If cell A2 contains the string, "ABC123", and cell A3 contains the string, "ABC1234", then Exact(A2,A3) returns 0.000.
  • If cell A2 contains the string, "VISION", and cell A3 contains the string, "VISION", then Exact(A2,A3) returns 1.000.

Find(FindText, SrcText, [StartChar])

Returns the indexed position of the string Text1 contained in the string Text2. The search for Text1 starts at the optionally-specified StartChar position within Text2.

Note: Find is case-sensitive.

Closed Find Examples

If cell A2 contains the string "123" and cell A3 contains the string "ABC123", then Find(A2,A3,2) returns the (zero-based) Index value 3.000.

The function Find(A2,A3,4) returns -1.000, because the entire string "123" cannot be found in the string "ABC123" if the search begins at Index 4.

FormatString(Format-string, [Text or Value, ...])

Returns a text string constructed using a "C" library standard Format-string.

Tip: The FormatString function supports most Format-string parameters. Use the FormatString dialog to automatically configure the parameters within In-Sight Explorer. For more information, see Format String Dialog.
Note:
  • Manually editing the FormatString function is not recommended.
  • The In-Sight 2000-110, 2000-120, 2000-120C vision sensors are only capable of returning Pass/Fail data as Output data, and the return value is converted to 0 or 1.

Left(Text, NumChars)

Returns the leftmost number of characters (NumChars) from a Text string.

Closed Left Example

If cell A2 contains the alphanumeric string, "ABC123", then the function Left(A2,2) returns the string "AB".

Len(Text)

Returns the number of characters (bytes) in a Text string.

Closed Len Example

If cell A2 contains the alphanumeric string, "ABC123", then the function Len(A2) returns the integer value 6.000.

Lower(Text)

Returns Text converted to lowercase.

Closed Lower Example

If cell A2 contains the alphanumeric string, "ABC123", then the function Lower(A2) returns the string "abc123".

Mid(Text, StartChar, NumChars)

Returns the Text starting from the indexed StartChar position in the alphanumeric string, for as many characters as specified by NumChars.

Closed Mid Example

If cell A2 contains the alphanumeric string, "ABC123", then the function Mid(A2,2,2) returns the string "C1".

Replace(SrcText, StartChar, NumChars, NewText)

Returns SrcText, modified by NewText at the indexed position StartChar.

Closed Replace Example

If cell A2 contains the alphanumeric string, "ABC123", and cell A3 contains the string "123", then Replace(A2,0,3,A3) returns the string "123123".

Right(Text, NumChars)

Returns the rightmost number of characters (NumChars) from a Text string.

Closed Right Example

If cell A2 contains the string, "ABC123", then Right(A2,2) returns the string "23".

Strcspn(SrcText, CharList)

Returns the index of the first character in SrcText that is also contained in CharList. If no characters in SrcText are present in CharList, the function returns the length of SrcText.

Note: Strcspn is case-sensitive.

Closed Strcspn Example

If cell A2 contains the string "BLUE", and cell A3 contains the characters "RED", then Strcspn(A2,A3) returns an index value of 3.000, because 'E' is the first character in CharList that is contained in the SrcText.

Stringf(Format-string, [Text or Value, ...])

Returns a text string constructed using a "C" library standard Format-string.

Tip: The FormatString function supports most Format-string parameters; use the FormatString dialog to automatically configure the parameters within In-Sight Explorer. For more information, see Format String Dialog.
Note:
  • The In-Sight 2000-110/120/120C vision sensor is only capable of returning Pass/Fail data as Output data, and the return value is converted to 0 or 1.
  • The format-string must be enclosed in quotes (").
  • The format-string parameters are case-sensitive.
  • When using the Stringf function, the backslash "\" is used to indicate a format control character follows. If a backslash is not followed by a control character ("n", "r", or "t") then the backslash is ignored. To display a single backslash, two backslashes must be entered (Example: Stringf("C:\\InSight2\\") = "C:\InSight2\").
  • Non-printable/control code ASCII characters will be displayed as either a symbol or "garbage" text.

Available Format-string parameters are:

%c

Returns the ASCII character corresponding to an integer Value. When supplied with an alphanumeric text string, returns the first character.

Closed Stringf %c Example

If cell A2 contains the integer value 65.000, then Stringf("%c",A2) returns the character "A", which is the character corresponding to ASCII code 65. The function Stringf("Value = %c",A2) returns the string "Value = A".

If cell A2 contains the string "123ABC", then Stringf("%c",A2) returns the character "1".

%d

Returns a string containing an integer Value.

Closed Stringf %d Examples

If cell A2 contains the floating point value 123.456, then Stringf("%d",A2) returns the numeric string "123". The function Stringf("Value = %d",A2) returns the alphanumeric string "Value = 123".

If cell A2 contains the string "ABC123", then Stringf("%d",A2) returns the numeric string "65", the ASCII code for the character "A".

%e

Returns a string containing a Scientific Notation Value. The number of decimal places may be specified by inserting a decimal point (.) and a number between the % and e parameters.

Closed Stringf %e Examples

If cell A2 contains the floating point value 123.456, then Stringf("%e",A2) returns the numeric string "1.234560e+02". The function Stringf("%.1e",A2) returns the numeric string "1.2e+02", because only one number after the decimal point is specified.

%f

Returns a string containing a floating point Value. The number of decimal places may be specified by inserting a decimal point (.) and a number between the % and f parameters.

Closed Stringf %f Examples

If cell A2 contains the floating point value 123.456, then Stringf("%f",A2) returns the numeric string "123.456001". The function Stringf("%.1f",A2) returns the numeric string "123.5", because only one number after the decimal point is specified.

%H

Returns a string containing the specific Host Name of the In-Sight sensor. For more information, see Network Settings Dialog.

Closed Stringf %H Example

If a cell contains the function Stringf("Host Name: %H") on an In-Sight sensor with the host name "is3k010203", the function returns the alphanumeric string "Host Name: is3k010203".

%I

Returns a string containing the specific IP Address of the In-Sight sensor.

Closed Stringf %I Example

If a cell contains the function Stringf("IP Address: %I") on an In-Sight sensor with the IP Address "198.232.26.1", the function returns the alphanumeric string "IP Address: 198.232.26.1".

%M

Returns a string containing the specific Media Access Control (MAC) address of the In-Sight sensor. The MAC address is a hardware address that identifies a specific node of a network. Every In-Sight vision system has a unique MAC address assigned to it, which cannot be changed. For example, 00-d0-24-01-02-03. To locate the MAC address of an In-Sight vision system, look at the serial number label affixed to the vision system. Alternately, you can open the About In-Sight Explorer dialog. For more information, see About In-Sight Explorer Dialog.

Closed Stringf %M Example

If a cell contains the function Stringf("MAC Address: %M") on an In-Sight sensor with the MAC Address "00-d0-24-01-02-03", the function returns the alphanumeric string "MAC Address: 00:d0:24:01:02:03".

%N

Returns a string containing the specific serial number of the In-Sight sensor.

Closed Stringf %N Example

If a cell contains the function Stringf("Serial Number: %N") on an In-Sight sensor with the serial number "Z01020304", the function returns the alphanumeric string "Serial Number: Z01020304".

%o

Returns a string containing the octal value for an integer, or the first character in an alphanumeric string.

Closed Stringf %o Examples

If cell A2 contains the integer value 123.000, then Stringf("%o",A2) returns the numeric string "173", the octal value for the integer 123. If cell A2 contains the string "ABC123" then Stringf("%o",A2) returns the numeric string "101", the octal value for the character "A".

%s

Returns a string with alphanumeric characters appended.

Closed Stringf %s Examples

If cell A2 contains the string "ABC", then Stringf("%s123",A2) returns the alphanumeric string "ABC123". If cell A2 contains the numeric string "123", then Stringf("%s.450",A2) returns the numeric string "123.450".

%T

Returns a string with the specific model type of the In-Sight sensor.

Closed Stringf %T Example

If a cell contains the function Stringf("Model Type: %T") on an In-Sight 5400 sensor, the function returns the alphanumeric string "Model Type: 5400".

%u

Returns a string containing an unsigned integer Value.

Closed Stringf %u Examples

If cell A2 contains the floating point value 123.456, then Stringf("%u",A2) returns the numeric string "123". The function Stringf("Value = %u",A2) returns the alphanumeric string "Value = 123".

If cell A2 contains the string "ABC123", then Stringf("%u",A2) returns the numeric string "65", the ASCII code for the character "A".

%V

Returns a string containing the specific firmware version of the In-Sight sensor.

Closed Stringf %V Example

If a cell contains the function Stringf("Firmware Version: %V") on an In-Sight sensor running firmware version 3.40.01, the function returns the alphanumeric string "Firmware Version: 3.40.01 (475)".

%x or %X

Returns a string containing the hexadecimal value for an integer value, or the first character in an alphanumeric string.

Closed Stringf %x Examples

If cell A2 contains the integer value 123.000, then Stringf("%x",A2) returns the string "7b", the hex value for the integer 123. If cell A2 contains the string "ABC123", then Stringf("%x",A2) returns the numeric string "41", the hex value for the character "A".

The following Format-string parameters are used primarily for text formatting. For example, formatting the text of an email message in the WriteSMTP function:

\x## | Inserts the ASCII character specified by a hexadecimal number ## into the text. Closed Stringf \x## Example If cell A2 contains Stringf("\x02123\x1bABC\x03456"), then the cell will display: ("<STX>123<ESC>ABC<ETX>456").
\n | Inserts a line feed into the text. This parameter is usually used in conjunction with \r (carriage return).
\r | Inserts a carriage return into the text. This parameter is usually used in conjunction with \n (line feed).
\t | Inserts a tab into the text.

Strspn(SrcText, CharList)

Returns the index of the first character in SrcText that is not contained in CharList. If all characters in SrcText are also in CharList, the function returns the length of SrcText.

Note: Strspn is case-sensitive.

Closed Strspn Example

If cell A2 contains the string "RED", and cell A3 contains the characters "GREEN", then Strspn(A2,A3) returns an index value (zero-based) of 2.000, because 'D' is the first character in CharList that is not contained in SrcText.

Strtol(IntegerText)

Converts numeric characters (decimal, hexadecimal and octal) at the beginning of an alphanumeric string into an integer. Hexadecimal characters must begin with "0x"; octal characters must begin with "0".

Closed Strtol Examples

Decimal: If cell A2 contains the text string "123ABC", then the function Strtol(A2) returns the integer value 123.000.

Hexadecimal: If cell A2 contains the text string "0x123", Strtol(A2) returns the integer value 291.000.

"0x12AB" = 4,779.000, since "A" and "B" are hexadecimal characters.

"0x12GB" = 18.000, since "G" is not a hexadecimal character.

Octal: If cell A2 contains the text string "0123ABC", Strtol(A2) returns the integer value 83.000.

Substitute(SrcText, OldText, NewText, [Instance])

Returns a text string constructed by substituting NewText for each occurrence of OldText in SrcText. If an optional Instance index is specified, then only that instance of the text will be replaced.

Closed Substitute Example

If cell A2 contains the text string "ABC123123", cell A3 contains the string "123", and cell A4 contains the string "abc", then Substitute(A2,A3,A4,1) replaces the second instance of "123" in SrcText and returns the string "ABC123abc".

Token(Text, Delimiter, Instance)

Returns the text located at the specified Instance index (occurrence) of a delimited string. The Delimiter must be enclosed in quotes (") in the function.

Closed Token Example

If cell A2 contains the comma delimited string "A,B,C,1,2,3" then Token(A2,",",2) returns "C" because C is at index 2 in the text.

Trim(Text)

Returns Text stripped of leading and trailing spaces, leaving only a single space between words (if any). All control characters (Carriage Return, Line Feed, etc.) are also stripped.

Closed Trim Example

If cell A2 contains the string " ABC 123 ", then Trim(A2) returns the string "ABC 123".

Upper(Text)

Returns Text converted to uppercase.

Closed Upper Example

If cell A2 contains the alphanumeric string, "abc123", then the function Upper(A2) returns the string "ABC123".

Value(NumericText)

Returns the floating point value of NumericText. Subsequent non-numeric characters are ignored.

Closed Value Example

If cell A2 contains the numeric string "123.4", then the function Value(A2) returns the floating point value 123.400.

Note:

An In-Sight cell allows you to enter up to 7-digit numeric value. If the Value function references a numeric text that has more than 8 digits, the value may not be exact due to the limitations of the floating point data type. For example:

A2 = '68456668

A3 = Value(A2)

In this case, the function returns 68456672.000.


Coordinate Transforms Functions

Coordinate Transforms functions convert feature locations and distances between image, fixture, and real world coordinate systems.

  • Calibrate: Solves for a transformation that converts between pixel and two-dimensional real world coordinate systems.
  • Fixture: Solves for a transformation that converts between fixture and pixel coordinate systems.

Calibrate

Fixture


Calibrate Functions

Calibration is the process of converting pixel measurements into meaningful, real-world values. In this process, a two-dimensional (2D) transformation mathematically maps points from an image's pixel coordinates to real-world coordinates. Once an image has been calibrated, other vision tools can then reference the calibration as an input, and report the results in the calibrated (real-world) units.

In-Sight Explorer provides four separate calibration methods; a means to associate a calibration to an image; and eight transform functions to convert between image and world coordinates:

  • Calibrate: Utilizing four, user-specified points, creates a 2D transformation to convert between pixel and real-world coordinate systems. Accounts for linear and non-linear distortion.

  • CalibrateAdvanced: Utilizing one to thirty-two user-specified points, creates a 2D transformation to convert between pixel and real-world coordinate systems. Accounts for linear and non-linear distortion; higher degree of accuracy than Calibrate (for 5 or more points).

  • CalibrateGrid: Utilizing a user-configurable calibration grid pattern, creates a 2D transformation to convert between pixel and real-world coordinate systems. Accounts for linear, non-linear and lens distortion; highest degree of accuracy.

    Note:
    • When using a Calibrate, CalibrateAdvanced or CalibrateGrid function, the physical and optical set-up (the lens, sensor and the physical relationship between the sensor and the scene being acquired) must be the same for both the calibration and run-time operation. If any of these items is altered, the system must be re-calibrated. Therefore, it is recommended that the same sensor and lens be used to both calibrate and process the run-time images. The sensor and lens must also retain their original set-up and calibration settings. For example, changing the acquisition format (by altering the resolution) or moving the sensor will invalidate the computed 2D transformation that maps pixel to real-world coordinates.
    • The In-Sight 5604 line scan vision system only operates in pixel coordinates. While the Calibrate Functions may be added to a job running on an In-Sight 5604, they will produce inaccurate results.
  • CalibrateImage: Associates a Calib structure with an Image structure, which can then be referenced by other vision tools.
  • ExtractCalibration: Creates a 2D transformation, in real-world coordinates, based on the Image structure returned by TransformImage.
  • TransBlobsToWorld: Converts a Blobs structure's pixel coordinates to real-world coordinates.
  • TransEdgesToWorld: Converts an Edges structure's pixel coordinates to real-world coordinates.
  • TransFixtureToWorld: Converts a fixture from pixel coordinates to real-world coordinates.
  • TransformImage: Generates an Image structure that accounts for the distortion present in a CalibrateGrid function.
  • TransInspEdgeDefectToWorld: Converts an InspectEdgeForDefect Inspect data structure's pixel coordinates to real-world coordinates.
  • TransInspEdgeWidthToWorld: Converts an InspectEdgeWidth Inspect data structure's pixel coordinates to real-world coordinates.
  • TransOCRMaxToWorld: Converts an OCRMax data structure's pixel coordinates to real-world coordinates.
  • TransPatternsToWorld: Converts a Patterns structure's pixel coordinates to real-world coordinates.
  • TransPixelToWorld: Converts a point from pixel coordinates to real-world coordinates.
  • TransSurfaceFlawToWorld: Converts a SurfaceFlaw structure's pixel coordinates to real-world coordinates.

  • TransWorldToPixel: Converts real-world coordinates to pixel coordinates.

    Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

Calibrate

CalibrateAdvanced

CalibrateGrid

CalibrateImage

ExtractCalibration

TransBlobsToWorld

TransEdgesToWorld

TransFixtureToWorld

TransformImage

TransInspEdgeDefectToWorld

TransInspEdgeWidthToWorld

TransOCRMaxToWorld

TransPatternsToWorld

TransPixelToWorld

TransSurfaceFlawToWorld

TransWorldToPixel


Calibrate

Utilizing four, user-specified points, Calibrate creates a 2D transformation to convert between pixel and real-world coordinate systems. In this process, Calibrate accounts for linear and non-linear distortion.

The Calibrate function requires user-specified points, expressed in two different coordinate systems: The real-world physical coordinate system of the object being captured, and the pixel coordinates of the object's image. To accomplish this, Calibrate requires the extraction of features from an image using a vision tool. Then, those feature locations are entered as both real-world and pixel coordinates.

During the calibration phase, an image is acquired that contains features with known locations in real-world coordinates. Using a vision tool, such as ExtractBlobs, FindPatterns or FindLine, the features in the image are located and reported in pixel coordinates.

Note: The origin of the pixel coordinates is always the upper-left corner of the upper-left pixel.

Next, both the pixel and real-world coordinates are entered as the Pixel Point and World Point parameters; for the Pixel Point coordinates, a cell reference to a vision tool's Row and Column values is used, while a numeric value is entered to express the World Point real-world coordinates. Then the tool computes the 2D transformation between the pixel and real-world coordinates, producing a Calib structure that represents the transformation.

Calibrate also accounts for the following transformations:

  • Translation in two dimensions.
  • Rotation about three axes.
  • Scale in two dimensions.
  • Perspective distortion.
  • Parallelogramming or skewing.
Note:
  • When using a Calibrate, CalibrateAdvanced or CalibrateGrid function, the physical and optical set-up (the lens, sensor and the physical relationship between the sensor and the scene being acquired) must be the same for both the calibration and run-time operation. If any of these items is altered, the system must be re-calibrated. Therefore, it is recommended that the same sensor and lens be used to both calibrate and process the run-time images. The sensor and lens must also retain their original set-up and calibration settings. For example, changing the acquisition format (by altering the resolution) or moving the sensor will invalidate the computed 2D transformation that maps pixel to real-world coordinates.
  • The In-Sight 5604 line scan vision system only operates in pixel coordinates. While the Calibrate Functions may be added to a job running on an In-Sight 5604, they will produce inaccurate results.

Calibrate Inputs

Syntax: Calibrate(Pixel Point 0.Row,Pixel Point 0.Column,World Point 0.X,World Point 0.Y,Pixel Point 1.Row,Pixel Point 1.Column,World Point 1.X,World Point 1.Y,Pixel Point 2.Row,Pixel Point 2.Column,World Point 2.X,World Point 2.Y,Pixel Point 3.Row,Pixel Point 3.Column,World Point 3.X,World Point 3.Y,Show)

Parameter Description

Pixel Point 0 to 3

Specifies the pixel coordinates of a pixel-to-world association.

Row | The image row coordinate.
Column | The image column coordinate.

World Point 0 to 3

Specifies the real-world coordinates of a pixel-to-world association.

X | The x-axis coordinate, as a world value.
Y | The y-axis coordinate, as a world value.

Show

Specifies the display mode for Calibrate graphics overlay on the image.

0 = hide all (default) | The four calibration points will be hidden, except when the cell containing the Calibrate function is highlighted in the spreadsheet.
2 = input graphics only | The four calibration points will be displayed at all times.

Calibrate Outputs

Returns

A Calib data structure containing the coefficients that define the transformation between the two coordinate systems.


CalibrateAdvanced

Utilizing one to thirty-two user-specified points, CalibrateAdvanced creates a 2D transformation to convert between pixel and real-world coordinate systems. In this process, CalibrateAdvanced accounts for linear and non-linear distortion, and offers a higher degree of accuracy than Calibrate, when five or more point pairs are used.

About CalibrateAdvanced

Just like the Calibrate function, the CalibrateAdvanced function requires user-specified points, expressed in two different coordinate systems: the real-world physical coordinate system of the object being captured and the pixel coordinates of the object's image.

And, like the Calibrate function, CalibrateAdvanced requires the extraction of features from an image using a vision tool. The difference between the two functions, though, is in terms of how many features can be utilized as locations, and how those feature locations are entered as both real-world and pixel coordinates. CalibrateAdvanced allows from one to thirty-two pixel and real-world coordinate pairs, which are called point pairs, versus the four point pairs required by Calibrate.

Using CalibrateAdvanced, during the calibration phase an image is acquired that contains from one to thirty-two different features, with known locations in real-world coordinates. Using a vision tool, such as ExtractBlobs, FindPatterns or FindLine, the features in the image are located and reported in pixel coordinates.

Note: The origin of the pixel coordinates is always the upper-left corner of the upper-left pixel.

Next, both the pixel and real-world coordinates are entered as arguments; for the pixel coordinates, a cell reference to a vision tool's Row and Column values can be used, while a numeric value can be entered to express the real-world coordinates. Then the tool computes the 2D transformation between the real-world and pixel coordinates, producing a Calib structure that represents the transformation.

Note:
  • CalibrateAdvanced does not have a property sheet; it is based on one to thirty-two variable arguments expressed by the number of point pairs. For instance, if a CalibrateAdvanced function was inserted into the spreadsheet, and was utilizing an ExtractBlobs function that reported five different blobs to calibrate the system, the pixel coordinates would be expressed as cell references to the reported Row and Column values of the ExtractBlobs tool. Then, the world coordinates would be set according to the specific real-world value, resulting in the following formula: CalibrateAdvanced($D$11,$D$12,0,0,$E$11,$E$12,2,0,$F$11,$F$12,2,2,$G$11,$G$12,0,2,$H$11,$H$12,1,2).
  • The maximum string length allowed in a cell is 255 characters. If more than 255 characters are used to specify the variable arguments, an error message will be displayed. When a string used to specify the variables arguments exceeds the 255 character limits, use a cell range. The real-world coordinates can also be included in a cell range by entering the X and the Y values directly into the cells. For example, when specifying thirty-two point pairs using a cell range, the following formula could be used: CalibrateAdvanced(C11:F42).

CalibrateAdvanced performs the following transformations:

  • Translation in two dimensions (using 1 or more point pairs).
  • Rotation about three axes (using 4 or more point pairs).
  • Scale in two dimensions (using 2 or more point pairs).
  • Perspective distortion (using 4 or more point pairs).
  • Parallelogramming or skewing (using 4 or more point pairs).
Note:
  • When using a Calibrate, CalibrateAdvanced or CalibrateGrid function, the physical and optical set-up (the lens, sensor and the physical relationship between the sensor and the scene being acquired) must be the same for both the calibration and run-time operation. If any of these items is altered, the system must be re-calibrated. Therefore, it is recommended that the same sensor and lens be used to both calibrate and process the run-time images. The sensor and lens must also retain their original set-up and calibration settings. For example, changing the acquisition format (by altering the resolution) or moving the sensor will invalidate the computed 2D transformation that maps pixel to real-world coordinates.
  • The In-Sight 5604 line scan vision system only operates in pixel coordinates. While the Calibrate Functions may be added to a job running on an In-Sight 5604, they will produce inaccurate results.

CalibrateAdvanced Inputs

Syntax: CalibrateAdvanced(Pixel Point 0.Row,Pixel Point 0.Column,World Point 0.X,World Point 0.Y,...,Pixel Point 31.Row,Pixel Point 31.Column,World Point 31.X,World Point 31.Y)

Parameter Description

Pixel Point 0-31

Specifies the pixel coordinates of a pixel-to-world association.

Row | The image row coordinate.
Column | The image column coordinate.

World Point 0-31

Specifies the real-world coordinates of a pixel-to-world association.

X | The x-axis coordinate, as a world value.
Y | The y-axis coordinate, as a world value.

CalibrateAdvanced Outputs

Returns

A Calib data structure containing the coefficients that define the transformation between the two coordinate systems.


CalibrateGrid

Utilizing a user-configurable calibration grid pattern, CalibrateGrid creates a 2D transformation to convert between pixel and real-world coordinate systems. CalibrateGrid also accounts for linear, non-linear and lens distortion; and offers the highest degree of accuracy of all the Calibrate functions.

About CalibrateGrid

CalibrateGrid computes a 2D transformation between the set of points identified by the dots found in a calibration grid-of-dots pattern, or the vertices of a checkerboard calibration grid pattern. In addition, CalibrateGrid automatically accounts for any optical or perspective distortion present in the lens being used to acquire the image.

Note: To view or utilize vision tools on the undistorted image, use the TransformImage function. For more information, see TransformImage.

To use CalibrateGrid, the function is inserted into a blank cell of the spreadsheet, bringing up the Setup pane of the CalibrateGrid dialog. The CalibrateGrid Setup pane is where the calibration pattern is configured:

  • The type of calibration grid pattern to be used.
  • The calibration grid pattern's spacing.
  • The type of real-world, physical measurement units.
  • The number of poses is set, from 1 to 30.

Optionally, a calibration plate grid can be printed if you don't already have one. Next, an image of the pattern is acquired, using the Pose pane. Once the image has been acquired, CalibrateGrid will automatically identify as many feature points as possible. As soon as the Calibration button is pressed, CalibrateGrid will begin to compute the calibration and report a "Calibration Score" based on the spacing of the feature points, with the results being displayed in the Results pane.

After the calibration has been performed, the calibration data is stored in the CalibrateGrid cell. This allows the CalibrateGrid function to be copied from one job and pasted to another, or exported and imported as an external file using Export Cell/Import Cell. It is possible to have a different calibration for each job, as well as multiple calibrations in a single job, if necessary. Other functions that utilize Calibrate functions as arguments can reference the CalibrateGrid data structure, as well.

Note:
  • When using a Calibrate, CalibrateAdvanced or CalibrateGrid function, the physical and optical set-up (the lens, sensor and the physical relationship between the sensor and the scene being acquired) must be the same for both the calibration and run-time operation. If any of these items is altered, the system must be re-calibrated. Therefore, it is recommended that the same sensor and lens be used to both calibrate and process the run-time images. The sensor and lens must also retain their original set-up and calibration settings. For example, changing the acquisition format (by altering the resolution) or moving the sensor will invalidate the computed 2D transformation that maps pixel to real-world coordinates.
  • The In-Sight 5604 line scan vision system only operates in pixel coordinates. While the Calibrate Functions may be added to a job running on an In-Sight 5604, they will produce inaccurate results.

CalibrateGrid Dialog Panes and Controls

The CalibrateGrid dialog is composed of three panes for calibration: Setup pane, Pose pane, and Results pane.

Setup Pane

Parameter Description

Grid Type:

Specifies the type of calibration pattern that will be used to construct the calibration: Checkerboard, with fiducial; Checkerboard, no fiducial; Dots, with fiducial; or Dots, no fiducial.

Checkerboard, with fiducial

Tile vertices (the point where the corners of four tiles meet) are used to determine the feature location; vertices can be accurately located when the sensor is up to 45 degrees perpendicular to the surface; provides a fiducial marker to determine the grid's origin and identify the grid's orientation in real-world space.

Note: Checkerboard checks must be at least 15 pixels wide.

Checkerboard, no fiducial

Tile vertices (the point where the corners of four tiles meet) are used to determine the feature location; vertices can be accurately located when the sensor is up to 45 degrees perpendicular to the surface; the origin must be set using the Grid Axes.

Note: Checkerboard checks must be at least 15 pixels wide.

Dots, with fiducial

Less susceptible to variations in lighting across the field of view, as well as noise in the image, versus the checkerboard pattern; center of the dot determines the feature location; dots can be located when the sensor is up to 30 degrees perpendicular to the surface; provides a fiducial marker to determine the grid's origin and identify the grid's orientation in real-world space, as well as identifying and setting the grid spacing.

Note:
  • The recommended pixel diameter for the dots in the image should be between 15 to 30 pixels. The minimum and maximum range is 6 to 50 pixels; dots whose pixel diameters are above 50 or below 6 will not be found by the tool.

  • The Dots, with fiducial calibration pattern has a special identifying code in the calibration pattern, depending upon the values in the Grid Spacing and Grid Units fields. When the calibration pattern is captured as an image, the calibration tool will read this pattern and automatically fill in the Grid Spacing and Grid Units fields based upon the code in the calibration pattern. In situations where the actual grid size doesn't match the embedded code, but the same printed Dots, with fiducial calibration pattern needs to be used, select the Dots, no fiducial as the Grid Type and manually enter the values for the Grid Spacing and Grid Units. Then, for each pose, enter the values for the Grid Axes fields (Select Origin, Select X-Axis and Select Y-Axis). To create a Dots, with fiducial calibration pattern that does not automatically insert a coded symbol, simply set the Grid Spacing and Grid Units to any combination other than the 15 pre-configured patterns. The fifteen calibration patterns that have a special identifying code are:

    Grid Units – Inches: Grid Units – Millimeters:

    0.1

    1

    0.125

    2

    0.25

    5

    0.5

    10

    1

    20

    2

    50

    4

    100

    12

Dots, no fiducial

Less susceptible to variations in lighting across the field of view, as well as noise in the image, versus the checkerboard pattern; center of the dot determines the feature location; dots can be located when the sensor is up to 30 degrees perpendicular to the surface; the origin must be set using the Grid Axes.

Note: The dots must be at least 10 pixels in diameter in the acquired image (although 15 is the preferred value).

Grid Spacing:

Specifies either the size of a square in a checkerboard pattern, or the distance from center to center of the dots in a grid-of-dots pattern (.0000001 to 9999999; default = 10.00).

Grid Units:

Specifies the real-world measurement units (Microns, Millimeters (default), Centimeters or Inches) that the calibration will be based upon.

Number of Poses:

Specifies the number of poses that will be required to complete the calibration. Multiple poses are required when a single calibration pattern cannot fill the field of view. In this type of calibration, the calibration pattern is placed in various physical locations to cover the field of view. Each position of the calibration pattern is called a pose. CalibrateGrid can process between 1 and 30 poses. When more than two poses are selected, the Pose Location options will become enabled. These options are used to specify the expected movement of the calibration pattern between poses.

Lens Model:

Specifies the type of distortion correction (Radial or Projection; default = Radial) to use based on the type of lens being used to acquire the image. Radial refers to distortion that affects any optical lens where the magnification is different at the edges of the field of view than at the center of the field of view. Radial distortion is generally more severe with larger fields of view; wide-angle lens tend to exhibit more radial distortion than telephoto lens. Projection refers to distortion introduced when the vision system's optical axis is not perpendicular to the scene being acquired.

Print Grid:

Press to print the selected Grid Type.

Note: The Print Grid functionality should only be used in situations of coarse measurements and experimentation, and not in applications that require a high degree of precision and accuracy (a precisely fabricated calibration pattern is required for those types of applications).

Pose Locations - Automatic (default):

Specifies how the CalibrateGrid function should account for more than one pose (the Number of Poses parameter must be set to a value greater than 2 to enable this option).

The Automatic mode only provides optical calibration (correcting perspective and lens distortions) for the vision system. Since the Automatic mode is used to stitch up multiple views of the calibration grid into the coordinate system of the first pose view, the real-world coordinates of the origin in Pose 1 are the only world coordinate values that must be entered. All additional poses, as long as the fiducial is found, can be calibrated without specifying the origin for each pose.

Pose Locations - User-Specified:

Specifies how the CalibrateGrid function should account for more than one pose (the Number of Poses parameter must be set to a value greater than 2 to enable this option).

The User-Specified mode can be used to perform hand-eye calibration, a calibration type that not only provides data for correcting perspective and lens optical distortions, but also calibrates the camera from the image coordinate space to the motion coordinate space. Since the User-Specified mode is used for multi-view calibration, the motion device pose for each view must be manually entered.

Pose Pane

Parameter Description

Origin Location (World Coordinates):

Specifies the X and Y location of the origin in real-world coordinates; and in the event of a discrepancy between the angular relationship of the grid's axes and the real-world axes, the Angle may be specified, as well.

Note: If Pose Locations is enabled in the Setup pane, and User-Specified mode is selected, the Origin Location (World Coordinates) is actually used to specify the motion pose of the motion device instead of the position and angle of the calibration plate's origin.

Feature Points Found:

 Displays the total number of extracted feature points to be used in the calibration.

Acquire Image:

Specifies how the image will be acquired.

Manual Trigger: | Specifies that an image will be acquired after manually pressing the Manual Trigger button.
Live Mode: | Specifies that the In-Sight vision system will enter live video mode, where the focus of the vision system may be adjusted.
From File: | Specifies that an image will be loaded using the Open Image dialog.

Grid Axes:

 Specifies the grid axes of the calibration pattern when a calibration pattern without a fiducial is selected (Checkerboard, no fiducial or Dots, no fiducial).

Adjust Region:

 Launches interactive graphics mode to define a region of interest for the calibration; only features within the region of interest will be used in the calibration.

Feature Points Table:

Displays the feature points extracted from the image in their pixel row/column coordinates, as well as their calibration pattern location in grid coordinates (X,Y), relative to the origin. The X and Y coordinates are updated anytime the origin value changes. Extracted feature points are graphically displayed by a green-colored "x" at each feature location. Selecting a feature point from the table, or clicking on a feature point in the graphical display, will highlight the feature in both locations and show its coordinates graphically.

Results Pane

Parameter Description

Total Feature Points:

Displays the total number of feature points were extracted and used in the calibration.

Average Error:

Displays the average error, in pixels, during the calibration.

Maximum Error:

Displays the maximum error, in pixels, during the calibration.
Calibration Graphic:

Displays a graphic representation of the calibration.

  • Excellent = Error <= 0.25
  • Good = 0.25 < Error <= 0.5
  • Marginal = 0.5 < Error <= 2.0
  • Poor = 2.0 < Error <= 5.0
  • Very Poor = 5.0 < Error

Feature Points Table:

Displays the feature points extracted from the image in their pixel row/column coordinates, as well as their calibration pattern location in grid coordinates (X,Y), relative to the origin. The X and Y coordinates are updated anytime the origin value changes. Extracted feature points are graphically displayed by a green-colored "x" at each feature location. Selecting a feature point from the table, or clicking on a feature point in the graphical display, will highlight the feature in both locations and show its coordinates graphically.

How To Use CalibrateGrid

Inserting a CalibrateGrid Function

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog.
  2. In the left side of the Insert Function dialog, expand the Coordinate Transforms list of tool categories.
  3. Select the CalibrateGrid function from the Function list and press the OK button.

Configuring the Calibration Pattern Using the Setup Pane

When a CalibrateGrid function is first inserted, the Setup pane will automatically appear.

Note: To return to the Setup dialog from any of the CalibrateGrid dialogs, simply select Setup from the navigational pane in the left side of the dialog.
  1. To begin configuring the calibration pattern, from the Grid Type parameter, select a calibration pattern.
  2. Set the Grid Spacing value; this is used to define either the size of a square in a checkerboard pattern, or the distance from center to center of the dots in a grid-of-dots pattern.
  3. Set the Grid Units, which are the real-world measurement units that the real-world coordinates will be based upon.

  4. Determine the number of poses that will be necessary to complete the calibration and enter that value into the Number of poses parameter. When a single calibration pattern cannot fill the field of view, multiple calibration patterns must be used. In this type of calibration, the calibration pattern is placed in various physical locations to cover the field of view. Each position of the calibration pattern is called a pose. CalibrateGrid can process between 1 and 30 poses. When more than two poses are selected, the Pose Location options will become enabled. These options are used to specify the expected movement of the calibration pattern between poses.

    The default setting is Automatic, which essentially allows for free movement of the calibration pattern. When it is selected, the real-world coordinates of the origin in Pose 1 are the only world coordinate values that need to be entered. All additional poses, as long as the fiducial is found, are calibrated without specifying the origin for each pose.

    Note: The Automatic mode only provides optical calibration (correcting perspective and lens distortions) for the vision system.

    The User-Specified mode is selected when one wants to perform a hand-eye calibration to establish relationship to a motion device's motion coordinate system. The motion device pose for each view must be manually entered. Users do not need to determine the calibration plate's origin position, since the placement offset (in position and orientation) between the calibration plate and the motion device is unknown.

    Note: The User-Specified mode provides both optical calibration and motion device calibration.
  5. Before printing the grid pattern, select the Lens Model (Radial or Projection) to define the type of distortion correction to use based on the type of lens being used to acquire the image. Radial (the default setting) refers to distortion that affects any optical lens where the magnification is different at the edges of the field of view than at the center of the field of view. Radial distortion is generally more severe with larger fields of view; wide-angle lens tend to exhibit more radial distortion than telephoto lens. Projection refers to distortion introduced when the vision system's optical axis is not perpendicular to the scene being acquired.

Printing the Calibration Pattern Using the Print Grid Dialog

Note: The Print Grid functionality should only be used in situations of coarse measurements and experimentation, and not in applications that require a high degree of precision and accuracy (a precisely fabricated calibration pattern is required for those types of applications).
  1. Once the calibration pattern has been configured, click on the Print Grid button to print a copy of the calibration pattern.
  2. Click on the Page Setup button to configure the calibration pattern before printing, using the Page Setup dialog.
  3. Click on the Print button to launch the Print dialog. From here, the calibration pattern can be printed.

Acquiring an Image of the Calibration Pattern Using the Pose Pane

Once the calibration pattern has been configured in the Setup pane, select Pose (or Pose 1 if there are multiple poses to configure) from the navigational pane. This will display the Pose pane.

  1. There are three options for acquiring an image for calibration: Trigger, Live Video, or From File.

    Note: The most accurate results are obtained when the calibration pattern is sharply focused across the entire field of view. Also, when processing the features, CalibrateGrid does not discriminate whether or not the features are dark-on-light or light-on-dark.

  2. Once the image is acquired, CalibrateGrid will automatically extract the feature points.

  3. To display the data table showing each feature extracted, press the toggle button (press it again to hide the table). The table displays the feature points extracted from the image in their pixel row/column coordinates, as well as their calibration pattern location in grid coordinates (X,Y), relative to the origin. The X and Y coordinates are updated anytime the origin value changes. Extracted feature points are graphically displayed by a green-colored "x" at each feature location. Selecting a feature point from the table, or clicking on a feature point in the graphical display, will highlight the feature in both locations and show its coordinates graphically, as shown above.

In every instance that a new image is acquired or a Pose dialog is re-entered, the region size is adjusted and the feature points will be re-extracted and the display results will also be updated. By default, the entire image is used in feature extraction. Pressing the Adjust Region button launches interactive graphics mode, where it is possible to define a region of interest and ignore the parts of the image outside of that space.

Modifying or Setting the Origin in the Pose Pane (optional)

If Pose Locations is enabled in the Setup pane, and Automatic mode is selected, the Origin Location field is used to specify the X and Y location of the origin in real-world coordinates. In addition, if there is any discrepancy between the angular relationship of the grid's axes and the real-world axes, that can be set using the Angle box. The origin can be altered for instances where it might be more convenient to place the origin at the center of an object, rather than the corner of the image. The origin location of the calibration can be altered by adjusting the X, Y and/or Angle boxes in the Origin Location (World Coordinates) field. The values can be increased or decreased by clicking the [image] buttons, or by manually entering the desired numeric value. When Automatic mode is selected, the real-world coordinates of the origin in Pose 1 are the only world coordinate values that need to be entered. All additional poses, as long as the fiducial is found, are calibrated without specifying the origin for each pose.

If Pose Locations is enabled in the Setup pane, and User-Specified mode is selected, the Origin Location (World Coordinates) is actually used to specify the motion pose of the motion device instead of the position and angle of the calibration plate's origin. The User-Specified mode is used to perform a hand-eye calibration to establish relationship to a motion device's motion coordinate system. The motion device pose for each view must be manually entered. Users do not need to determine the calibration plate's origin position, since the placement offset (in position and orientation) between the calibration plate and the motion device is unknown.

Configuring a Calibration Pattern Without a Fiducial Using the Grid Axes (optional)

If the calibration pattern being used does not have a fiducial, the origin and the X and Y coordinate axes must be defined by using the Grid Axes settings, which are present and enabled only when a calibration pattern without a fiducial is chosen.

  1. After the image has been processed and the features have been extracted, click the Select Origin button.

  2. This launches interactive graphics mode; from here, double-click on any of the highlighted points to select that point as the origin.

    Note: Not all extracted features are capable of being an origin point; if a feature point is missing two adjacent points that are 90 degrees apart, it cannot be selected as an origin.

  3. Once the origin is set, it will be highlighted and displayed in the Spreadsheet View, and the selected origin coordinate will be automatically highlighted in the data table, as shown below.

  4. Next, click the Select X-Axis button; again, this launches interactive graphics mode, and from here, double-click on any of the highlighted points to select it as the X-axis.

  5. Once the X-axis is set, it will be highlighted and displayed in the Spreadsheet View, and the selected X-axis coordinate will be automatically highlighted in the data table, as shown below.

  6. Next, click the Select Y-Axis button; again, this launches interactive graphics mode, and from here, double-click on any of the highlighted points to select it as the Y-axis.

  7. Once the Y-axis is set, it will be highlighted and displayed in the Spreadsheet View, and the selected Y-axis coordinate will be automatically highlighted in the data table.

  8. Finally, once the Origin, X-Axis and Y-Axis have been set, click the Calibrate button to proceed to the Results pane and finish the calibration, or select a Pose from the navigational pane if there are more poses to configure.

Configuring More Than One Pose Using the Pose Dialog (optional)

Automatic Mode:

When a single calibration pattern cannot fill the field of view, multiple calibration patterns must be used. In this illustration of a multiple pose scenario, the grid-of-dots pattern, with the fiducial marker, has been used.

  1. Specify the Origin Location (World Coordinates) for Pose 1.
  2. Note: When Automatic mode is selected, the real-world coordinates of the origin in Pose 1 are the only world coordinate values that need to be entered. All additional poses, as long as the fiducial is found, are calibrated without specifying the origin for each pose.
  3. For each subsequent pose after Pose 1, a new image must be either loaded or acquired for each additional pose.
  4. Once all of the poses have been configured, click the Calibrate button to proceed to the Results dialog and finish the calibration.

User-Specified Mode:

If the calibration requires more than one pose with the pattern positioned in a different physical location for each pose, it will be necessary to accurately move the calibration pattern to several locations during the calibration sequence. This may be performed using a motion device, but the motion device control software is not automated in software, therefore, when a motion device is used, the motion device must be manually commanded by the motion device controller to move to each new pose before proceeding.

  1. Specify the Origin Location (World Coordinates) for each motion pose. The motion device pose must be manually entered for each view.
  2. Note: The Origin Location (World Coordinates) in User-Specified mode is actually used to specify the motion pose of the motion device instead of the position and angle of the calibration plate's origin. Users do not need to determine the calibration plate's origin position, since the placement offset (in position and orientation) between the calibration plate and the motion device is unknown.
  3. For each subsequent pose after Pose 1, a new image must be acquired for each additional pose.
  4. Once all of the poses have been configured, click the Calibrate button to proceed to the Results dialog and finish the calibration.

Verifying the Calibration Using the Results Dialog

Once the Calibrate button has been pressed, the function will begin to calculate the best 2D transformation, and the dialog will automatically display the Results pane. The Results pane displays a calibration summary, which shows the total number of feature points found, and the average and maximum calibration error in pixels. The error level is assigned a rating based on the average error, using the following rating values:

  • Excellent = Error <= 0.25
  • Good = 0.25 < Error <= 0.5
  • Marginal = 0.5 < Error <= 2.0
  • Poor = 2.0 < Error <= 5.0
  • Very Poor = 5.0 < Error

The rating can be viewed as the "score" of the total calibration. For instance, if the features are not evenly spaced on the grid, this will result in a lower score; or in a multiple pose calibration with User-Specified selected for the pose locations, if one of the poses is not accurately placed, this will also result in a lower score.

If the results are acceptable, click the OK button to finish the calibration. A Calib data structure will be inserted into the spreadsheet once the calibration has been successfully completed.

CalibrateGrid Outputs

Returns

A Calib data structure containing the coefficients that define the transformation between the two coordinate systems.


CalibrateImage

CalibrateImage associates a Calib data structure with an Image data structure, to create a new Image data structure. The resulting data structure can be referenced by other vision tool functions, in order to display their results in the world coordinates defined by the referenced calibration.

For example, a sensor is calibrated using a Coordinate Transforms function, such as CalibrateGrid. Next, a CalibrateImage function is inserted, with the Calib parameter set as a cell reference to the recently created Calib structure of the CalibrateGrid function. Then, another vision tool, such as ExtractBlobs, sets its Image parameter as a cell reference to the CalibrateImage data structure, causing the ExtractBlobs coordinate results in the world coordinates of the calibrated image.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

CalibrateImage Inputs

Syntax: CalibrateImage(Image,Calibration)

Parameter | Description
Image | This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, the cell containing the data structure returned by AcquireImage.
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.

CalibrateImage Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.

Note: The contents of the processed image region in the Image data structure are not saved with the job.


ExtractCalibration

ExtractCalibration creates a 2D transformation, in real-world coordinates, based on the "undistorted" image returned by a TransformImage function, and retrieves calibration data contained in the Image data structure output by the NeighborFilter, PointFilter or ScaleImage functions. For more information, see TransformImage, NeighborFilter, PointFilter, or ScaleImage. The ExtractCalibration also supports extracting calibration data contained in the ExtractColorLib data structure output by an ExtractColor function. For more information, see ExtractColor.

Note: For the ExtractColor, NeighborFilter, PointFilter and ScaleImage functions to work correctly with ExtractCalibration, those functions' Image parameter must be set as a reference to a function that returns a Calib data structure.

When a TransformImage function is added, ExtractCalibration is automatically inserted to associate a 2D transformation to the real-world coordinates defined by the image generated by a TransformImage function. Using the Image data structure generated by the TransformImage function as its sole input, ExtractCalibration returns a Calib data structure, which can be used as a reference when a TransBlobsToWorld, TransEdgesToWorld, TransFixtureToWorld, TransPatternsToWorld, and/or TransPixelToWorld function was being used on the undistorted image generated by a TransformImage function. For more information, see Structures, TransBlobsToWorld, TransEdgesToWorld, TransFixtureToWorld, TransPatternsToWorld, or TransPixelToWorld. ExtractCalibration and TransformImage can be associated together using the CalibrateImage function. For more information, see CalibrateImage.

Separately, ExtractCalibration can be inserted into the spreadsheet and its Image parameter set as a reference to the Image data structure output by the NeighborFilter, PointFilter or ScaleImage functions, or the ExtractColorLib data structure output by an ExtractColor function. ExtractCalibration then retrieves the calibration data being fed into these functions.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

ExtractCalibration Inputs

Syntax: ExtractCalibration(Image)

Parameter | Description
Image | This argument must reference a spreadsheet cell that contains a valid Image data structure created by a NeighborFilter, PointFilter, ScaleImage or TransformImage function, or a valid ExtractColorLib data structure created by an ExtractColor function. When automatically inserted in conjunction with a TransformImage function, by default, the cell referenced is the cell containing the Image data structure returned by TransformImage; otherwise the cell referenced is A0, containing the Image data structure returned by AcquireImage. For more information, see AcquireImage.

ExtractCalibration Outputs

Returns

A Calib data structure containing the coefficients that define the transformation between the two coordinate systems.


TransBlobsToWorld

Converts a Blobs structure from image coordinates to world coordinates. The function computes the offset, orientation, and area of the blob with respect to the specified real-world coordinate system.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransBlobsToWorld Inputs

Syntax: TransBlobsToWorld(Calib,Blobs,Number to Convert)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
Blobs | This argument must reference a spreadsheet cell that contains a valid Blobs data structure.
Number to Convert | Specifies the number of blobs from the original Blobs data structure to convert to world coordinates. (0 to 4096; default = 3)

TransBlobsToWorld Outputs

Returns | A Blobs data structure containing the transformed blobs, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransBlobsToWorld Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet will be similar to those automatically inserted by the FindBlobs and SortBlobs functions. For more information, see Property Sheet, Blobs, FindBlobs, SortBlobs, or Calibrate.


TransEdgesToWorld

Converts an Edges structure from image coordinates to world coordinates. The function computes the offset and orientation of the edges with respect to the specified real-world coordinate system.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransEdgesToWorld Inputs

Syntax: TransEdgesToWorld(Calib,Edges,Number to Convert)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
Edges | This argument must reference a spreadsheet cell that contains a valid Edges data structure.
Number to Convert | Specifies the number of edges from the original Edges data structure to convert to world coordinates. (0 to 160; default = 3)

TransEdgesToWorld Outputs

Returns | Edges data structure containing the transformed edges, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransEdgesToWorld Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet will be similar to those automatically inserted by the functions used to sort and pair Edges data structures. For more information, see Edges, SortEdges, PairEdges, Edge, Property Sheet or Calibrate.


TransFixtureToWorld

Converts a fixture from pixel coordinates to real-world coordinates. For more information, see Fixture.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransFixtureToWorld Inputs

Syntax: TransFixtureToWorld(Calib,Fixture,Show)

Parameter Description

Calib

This argument must reference a spreadsheet cell that contains a valid Calib data structure.

Fixture

Specifies the fixture coordinate system.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Show

Specifies the display mode for the TransPixelToWorld graphic overlay on the image.

0 = hide all (default) | The fixture will be hidden, except when the cell containing the TransPixelToWorld function is highlighted in the spreadsheet.
2 = input graphics only | The fixture will be displayed at all times.

TransFixtureToWorld Outputs

Returns

Fixture data structure containing the transformed fixture, or #ERR if any of the input parameters are invalid.

For more information, see Calibrate or Property Sheet.


TransformImage

TransformImage generates an Image data structure that accounts for the distortion present in a CalibrateGrid function. For more information, see CalibrateGrid.

Note: This function only outputs greyscale images.

TransformImage Overview

TransformImage generates an Image data structure, using a CalibrateGrid Calib data structure and the Image data structure being referenced by the CalibrateGrid function as arguments, that accounts for linear, non-linear and lens distortion to return an "undistorted" version of the image being used by the CalibrateGrid function. This new output image is based in pixels, but simultaneously, an ExtractCalibration function is automatically inserted into the spreadsheet, which creates a 2D transformation, in real-world coordinates, based upon the calibration of the TransformImage function. For more information, see ExtractCalibration.

Closed The image before TransformImage:

Closed The image after TransformImage:

Note: The TransformImage training period, which takes place when the function is added to the spreadsheet, when the specified region is changed or when a job with the function is loaded, may take as long as 3 seconds on a sensor with a 640x480 resolution, and as long as 30 seconds on a sensor with a 1600x1200 resolution.

TransformImage Inputs

Syntax: TransformImage(Image,Calibration,Region,Image Scale,Origin,Show)

Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions. For more information, see AcquireImage and Image.

Calibration

This argument must reference a spreadsheet cell that contains a valid Calib data structure created by a CalibrateGrid function.

Region

Also known as the Region of Interest (ROI), specifies the region of the image that undergoes image analysis; creates a rectangular image region that can be re-shaped. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.

X | The x-offset of the origin, in fixture coordinates..
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.

Image Scale

Specifies the scale at which the transformed image is displayed. The minimum setting is 0.01, the maximum is 10.00 and the default setting is 1.0.

Reference Point

Specifies the origin reference point for the transformation.

0 = Image Center (default) | The reference point will be the center of the image.
1 = Region Center | The reference point will be the center of the ROI.

Show

Specifies the display mode for TransformImage graphics on the image.

0 = hide all | All graphics will be hidden, except when the cell containing the TransformImage function is highlighted in the spreadsheet.
1 = result graphics only | The undistorted image will be displayed at all times.
2 = input and result graphics | The input image region and undistorted image will be displayed at all times.

TransformImage Outputs

Returns

An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid. Also automatically inserts an ExtractCalibration Calib data structure, which creates a 2D transformation, in real-world coordinates, based on the Image data structure returned by TransformImage.

Note: The contents of the processed image region in the Image data structure are not saved with the job.

For more information, see Property Sheet or Calibrate Functions.


TransInspEdgeDefectToWorld

Converts an InspectEdgeForDefect Inspect data structure from image coordinates to world coordinates. For more information, see InspectEdgeForDefect.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransInspEdgeDefectToWorld Inputs

Syntax: TransInspEdgeDefectToWorld(Calib,InspectEdgeForDefect)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
InspectEdgeForDefect | This argument must reference a spreadsheet cell that contains a valid Inspect data structure output by an InspectEdgeForDefect function.

TransInspEdgeDefectToWorld Outputs

Returns

Inspect data structure containing the transformed edges, or #ERR if any of the input parameters are invalid.

For more information, see Calibrate, InspectEdge, or Property Sheet.


TransInspEdgeWidthToWorld

Converts an InspectEdgeWidth Inspect data structure from image coordinates to world coordinates. For more information, see InspectEdgeWidth.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransInspEdgeWidthToWorld Inputs

Syntax: TransInspEdgeWidthToWorld(Calib,InspectEdgeWidth)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
InspectEdgeWidth | This argument must reference a spreadsheet cell that contains a valid Inspect data structure output by an InspectEdgeWidth function.

TransInspEdgeWidthToWorld Outputs

Returns

Inspect data structure containing the transformed edges, or #ERR if any of the input parameters are invalid.

For more information, see Calibrate, InspectEdge, or Property Sheet.


TransOCRMaxToWorld

Converts an OCRMax function's OCRMax data structure from image coordinates to real-world coordinates. For more information, see OCRMax.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransOCRMaxToWorld Inputs

Syntax: TransOCRMaxToWorld(Calib,OCRMax)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
OCRMax | This argument must reference a spreadsheet cell that contains a valid OCRMax data structure output by an OCRMax function.

TransOCRMaxToWorld Outputs

Returns

An OCRMax data structure containing the transformed characters, or #ERR if any of the input parameters are invalid.

Note: The OCRMax data structure returned by the TransOCRMaxToWorld function cannot be used as a reference to another OCRMax function as a font, nor will it function as a normal OCRMax function OCRMax data structure (for example, it will not draw result graphics). While all of the OCRMax Vision Data Access functions will work with the OCRMax data structure returned by TransOCRMaxToWorld, it should only be used to return coordinate data. For more information, see OCRMax.

For more information, see Calibrate or Property Sheet.


TransPatternsToWorld

Converts a Patterns structure from image coordinates to world coordinates. The function computes the offset and orientation of the patterns response points with respect to the specified real-world coordinate system.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransPatternsToWorld Inputs

Syntax: TransPatternsToWorld(Calib,Patterns,Number to Convert)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
Patterns | This argument must reference a spreadsheet cell that contains a valid Patterns data structure.
Number to Convert | Specifies the number of patterns from the original Patterns data structure to convert to world coordinates. (0 to 100; default = 1)

TransPatternsToWorld Outputs

Returns

Patterns data structure containing the transformed patterns, or #ERR if any of the input parameters are invalid.

Note: If TransPatternsToWorld function is referenced by a TransPatternsToFixture function, the TransPatternsToFixture function will still report results in pixel coordinates, even though the TransPatternsToWorld outputs real-world coordinates. For more information, see TransPatternsToFixture.

Results

When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransPatternsToWorld Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet will be similar to those automatically inserted by the functions used to find and sort Patterns data structures. For more information, see Patterns, FindPatterns, SortPatterns, Fixture, Pattern Match, or Property Sheet.


TransPixelToWorld

Converts a point from pixel coordinates to real-world coordinates.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransPixelToWorld Inputs

Syntax: TransPixelToWorld(Calib,Point.Row,Point.Column,Show)

Parameter Description

Calib

This argument must reference a spreadsheet cell that contains a valid Calib data structure.

Point

Specifies the coordinates of the Point.

Row | The row coordinate of the point.
Column | The column coordinate of the point.

Show

Specifies the display mode for the TransPixelToWorld graphic overlay on the image.

0 = hide all (default) | The point will be hidden, except when the cell containing the TransPixelToWorld function is highlighted in the spreadsheet.
2 = input graphics only | The point will be displayed at all times.

TransPixelToWorld Outputs

Returns | Point data structure containing the transformed point, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransPixelToWorld Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet to create the results table are as follows:

X | GetRow(Point) | The x-coordinate of the transformed point.
Y | GetCol(Point) | The y-coordinate of the transformed point.

For more information, see Structures, Fixture, Point, Calibrate, or Property Sheet.


TransSurfaceFlawToWorld

Converts a SurfaceFlaw SurfaceFlaw data structure from image coordinates to real-world coordinates. For more information, see SurfaceFlaw.

Note: The output of any vision tool that reports in real-world coordinates cannot be used as a fixture or region input to another vision tool.

TransSurfaceFlawToWorld Inputs

Syntax: TransSurfaceFlawToWorld(Calib,SurfaceFlaw)

Parameter | Description
Calib | This argument must reference a spreadsheet cell that contains a valid Calib data structure.
SurfaceFlaw | This argument must reference a spreadsheet cell that contains a valid SurfaceFlaw data structure output by a SurfaceFlaw function.

TransSurfaceFlawToWorld Outputs

Returns

A SurfaceFlaw data structure containing the transformed flaws, or #ERR if any of the input parameters are invalid.

Note:
  • To convert the perimeter value of a flaw, a CalibrateGrid function must be used to output the referenced Calib data structure. For more information, see CalibrateGrid.
  • If Calibrate or CalibrateAdvanced are used, all perimeter values will be returned in pixel coordinates. For more information, see Calibrate or CalibrateAdvanced.
  • A flaw's roundedness and/or intensity values will not be converted to real-world values.

For more information, see Property Sheet or Flaw Detection.


TransWorldToPixel

Converts a point from world coordinates to pixel coordinates.

TransWorldToPixel Inputs

Syntax: TransWorldToPixel(Calib,Point.X,Point.Y,Show)

Parameter Description

Calib

This argument must reference a spreadsheet cell that contains a valid Calib data structure.

Point

Specifies the coordinates of the point.

X | World x-coordinate.
Y | World y-coordinate.

Show

Specifies the display mode for the TransWorldToPixel graphic overlay on the image.

0 = hide all (default) | The input point will not be displayed, except when the cell containing the TransWorldToPixel function is highlighted in the spreadsheet.
1 = result graphics only | The input point will be displayed at all times.

TransWorldToPixel Outputs

Returns | Point data structure containing the transformed point, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransWorldToPixel Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet to create the results table are as follows:

Row | GetRow(Point) | The row coordinate of the transformed point.
Column | GetCol(Point) | The column coordinate of the transformed point.

For more information, see Structures, Point, Calibrate, or Property Sheet.


Fixture Functions

Fixture functions define coordinate transformations between fixture and pixel coordinate systems:

  • TransBlobsToFixture: Converts a Blobs structure from image coordinates to fixture coordinates.
  • TransEdgesToFixture: Converts an Edges structure from image coordinates to fixture coordinates.
  • TransFixtureToPixel: Converts fixture coordinates to pixel coordinates.
  • TransPatternsToFixture: Converts a Patterns data structure from image coordinates to fixture coordinates.
  • TransPixelToFixture: Converts pixel coordinates to fixture coordinates.

TransBlobsToFixture

TransEdgesToFixture

TransFixtureToPixel

TransPatternsToFixture

TransPixelToFixture


TransBlobsToFixture

Converts a Blobs structure from image coordinates to fixture coordinates. The function computes the offset and orientation of the blob with respect to the specified fixture.

TransBlobsToFixture Inputs

Syntax: TransBlobsToFixture(Fixture.Row,Fixture.Column,Fixture.Theta,Blobs,Number to Convert)

Parameter Description

Fixture

Specifies the fixture coordinate system.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Blobs

Blobs data structure. This argument must reference a spreadsheet cell that contains a valid Blobs data structure.

Number to Convert

Specifies the number of blobs from the original Blobs data structure to convert to fixture coordinates. (0 to 4096; default = 3)

TransBlobsToFixture Outputs

Returns | A Blobs data structure containing the transformed blobs, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransBlobsToFixture Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet will be similar to those automatically inserted by the FindBlobs and SortBlobs functions. For more information, see Property Sheet, Blobs, FindBlobs, or SortBlobs.


TransEdgesToFixture

Converts an Edges structure from image coordinates to fixture coordinates. The function computes the offset and orientation of the edges with respect to the specified fixture.

TransEdgesToFixture Inputs

Syntax: TransEdgesToFixture(Fixture.Row,Fixture.Column,Fixture,Theta,Edges,Number to Convert)

Parameter Description

Fixture

Specifies the fixture coordinate system.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Edges

This argument must reference a spreadsheet cell that contains a valid Edges data structure.

Number to Convert

Specifies the number of edges from the original Edges data structure to convert to fixture coordinates. (0 to 160; default = 3)

TransEdgesToFixture Outputs

Returns | An Edges data structure containing the transformed edges, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransEdgesToFixture Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet will be similar to those automatically inserted by the functions used to sort and pair Edges data structures. For more information, see Edges, SortEdges, PairEdges, Edge, or Property Sheet.


TransFixtureToPixel

Converts fixture coordinates to pixel coordinates.

TransFixtureToPixel Inputs

Syntax: TransFixtureToPixel(Fixture.Row,Fixture.Column,Fixture.Theta,Point.X,Point.Y,Show)

Parameter Description

Fixture

Specifies the fixture coordinate system.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Point

Specifies the coordinates of the point, in fixture coordinates.

X | The row offset of the point from the fixture origin.
Y | The column offset of the point from the fixture origin.

Show

Specifies the display mode for the TransFixtureToPixel graphic overlay on the image.

0 = hide all (default) | The point will not be displayed, unless the cell containing the TransFixtureToPixel function is highlighted in the spreadsheet.
1 = result graphics only | The point will always be displayed.

TransFixtureToPixel Outputs

Returns | A Point data structure containing the transformed point, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransFixtureToPixel Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet to create the results table are as follows:

Row | GetRow(Point) | The row coordinate of the transformed point.
Column | GetCol(Point) | The column coordinate of the transformed point.

For more information, see Property Sheet, Structures, Fixture, or Point.


TransPatternsToFixture

Converts a Patterns data structure from image coordinates to fixture coordinates. The function computes the offset and orientation of the pattern response points with respect to the specified fixture.

TransPatternsToFixture Inputs

Syntax: TransPatternsToFixture(Fixture.Row,Fixture.Column,Fixture.Theta,Patterns,Number to Convert)

Parameter Description

Fixture

Specifies the fixture coordinate system.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Patterns

This argument must reference a spreadsheet cell that contains a valid Patterns data structure.

Note: If TransPatternsToFixture is referencing a Patterns data structure returned by a TransPatternsToWorld function, the TransPatternsToFixture function will still report results in pixel coordinates, even though the TransPatternsToWorld outputs real-world coordinates. For more information, see TransPatternsToWorld.

Number to Convert

Specifies the number of patterns from the original Patterns data structure to convert to fixture coordinates. (0 to 100; default = 1)

TransPatternsToFixture Outputs

Returns | A Patterns data structure containing the transformed patterns, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransPatternsToFixture Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet will be similar to those automatically inserted by the functions used find and sort Patterns data structures. For more information, see Patterns, FindPatterns, SortPatterns, Fixture, Pattern Match, or Property Sheet.


TransPixelToFixture

Converts fixture coordinates to pixel coordinates.

TransPixelToFixture Inputs

Syntax: TransPixelToFixture(Fixture.Row,Fixture.Column,Fixture.Theta,Point.Row,Point.Column,Show)

Parameter Description

Fixture

Specifies the fixture coordinate system.

Row | The row offset, in image coordinates.
Column | The column offset, in image coordinates.
Theta | The orientation, in image coordinates.

Point

Specifies the coordinates of the point, in pixel coordinates.

Row | Row offset of the point from the image origin.
Column | Column offset of the point from the image origin.

Show

Specifies the display mode for the TransPixelToFixture graphic overlay on the image.

0 = hide all (default) | The point will not be displayed, unless the cell containing the TransPixelToFixture function is highlighted in the spreadsheet.
2 = input graphics only | The point will be displayed at all times.

TransPixelToFixture Outputs

Returns | Point data structure containing the transformed point, or #ERR if any of the input parameters are invalid.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

TransPixelToFixture Vision Data Access Functions

The Vision Data Access functions automatically inserted into the spreadsheet to create the results table are as follows:

X | GetRow(Point) | The x-coordinate of the transformed point.
Y | GetCol(Point) | The y-coordinate of the transformed point.

For more information, see Structures, Fixture, Point, or Property Sheet.


Input/Output Functions

Input/Output functions control how an In-Sight vision system communicates with remote devices over an Ethernet network or serial port connection. These functions are categorized as follows:

  • BitStream: Combines and collects a list of bits to be sent using the WriteWaveformClocked function.
  • CombineOutputBuffers: Combines the output of multiple FormatOutputBuffer functions into a single Buffer data structure.
  • Discrete: Reads and writes an In-Sight vision system's parallel discrete I/O channels while the system is Online.
  • Event: Acquires an image and updates the spreadsheet on the specified event trigger.
  • ExportData: Exports cell data as a .cxd file to share data between other vision systems, FTP servers, or the RAM Disk of local or networked vision systems.
  • ExternalLightControl: Configures light settings for an external strobe or continuous lighting device connected to the In-Sight 7000 Gen2 series or 9912 vision system's External Light cable.
  • FormatInputBuffer: Allows the user to configure the format of data that is received from the ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, ReadDeviceNetBuffer, ReadEIPBuffer, ReadModbusBuffer or ReadProfinetBuffer functions.
  • FormatOutputBuffer: Allows the user to configure the format of data that is sent to the WriteCCLinkBitBuffer, WriteCCLinkWordBuffer, WriteDeviceNetBuffer, WriteEIPBuffer WriteModbusBuffer or WriteProfinetBuffer functions.
  • ImportData: Imports cell data as a .cxd file from other sensors, FTP servers, or the RAM Disk of local or networked sensors.
  • IntegratedLightControl: Configures light settings for the integrated illumination accessory connected to the front of the In-Sight 7000 Gen2 series vision system's faceplate.
  • LocalStorage: Writes image and data files to the SD card installed to the In-Sight vision system while Online.
  • MachineStatus: Stores an In-Sight sensors operational status information.
  • Message: Reads and writes text strings from/to an In-Sight sensor over a Native Mode connection.
  • Network: Shares data between In-Sight sensors and other TCP/IP devices on a network.
  • Serial: Reads and writes data from/to the serial ports on an In-Sight vision system.
  • SetEvent: Triggers a specified event on execution.
  • Time/Timer: Returns the current date and time, as well as triggers time-based events.
  • Waveform: Creates and sends output waveform patterns over discrete output lines.

BitStream

CombineOutputBuffers

Discrete

Event

ExportData

ExternalLightControl

FormatInputBuffer

FormatOutputBuffer

ImportData

IntegratedLightControl

LocalStorage

Machine Status

Message

Network

Serial

SetEvent

Time/Timer

Waveform


BitStream

Collects a list of bits to be sent out using the WriteWaveformClocked function (a maximum of 253 bits may be specified).

Note:
  • BitStream does not have a property sheet; it is based on a variable list of bits, expressed either as a raw number (0 or 1), a cell reference or a range of cells. The maximum string length allowed in a cell is 255 characters. If more than 255 characters are used to specify the variable arguments, an error message will be displayed. When a string used to specify the variables arguments exceeds the 255 character limits, use a cell range.
  • Any non-zero number will be interpreted as a bit value of 1.

BitStream Inputs

Syntax: BitStream(Bit0,[Bit1,...])

Parameter | Description
Bit 0 | Specifies the first bit.
Bit 1 | Specifies the subsequent bits.

BitStream Outputs

Returns

A BitStream data structure containing the bits; or #ERR:

  • If any of the input parameters are invalid.
  • If the bit is recorded as a non-negative numeric value.


CombineOutputBuffers

Allows the user to configure the outputs of multiple FormatOutputBuffer functions into a single Buffer data structure that is transmitted in a single communication packet. For more information on FormatOutputBuffer, see FormatOutputBuffer.

Note: The CombineOutputBuffers function supports a maximum of 128 elements, regardless of the size of the elements.

CombineOutputBuffers Inputs

Syntax: CombineOutputBuffers(FormatCell 1,Format Cell 2,Format Cell N)

Parameter | Description
Format Cell 1 | Specifies a referenced Buffer data structure output by a FormatOutputBuffer function. Note: The maximum length for output data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for output data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for output data is 128 bytes. The maximum length for all other communications is 256 bytes.
Format Cell 2 | Specifies a referenced Buffer data structure output by a FormatOutputBuffer function. Note: The maximum length for output data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for output data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for output data is 128 bytes. The maximum length for all other communications is 256 bytes.
Format Cell N | Specifies a referenced Buffer data structure output by a FormatOutputBuffer function. Note: The maximum length for output data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for output data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for output data is 128 bytes. The maximum length for all other communications is 256 bytes.

CombineOutputBuffers Outputs

Returns

A Buffer data structure containing the formatted data; or #ERR:

  • if any of the input parameters are invalid
  • if the size of the combined FormatOutputBuffer functions exceeds 4,000 bytes.


Discrete I/O Functions

Discrete I/O functions read and write an In-Sight vision system's parallel discrete I/O channels.

  • ReadDiscrete: Reads a range of bits from a discrete input channel.
  • WriteDiscrete: Writes a range of bits to a discrete output channel.

The number of direct (built-in) inputs and outputs varies per In-Sight vision system, as follows. For more information, see Default Input and Output Lines.

In-Sight Vision Systems | Direct (built-in) Inputs | Direct (built-in) Outputs
In-Sight Micro 1000 series | None | 2 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 5000 series | None | 2 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 70xx - 74xx series | 3 general-purpose inputs | 4 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 7000 Gen2 series | Up to 3 general-purpose inputs | Up to 4 high-speed outputs 2 user-configurable LEDs (1 green or red, 1 red)
In-Sight 8000 series | None | 2 high-speed outputs 2 user-configurable LEDs (1 green, 1 red)
In-Sight 9902L | 1 general-purpose input | 2 high-speed outputs 2 user-configurable LEDs (1 green or red, 1 red)
In-Sight 9912 | Up to 3 general-purpose inputs | Up to 4 high-speed outputs 2 user-configurable LEDs (1 green or red, 1 red)
Note:
  • In-Sight vision systems have one dedicated acquisition trigger input on the vision system. For more information, refer to the vision system installation manual or reference guide, included with In-Sight Explorer software.
  • When connected to the Breakout cable, the In-Sight 7000 Gen2 series and 9912 vision systems support bi-directional high-speed outputs and general-purpose inputs for HS OUT 2 / IN 2 and HS OUT 3 / IN 3. These lines are configured as outputs by default.

An I/O module can be used to provide additional discrete inputs and outputs. The number of discrete inputs and outputs varies per applicable I/O module, as follows. For more information, see Default Input and Output Lines.

I/O Modules | Supported In-Sight Vision Systems | Discrete Input Lines | Discrete Output Lines
CIO-1400 | In-Sight 5000 series (except 5604), In-Sight 7000 Gen2 series, In-Sight 9000 series | 7 general-purpose inputs | 6 general-purpose outputs
CIO-MICRO | In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 70xx - 79xx series, In-Sight 8000 series, In-Sight 9000 series | 8 general-purpose inputs | 8 general-purpose outputs
CIO-MICRO-CC | In-Sight Micro 1000 series, In-Sight 5000 series (except 5705, 5705C and 5715), In-Sight 70xx - 74xx series | 8 general-purpose inputs | 8 general-purpose outputs
CIO-1450 | In-Sight 5000 series (except 5604, 5705, 5705C and 5715) | 8 general-purpose inputs | 8 general-purpose outputs
CIO-1460 | In-Sight 5000 series (except 5604, 5605, 5705, 5705C and 5715) | 8 general-purpose inputs | 8 general-purpose outputs
CIO-WENET | In-Sight Micro 1000 series | 8 general-purpose inputs | 8 general-purpose outputs
Note:
  • The CIO-1400 I/O module supports the In-Sight 7000 Gen2 series vision system using In-Sight Explorer 5.4.0 and higher. If you log onto the vision system using an earlier version of In-Sight Explorer, connect to the CIO-1400 I/O module and configure the I/O lines, the changes will not be retained.
  • The CIO-MICRO I/O module supports In-Sight 5705, 5705C, 5715 and In-Sight 8000 series vision systems with firmware version 5.3.0 and higher.
  • The CIO-MICRO & CIO-MICRO-CC I/O modules support In-Sight 5100 series and 5400 series vision systems with 128MB non-volatile flash memory or higher. Models can be identified by the Type number (821-xxxx-xx). The Type number is located on the label affixed to the vision system. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The CIO-1450, CIO-1460 and CIO-WENET I/O modules are obsolete and no longer available for purchase, however these modules are still supported within In-Sight Explorer for backward compatibility only.
  • In-Sight vision systems may also be used to communicate with standard Ethernet I/O solutions available from other vendors, including Opto 22, Wago, and Sixnet, to provide a virtually unlimited number of I/O channels. However, the In-Sight TCPDevice function, configured for Modbus packet type communications, must be used to configure Ethernet-based I/O on these vision systems. For more information, see TCPDevice.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

ReadCameraTrigger

ReadDiscrete

WriteDiscrete


ReadCameraTrigger

Reads the state of an In-Sight vision system's acquisition trigger input.

ReadCameraTriggerInputs

Syntax: ReadCameraTrigger( Event)

Parameter Description

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

ReadCameraTriggerOutputs

Returns

The value that represents the state of theinput:

  • 0 = OFF
  • 1= ON


ReadDiscrete

Reads a range of bits from a discrete input channel.

Note:
  • This function is enabled only when the vision system is Online.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

ReadDiscreteInputs

Syntax: ReadDiscrete(Event,Start Bit,Number of Bits)

Parameter Description

Event

Specifies the update event on which to read. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Start Bit

Specifies the first bit of the set to beread.

  • In-Sight 5000 series and Micro series: 0 to 9; default = 0
  • In-Sight 70xx - 74xx series: 0 to 13; default = 0
  • In-Sight 7000 Gen2 series: 0 to 15; default = 0
  • In-Sight 8000 series: 0 to 15; default = 0
  • In-Sight 9000 series: 0 to 15; default = 0

Number of Bits

Specifies the number of bits in the set tobe read.

  • In-Sight 5000 series and Micro series: 1 to 10; default = 10
  • In-Sight 70xx - 74xx series: 1 to 14; default = 10
  • In-Sight 7000 Gen2 series: 1 to 16; default = 10
  • In-Sight 8000 series: 1 to 16; default = 10
  • In-Sight 9000 series: 1 to 16; default = 10

ReadDiscreteOutputs

Returns The positive integer value read, or #ERRfor any invalid input parameter.


WriteDiscrete

Writes a range of bits to a discrete output channel.

Note:
  • This function is enabled only when the vision system is Online.
  • Jobs that contain this function and saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • If an In-Sight Explorer job file containing a WriteDiscrete function is loaded on an In-Sight vision system and the CIO-1400 I/O Module is then connected, the Start Bit and Number of Bits parameters in WriteDiscrete must be changed to reflect the new configuration of the I/O lines.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

WriteDiscrete Inputs

Syntax: WriteDiscrete(Event,Start Bit,Number of Bits,Value)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Start Bit

Specifies the first bit of the set to be written.

  • In-Sight 5000 series and Micro 1000 series: 0 to 11; default = 0
  • In-Sight 70xx - 74xx series: 0 to 13; default = 1
  • In-Sight 7000 Gen2 series: 0 to 15; default = 0
  • In-Sight 8000 series: 0 to 15; default = 0
  • In-Sight 9000 series: 0 to 15; default = 0

Number of Bits

Specifies the number of bits in the set to be written.

  • In-Sight 5000 series and Micro series: 1 to 12; default = 1
  • In-Sight 70xx - 74xx series: 1 to 14; default = 1
  • In-Sight 7000 Gen2 series: 1 to 16; default = 1
  • In-Sight 8000 series: 1 to 16; default = 1
  • In-Sight 9000 series: 1 to 16; default = 1

Value

Specifies the positive integer value to be written.

  • In-Sight 5000 series and Micro series: 0 to 4095; default = 0
  • In-Sight 70xx - 74xx series: 0 to 16383; default = 0
  • In-Sight 7000 Gen2 series: 0 to 65535; default = 0
  • In-Sight 8000 series: 0 to 65535; default = 0
  • In-Sight 9000 series: 0 to 65535; default = 0

WriteDiscrete Outputs

Returns

The value written, #ERR for any invalid input parameter.


Event

Updates the spreadsheet on the specified event trigger. The Event function is used as a critical dependency in causing the spreadsheet to update only on specific input/output conditions.

Event Inputs

Syntax: Event(Trigger,Manual)

Parameter | Description
Trigger | Specifies a trigger source for the event when the In-Sight sensor is Online. For more information, see Online/Offline.

16

 Acquisition Error

Generated when an ERR: Missed Acquisition output is sent, or when a vision system loses communication. For more information, see Configure Discrete I/O Lines.

Note: The Trigger parameter in the AcquireImage property sheet must be set to Camera to use this trigger.

17

 Discrete I/O Error

Generated when a tracking pulse overrun occurs, or the tracking pulse queue is full.

18

 Serial Port 0 Error

Not implemented.

19

 Serial Port 1 Error

Not implemented.

20

 Spreadsheet Error

Generated when a #ERR is returned in a cell for the first time during job execution.

21

 System Error

Not implemented.

22

 Network Error

Generated when using the:

  • TCPDevice or WriteResult functions, and these functions have received a socket error from a low-level network library.
  • TCPDevice function and a packet is received but cannot be handled because the job is being executed.
  • WriteFTP or WriteImageFTP functions and network parameter settings (Host Name, User Name, Password, etc.) are invalid.

32

 Manual

Generated when a manual trigger is initiated with the vision system Online.

33

 Online/Offline

Generated when an In-Sight vision system switches between Online/Offline states.

35

 Job Load Done

Generated after a job is loaded.

39

 Acquisition Job Complete

Generated at the end of acquisition-initiated job execution.

Note: The Trigger parameter in the AcquireImage property sheet must be set to Manual to use this trigger.

49 to 60

Discrete 0 to 11

Generated when the corresponding discrete input is configured as an Event Trigger, and the specified signal activity (i.e. Rising Edge, Falling or both) occurs. For more information, see Configure Discrete I/O Lines.

64

 Serial port 0

Not implemented.
65 Serial port 1

Generated when the serial port is configured for either DeviceNet or Text Mode, and data is received on the serial port. For more information, see Serial Port Settings Dialog.

80 to 87

Soft 0 - 7

(default = Soft 0)

Generated when a SetEvent, Button or Timer function, or a Set Event or Set Event and Wait Native Mode command, soft trigger is executed.
135 | Tune Button | Generated when the Tune button on the In-Sight 7000 Gen2 series vision system or In-Sight 9000 series vision system is pressed.
Manual

Specifies whether manual triggering is issued when the event is triggered while the In-Sight vision system is Offline. For more information, see Online/Offline.
0

OFF (default)

Manual triggering is not issued.

1 ON

Manual triggering is issued.

Event Outputs

Returns

An Event data structure, or #ERR if any of the input parameters are invalid.


ExportData

ExportData is a function that automatically exports data in a spreadsheet cell to a Cell Data (.CXD) file when a predetermined event in the spreadsheet indicates that the file is to be exported. It allows the data within a single cell on one vision system to be exported to one of the following locations:

  • The flash memory of a local or networked In-Sight vision system.
  • A central server via FTP. For more information, see File Transfer Protocol (FTP).
  • The RAM Disk or SD Card of a local or networked vision system. For more information, see RAM Disk Settings Dialog and SD Card Folder.

When a .CXD file is exported using the ExportData function, the data becomes a part of the ExportData function and cannot be edited; when you click on an exported .CXD file, the ExportData property sheet will be opened and not the property sheet for the type of data that was exported. ExportData is able to export the following data types:

  • DelayLine: For more information, see DelayLine.
  • CountPassFail: For more information, see CountPassFail.
  • Calibrate: For more information, see Calibrate.
  • CalibrateAdvanced: For more information, see CalibrateAdvanced.
  • FindPatterns: For more information, see FindPatterns.
  • OCRMax: For more information, see OCRMax.
  • OCRMaxSettings: For more information, see OCRMaxSettings.
  • TrainPatMaxPattern: For more information, see TrainPatMaxPattern.
  • TrainFont: For more information, see TrainFont.
Note: The ExportData function cannot export .CXD files to the Snippets folder on the PC. For more information, see Palette: Spreadsheet View.
CAUTION:
  • Writing data from the ExportData function is a potential job blocking function; jobs can be slowed down and a vision system may queue or miss a trigger if the job takes longer to process than the trigger period.
  • When utilizing the ExportData function to write to a local or networked In-Sight vision system's flash memory, the following considerations apply: a warning will be issued and the job will be slowed when more than 0.5KB/sec of data is written to flash memory sixteen consecutive times. In this event, data will not be dropped or ignored. An In-Sight vision system's flash memory has a life-cycle of approximately 100,000 writes per page, therefore, when using the ExportData function, the precaution above must be taken to protect the vision system's flash memory.

ExportDataInputs

Syntax: ExportData(Event,Host Name,User Name,Password,File Name,Data to Export)

Parameter Description

Event

Specifies the update event on which to read data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.

    Note: If the data is being written to flash memory and the Event is set to the Image data structure, an #ERR will be returned.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: The default Event parameter setting for the ExportData function is 0, and if the setting remains at 0, an ExportData button will be created next to the ExportData cell.

Host Name

Indicates the location where the file isto be saved.Thefile can be stored on a local or networked vision system via the flash memory,an external server via FTP, RAMDisk, or SD Card of a local or networked vision system.

Note:
  • The Host Name drop-down does not list Host Names of In-Sight vision systems and/or emulators on the network. Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.
  • If exporting data to flash memory, the Host Name field must be left blank (e.g. "").
  • If an FTP server is specified as the destination, and the FTP server is unavailable at the time of the data transfer, it will take several seconds to timeout; In-Sight Explorer may disconnect from the vision system if this occurs.

User Name

Specifies the user name that will access the file system of the vision system or device that will store the file. If the data is being exported to a local vision system's flash memory, RAM Disk or SD Card, this field can be left blank.

Password

Specifies the password that will access the file system of the vision system or device that will store the file. If the data is being exported to a local vision system's flash memory, RAM Disk or SD Card, this field can be left blank.

Note: The Host Name, User Name and Password parameters are only required for FTP destinations.

File Name

Specifies the name for the file used to identify the information being stored. If the file name already exists on the target location, the existing file will be overwritten.

  • When exporting to RAM Disk, the File Name must include "ramdisk/" before the name of the file (e.g. "ramdisk/PartXPattern"; the spelling of RAM Disk in this instance is not case sensitive).
  • When exporting to SD Card, the File Name must include "sdcard/" before the name of the file (e.g. "sdcard/PartXPattern"; the spelling of SD Card in this instance is not case sensitive).
Note: Inserting the file name extension is not required; it will automatically be appended to the string. If a different file name extension is inserted, an #ERR will be returned.

Data to Export

Indicates the cell that will be exported. If a cell contains a reference to another structure, such as a GetString reference, the actual value contained in the cell be exported.

ExportData Outputs

Returns

Creates a .CXD file that can be stored on an external server via FTP server, a local or networked In-Sight vision system's flash memory, or on the RAM Disk or SD Card of a local or networked vision system.

Note: If ExportData returns an #ERR as a result, you can utilize GetErrorString to determine the cause. For more information, see GetErrorString.

ExportData will export a .CXD file if one of the following three conditions are met:

  • The OKbutton on the ExportData property sheet is pressed.

  • An Event is received.

  • The Event parameter is ON (or points to a non-zero numeric value), and any one of the ExportData input parameters is updated.

    Note: ExportData will export data even while in Offline mode.

ExportData Examples

ExportData(A8,"FTPServer1","operator1","","PartXPattern",H7)

Whenever the spreadsheet updates after an event is triggered in cell A8, the function writes the data in cell H7, as a file named PartXPattern.cxd, to the server named FTPServer1. The user name is specified as operator1, and the password is left blank.

EV ExportData(1,"","","","FindPatterns",F4)

  1. Insert a FindPatterns function into cell F4. For more information, see FindPatternsVision Data Access Functions.
  2. Open a telnet session and issue the following EvaluateNative Mode command: EV ExportData(1,"","","","FindPatterns",F4).The FindPatterns function contained in cell F4 is written to a file named FindPatterns.cxd and saved to the flash memory of the local vision system.The user name and password are not required because the data is being writtento a vision system.For more information, see Evaluate.


ExternalLightControl

Allows the user to configure light settings for an external strobe or continuous lighting device connected to the In-Sight 7000 Gen2 series or 9912 vision system's LIGHT connector. For more information, see Light Settings.

Note:
  • An external light must be connected to the vision system's LIGHT connector and External must be selected within the Light Settings dialog or the function will return #ERR.
  • If the ExternalLightControl function is inserted into the spreadsheet and you attempt to modify settings in the Light Settings dialog, the settings specified in the dialog will be overwritten by the spreadsheet function.
  • If multiple instances of the ExternalLightControl function exist within a job, the external light will use the settings specified by the most recently executed instance of the function.
  • The In-Sight 7000 Gen2 series vision system supports connecting an integrated illumination accessory to the vision system's faceplate and connecting an external light to the vision system's LIGHT connector, but does not support using both lighting devices simultaneously. For a complete list of supported accessories, refer to the In-Sight® 7000 Gen2 Series Vision System Reference Guide.

ExternalLightControl Inputs

Syntax: ExternalLightControl(Event, External Light Polarity,External Light Strobe Source,Intensity)

Parameter | Description

Event

Specifies the event that forces an update.This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A numeric value.
External Light Polarity

Specifies the type of strobe or continuous lighting device connected to the vision system.

  • 0 = PNP (Sourcing) (default)
  • 1 = NPN (Sinking)
Strobe Start Position

Specifies when the strobe should pulse.

  • 0 = Acquisition Start (default)
  • 1 = Camera Trigger
Intensity | Specifies the effective light intensity of the connected strobe device as a percentage. (0 to 100; default = 100)

ExternalLightControl Outputs

Returns An ExternalLightControl data structure, or #ERR if any of the input parameters are invalid, an external light is not connected to the vision system or External is not selected in the Light Settings dialog.


FormatInputBuffer

Allows the user to configure the format of data that is received from the ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, ReadDeviceNetBuffer, ReadEIPBuffer, ReadModbusBuffer, ReadProfinetBuffer, ReadMC and ReadUserDataBuffer functions. For more information, see ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, ReadDeviceNetBuffer, ReadEIPBuffer, ReadModbusBuffer, ReadProfinetBuffer, ReadMC, or ReadUserDataBuffer.

When FormatInputBuffer is selected from the Insert Function Dialog, the Format Input Buffer dialog is automatically opened and used to program the function.

FormatInputBuffer Inputs

Syntax: FormatInputBuffer(Format)

Parameter | Description
Format | Specifies the Data Type, and Element Size (in bytes) to automatically configure. Note: The maximum length for input data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for input data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for input data is 128 bytes. The maximum length for all other communications is 256 bytes.

FormatInputBuffer Outputs

Returns

A Buffer data structure containing the formatted data or #ERR if any of the input parameters are invalid.


FormatOutputBuffer

Allows you to configure the format of data that is sent to the WriteCCLinkBitBuffer, WriteCCLinkWordBuffer, WriteDeviceNetBuffer, WriteEIPBuffer, WriteModbusBuffer, WriteProfinetBuffer, WriteMC and WriteResultsBuffer functions. For more information, see:

  • WriteCCLinkBitBuffer
  • WriteCCLinkWordBuffer
  • WriteDeviceNetBuffer
  • WriteEIPBuffer
  • WriteModbusBuffer
  • WriteProfinetBuffer
  • WriteMC
  • WriteResultsBuffer

When FormatOutputBuffer is selected from the Insert Function Dialog, the Format Output Buffer dialog is automatically opened and used to program the function.

FormatOutputBuffer Inputs

Syntax: FormatOutputBuffer(WithErr,Format,Value1,Value2,...)

Parameter Description

WithErr

Specifies whether the function returns a valid buffer, even if an input error has occurred.

0 = Data is put in the buffer even if an input error has occurred (default).

1 = Function returns #ERR and no data is stored in the buffer.

Format

Specifies the Data Type and Element Size (in bytes) to automatically configure.

Note:

  • The maximum length for output data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for output data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for output data is 128 bytes. The maximum length for all other communications is 256 bytes.

  • The function supports a maximum of 248 characters in the formula. An individual 16-bit integer is 3 characters, thus, when using 16-bit integers, the maximum length for output data is 140 bytes. Exceeding this limit will result in the function returning an "Error String too long." If the output data exceeds 140 bytes, use the CombineOutputBuffers function. For more information, see CombineOutputBuffers.

Value

Specifies a variable-length list of values.

FormatOutputBuffer Outputs

Returns

A Buffer data structure containing the formatted data or #ERR if any of the input parameters are invalid.


ImportData

ImportData is a function that automatically inserts a Cell Data (.CXD) file into the spreadsheet when a predetermined event in the spreadsheet indicates that the file is to be loaded. With the Import Data function, data (stored as a .CXD file) that was exported through the ExportData function is imported, one cell at a time, from one of the following locations:

  • The flash memory of a local or networked In-Sight sensor.
  • A central server via FTP. For more information, see File Transfer Protocol (FTP).
  • The RAM Disk or SD Card of a local or networked sensor. For more information, see RAM Disk Settings Dialog and SD Card Folder.

When a .CXD file is imported using the ImportData function, the data becomes a part of the ImportData function and cannot be edited; when you click on an imported .CXD file, the ImportData property sheet will be opened and not the property sheet for the type of data that was imported. ImportData is able to import the following data types:

  • DelayLine: For more information, see DelayLine.
  • CountPassFail: For more information, see CountPassFail.
  • Calibrate: For more information, see Calibrate.
  • CalibrateAdvanced: For more information, see CalibrateAdvanced.
  • FindPatterns: For more information, see FindPatterns.
  • OCRMax: For more information, see OCRMax.
  • OCRMaxSettings: For more information, see OCRMaxSettings.
  • TrainPatMaxPattern: For more information, see TrainPatMaxPattern.
  • TrainFont: For more information, see TrainFont.
Note: The ImportData function cannot import .CXD files from the Snippets folder on the PC. For more information, see Palette: Spreadsheet View.

ImportDataInputs

Syntax: ImportData(Event,Host Name,User Name,Password,File Name)

Parameter Description

Event

Specifies the update event on which to read data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Host Name

Indicates the location where the file is saved. The file can be stored on a local sensor via the flash memory, an external server via FTP, the RAM Disk or SD Card of a local or networked sensor.

Note:
  • The Host Name drop-down does not list Host Names of In-Sight vision systems and/or emulators on the network. Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.
  • If importing data from flash memory, RAM Disk or SD Card, the Host Name field must be left blank(e.g. ""). If an FTP server is specified as the destination, and the FTP server is unavailable at the time of the data transfer, it will take several seconds to timeout; In-Sight Explorer may disconnect from the sensor if this occurs.

User Name

Specifies the user name that will access the file system of the sensor or device where the file is stored.

Password

Specifies the password that will access the file system of the sensor or device where the file is stored.

Note: The Host Name, User Name and Password parameters are only required for FTP destinations.

File Name

Specifies the name for the file used to identify the information being stored.

  • When importing from RAMDisk, the File Name must include "ramdisk/" before the name of the file (e.g. "ramdisk/PartXPattern"; the spelling of RAMDisk in this instance is not case sensitive). For more information, see RAM Disk Settings Dialog.
  • When importing from SD Card, the File Name must include "sdcard/" before the name of the file (e.g. "sdcard/PartXPattern"; the spelling of SD Card in this instance is not case sensitive). For more information, see In-Sight Files.
Note: Inserting the file name extension is not required; it is automatically appended to the string. If a different file name extension is inserted, In-Sight will return a #ERR.

ImportDataOutputs

The imported data will correspond to the data structure of the data contained in the exported cell. For example, if an integer is imported, the cell will display the integer value; if a Calib structure is imported, the cell will display the Calib structure. But, when you double-click on the Calib structure, the ImportData property sheet will open, and not the Calib structure's property sheet.

ImportData will import a .CXD file if one of the following four conditions is met:

  • The OKbutton on the ImportData property sheet is pressed.
  • An Event is received. For more information, see Event.
  • The ImportData Event parameter is ON (or points to a non-zero numeric value), and any one of the ImportData input parameters is updated.
  • A job with an ImportData function is loaded.
Note: ImportData will import data even while in Offline mode.

ImportData Example

ImportData(A0,"192.168.0.100","admin","","PartXPattern")

Whenever the spreadsheet updates after an image acquisition, the function imports the data, as a file named PartXPattern.cxd, from the server located at the IP address 192.168.0.100. The user name is specified as admin, and the password is left blank.


IntegratedLightControl

Allows the user to configure light settings for the integrated illumination accessory connected to the front of the In-Sight 7000 Gen2 series vision system's faceplate. The available function inputs vary depending on the type of lighting device connected to the vision system: the In-Sight illumination accessory, DataMan standard illumination accessory or DataMan high-powered illumination accessory.

Note:
  • An illumination accessory must be connected to the front of the vision system's faceplate and Integrated must be selected within the Light Settings dialog or the function will return #ERR. For more information, see Light Settings.
  • If the IntegratedLightControl function is inserted into the spreadsheet and you attempt to modify settings in the Light Settings dialog, the settings specified in the dialog will be overwritten by the spreadsheet function.
  • If multiple instances of the IntegratedLightControl function exist within a job, the illumination accessory will use the settings specified by the most recently executed instance of the function.
  • The In-Sight 7000 Gen2 series vision system supports connecting an integrated illumination accessory to the vision system's faceplate and connecting an external light to the vision system's LIGHT connector, but does not support using both lighting devices simultaneously. For a complete list of supported accessories, refer to the In-Sight® 7000 Gen2 Series Vision System Reference Guide.

In-Sight Illumination Inputs

Syntax: IntegratedLightControl(Event,North Bank,East Bank,West Bank,South Bank,Unused,Unused,Unused,Unused,Intensity,Always On)

Parameter | Description

Event

Specifies the event that forces an update.This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A numeric value.
North Bank

The In-Sight illumination accessory includes 8 LEDs that are separated into 4 LED banks.

  • 0 = The LED bank is off.
  • 1 = The LED bank is on. (default)
East Bank
West Bank
South Bank
Unused | Not supported. Set to 1 by default.
Unused
Unused
Unused
Intensity

Specifies the effective intensity of the illumination accessory LED banks as a percentage. All LED banks share a common intensity value and the intensity is limited to 50% - 100% to ensure it is evenly distributed across all LED banks. (50% to 100%; default = 100%)

The In-Sight illumination accessory has a maximum strobe pulse width that is dependent on the Intensity, LED ring light color, vision system resolution and number of rows acquired. Up to a certain Exposure time, the illumination accessory will illuminate for the specified Exposure time. If the Exposure time exceeds the maximum strobe pulse width, the LED ring light will only illuminate for the maximum strobe pulse width. For example:

LED Ring Light Color | Intensity | Maximum Strobe Pulse Width (ms)
 |  | In-Sight 7500, 7600, 7800, 7900 800 x 600 | In-Sight 7500, 7600, 7800, 7900 640 x 480 | In-Sight 7501, 7801, 7901 1280 x 1024 | In-Sight 7802, 7902 1600 x 1200 | In-Sight 7802, 7902 800 x 600 (Low Light Mode) | In-Sight 7905 2448 x 2048
White | 100% | 0.314 | 0.232 | 0.704 | 1.022 | 1.022 | 1.599
 | 50% | 0.779 | 0.574 | 1.744 | 2.531 | 2.531 | 3.961
Red | 100% | 0.375 | 0.277 | 0.841 | 1.220 | 1.220 | 1.847
 | 50% | 1.083 | 0.799 | 2.426 | 3.519 | 3.519 | 5.508
IR | 100% | 0.351 | 0.259 | 0.786 | 1.140 | 1.140 | 1.785
 | 50% | 0.857 | 0.632 | 1.921 | 2.787 | 2.787 | 4.361
Blue | 100% | 0.314 | 0.232 | 0.704 | 1.022 | 1.022 | 1.599
 | 50% | 0.765 | 0.564 | 1.713 | 2.485 | 2.485 | 3.889
LED Ring Light Color | Intensity | Maximum Strobe Pulse Width (ms)
 |  | In-Sight 7600C, 7800C, 7900C 800 x 600 | In-Sight 7600C, 7800C, 7900C 640 x 480 | In-Sight 7801C, 7901C 1280 x 1024 | In-Sight 7802C, 7902C 1600 x 1200 | In-Sight 7802C, 7902C 800 x 600 (Low Light Mode) | In-Sight 7905C 2448 x 2048
White | 100% | 0.314 | 0.232 | 0.704 | 1.022 | 1.022 | 1.599
 | 50% | 0.779 | 0.574 | 1.744 | 2.531 | 2.531 | 3.961
Note:
  • At Exposure times greater than the maximum strobe pulse width, a lower Intensity may result in brighter images, due to increased LED efficiency at a lower current.
  • For the following vision systems/sensors, the resolution can be configured in the Image Settings dialog: In-Sight Micro 1500, In-Sight 2000-130, 2000-130C, 2000-230, 2000-230C, 2000-23M, 2001-230, 2001-230C, In-Sight 7500, 7600, 7600C, 7800, 7800C, 7900, 7900C, 7802, 7802C, 7902, 7902C.
Always On The selected LED banks are always on to provide consistent light levels between acquisitions.
  • 0 = OFF
  • 1 = ON (default)

DataMan Standard Illumination Inputs

Note: DataMan Standard Illumination and DataMan High-Powered Illumination accessories are not supported with the In-Sight 7905 or 7905C.

Syntax: IntegratedLightControl(Event,West Inside Bank,West Outside Bank,North Inside Bank,North Outside Bank,East Inside Bank,East Outside Bank,South Inside Bank,South Outside Bank,Intensity,Always On)

Parameter | Description

Event

Specifies the event that forces an update.This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A numeric value.
West Inside Bank

The DataMan standard illumination accessories includes 36 LEDs that are separated into 8 LED banks.

  • 0 = The LED bank is off.
  • 1 = The LED bank is on. (default)
West Outside Bank
North Inside Bank
North Outside Bank
East Inside Bank
East Outside Bank
South Inside Bank
South Outside Bank
Intensity

Specifies the effective intensity of the illumination accessory LED banks as a percentage. All LED banks share a common intensity value. (0% to 100%; default = 100%)
Always On | Not supported. Set to 0 by default.

DataMan High-Powered Illumination Inputs

Note: DataMan Standard Illumination and DataMan High-Powered Illumination accessories are not supported with the In-Sight 7905 or 7905C.

Syntax: IntegratedLightControl(Event,West 1 Bank,West 2 Bank,North 1 Bank,North 2 Bank,East 1 Bank,East 2 Bank,South 1 Bank,South 2 Bank,Intensity,Always On)

Parameter | Description

Event

Specifies the event that forces an update.This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A numeric value.
West 1 Bank

The DataMan high-powered illumination accessories include 8 LEDs, all of which are individually addressable as their own LED bank.

  • 0 = The LED bank is off.
  • 1 = The LED bank is on. (default)
West 2 Bank
North 1 Bank
North 2 Bank
East 1 Bank
East 2 Bank
South 1 Bank
South 2 Bank
Intensity | Not supported. Set to 100 by default.
Always On | Not supported. Set to 0 by default.

IntegratedLightControl Outputs

Returns

An IntegratedLightControl data structure, or #ERR if any of the input parameters are invalid.


LocalStorage Functions

LocalStorage functions write image and data files to a file on the SD card installed to the In-Sight vision system while Online. For more information, see In-Sight Files.

  • WriteImageLocal: Writes the current image to the SD card installed to the In-Sight vision system while Online.
  • WriteLocal: Writes a data file or appends a data string to a file on the SD card installed to the In-Sight vision system while Online.

WriteImageLocal

WriteLocal


WriteImageLocal

Writes the current image to the SD card installed to the In-Sight vision system while Online. Optionally, an SVG file may be created, which includes the overlay graphics on top of the image. This function is typically used to automatically save images of failed inspections during runtime.

Note:
  • The function requires the In-Sight vision system to be Online to send images and SVG files.
  • If you are logged on to an In-Sight vision system remotely, the screen image may not be refreshed with every image acquisition when using the function.
  • If an AcquireImage function parameter is modified while the vision system is Online, the function will send the current image.

WriteImageLocal Inputs

Syntax: WriteImageLocal(Event,Image,File Name,Max Append Value,Reset,Data Format,Save Graphic Overlays,Resolution)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Image

A reference to a cell containing an Image data structure. The default reference is to the Image data structure in cell A0.

File Name

The name of the image file to write. It also defines the name of the SVG file, if the Save Graphic Overlays parameter is enabled. Long file names are supported, including a numeric counter that can be appended to the file name as each file is written (up to the specified Max Append Value).

Max Append Value

The maximum number (0 to 9999999; default = 999) of unique image files that can be written using the specified File Name. A counter will be added to the end of the specified File Name and will increment itself as each image file is written. The counter automatically resets itself when it equals the Max Append Value; existing image files on the target system will be overwritten by new files of the same name.

The number of digits in the counter will be equal to the number of digits in the Max Append Value. For example, the default Max Append Value '999' will always cause 3 digits to be added to the FileName. If 0 is specified, then no counter will be appended to the File Name.

Reset

Restarts the counter that is appended to the specified File Name for both image and SVG files. Existing image files and SVG files on the target system will be overwritten by new files of the same name.

0 = OFF (default) | The counter will continue to increment as each image is written out, up to the Max Append Value.
1 = ON | The counter will reset to 0.

Data Format

The file format of the image that will be written out to the target host.

0 = BMP (default) | Windows bitmap format (.BMP extension).
1 = JPEG | Standard encoded JPEG format (.JPG extension).

Save Graphic Overlays

Specifies whether an SVG file is created that contains overlay graphic data for supported In-Sight Vision Tools, Geometry Functions and Graphics Functions, when their Show parameter is set to display graphics. For more information, see Vision Tools, Geometry Functions and Graphics Functions. The overlay graphics uses the formatting specified by the Format Cells dialog. For more information, see Format Cells Dialog.

To view the SVG file and image file, open the SVG file with a Web browser that supports the SVG file type. The SVG file contains an internal link to the acquired image associated with it, and when the browser opens the SVG file, it follows the link to open and display the acquired image along with the overlay graphics.

Note:
  • When enabled, the SVG file will use the name specified in the File Name parameter.
  • Due to the graphics being rendered by a third-party application, such as a Web browser, the overlay graphic data will not be an exact pixel-for-pixel match.
  • In-Sight firmware does not guarantee the transmission of every SVG and image file pair. If the In-Sight vision system is overloaded, it may skip the transmission of the SVG and/or image file to ensure that inspections and/or image acquisitions are not missed.
0 = OFF (default) | Specifies that only the image will be transferred.
1 = ON | Specifies that the image and an SVG file will be transferred. When enabled, the SVG file containing the graphic overlay data will be saved into the same directory specified for the images. Use a Web browser, such as Microsoft Internet Explorer 9.0 or later, to view the graphic overlay data and images together.
Resolution

Specifies the image resolution at which the image will be exported.

1 = Full (default) | The image is exported at full resolution.
2 = Half | The image is exported at half resolution.
3 = Quarter | The image is exported at quarter resolution.

WriteImageLocal Outputs

Returns
  • An Local data structure that will write the image data contained in the specified Image data structure to a file on the target system whenever the spreadsheet is updated.
  • Returns #ERR if any input parameters are invalid, or if the SD card is not installed or is full, or if the SD card is installed but not properly formatted.

WriteImageLocal Example

WriteImageLocal($A$0,$A$0,"Image",999,0,0,0,1)

Whenever the spreadsheet updates after an image acquisition, this formula writes a bitmap image file to the SD card installed to the In-Sight vision system. The first file written would be Image000.BMP, the second Image001.BMP, and so on.

Note: A typical application would have the function be cell-state driven to save images only when a failed inspection occurs during runtime. For more information, see Cell State Dialog.


WriteLocal

Writes a data file or appends a data string to a file on the SD card installed to the In-Sight vision system. This function is typically used to log data results that can be viewed in a file.

Note: The WriteLocal function requires the In-Sight vision system to be Online.

WriteLocal Inputs

Syntax: WriteLocal(Event,File Name,Data Format,String,Append))

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

File Name

The name of the file. Long file names are supported. If the file does not exist, it will be created when the function is first executed; the default filename is "InSight".

Data Format

The type of file. The extension will automatically be appended to the File Name.

0 = TEXT | Standard ASCII Text file format (.TXT).
1 = HTML (default) | Standard HTML file format (.HTM).
4 = XML | Standard XML file format (.XML).
5 = CSV | Standard CSV file format (.CSV).

String

A text string or a reference to a cell containing a text string. The maximum string length is 255 characters.

Note:
  • When HTML is selected for the Data Format parameter, HTML tags should be used in the text string.
  • The string will not be written or appended unless it has been modified.

Append

Specifies the way in which the data is written to the file.

0 = OFF | Overwrites the existing data in the file.
1 = ON (default) | Appends the data string to the end of the file.

WriteLocal Outputs

Returns
  • An Local data structure that will write the data string contained in the String parameter to a file on the SD card installed to the In-Sight vision system, whenever the spreadsheet is updated.
  • Returns #ERR if any input parameters are invalid, or if the SD card is not installed or is full, or if the SD card is installed but not properly formatted.

WriteLocal Example

WriteLocal($A$0,"InSight",0,"Test String",1)

Whenever the spreadsheet updates after an image acquisition, this formula writes a txt file to the SD card installed to the In-Sight vision system. Within the text file, the text message "Test String" is written.


Machine Status Functions

Machine Status functions store the operational status information of an In-Sight vision system.

  • PushMSStack: Shifts the entire contents of each buffer to the next buffer in the Machine Status Stack.
  • WriteMSStack: Appends the user-specified string from the spreadsheet to the operational status information in the first buffer of the Machine Status Stack.

PushMSStack

WriteMSStack


PushMSStack

Shifts the entire contents of each buffer to the next buffer in the Machine Status Stack. For more information, see Sensor Status View.

To append user-specified information to the operational status information in buffer 0 of the machine status stack, use the WriteMSStack function. Data stored in the stack is accessed using the GetMSBuffer command over a Native Mode connection or from the Machine Status Port. For more information, see WriteMSStack, GetMSBuffer, or Machine Status Port.

Note: When all buffers of the stack are full, the data in buffer 7 is discarded.

PushMSStack Inputs

Syntax: PushMSStack(Event)

Parameter Description

Event

Specifies the update event on which to shift operational status information in the Machine Status Stack. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

PushMSStack Outputs

Returns

An MSStack data structure, or #ERR if the input Event is invalid.

For more information, see Event, Sensor Status View, or Input/Output Functions.


WriteMSStack

Appends a user-specified string from the spreadsheet to the operational status information in buffer 0 of the Machine Status Stack whenever the spreadsheet is updated. For more information, see Sensor Status View.

To shift the entire contents of each buffer to the next buffer in the Machine Status Stack, use the PushMSStack function. For more information, see PushMSStack.

Data stored in the stack is accessed using the GetMSBuffer command over a Native Mode connection or from the Machine Status Port. For more information, see GetMSBuffer and Machine Status Port.

Note: Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.

WriteMSStack Inputs

Syntax: WriteMSStack(Event,String)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

String

A string or a reference to a cell containing a string. The maximum string length is 255 characters, including characters used as delimiters. For example, comma (,), semicolon (;), Carriage Return/Line Feed (CRLF), etc. User-defined XML tags can also be included in the string.

WriteMSStack Outputs

Returns

An MSStack data structure containing the text to append, or #ERR if the input String is invalid.


Message Functions

Message functions read text strings from an In-Sight vision system and write text strings to an In-Sight vision system over a Native Mode connection.

  • ReadMessage: Reads in a text string sent by a remote network host or serial device using the Send Message command.
  • WriteMessage: Writes out a text string whenever ReadMessage is executed. WriteMessage outputs the string over the same connection that is used by the ReadMessage function.

ReadMessage

WriteMessage


ReadMessage

Reads a string sent from the SendMessage command using a NativeMode connection.The function reads the string on each occurrenceof the specified event.For more information, see Send Message.

Note: If the NativeMode connection is over a serial port, the serial port Modemust be set to Native.For more information, see Serial Port Settings Dialog.

ReadMessageInputs

Syntax: ReadMessage(Event)

Parameter Description

Event

Specifies the update event on which to readthe string. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

ReadMessageOutputs

Returns

A Message data structure containingthe text string read, or #ERR if the input Eventvalue is invalid.


WriteMessage

Writes a text string out over a Native Mode connection whenever the spreadsheet is updated. WriteMessage outputs the string over the same connection that is used by the ReadMessage function. For more information, see Motoman Communications and ReadMessage.

Note:
  • A ReadMessage function must be inserted in the spreadsheet in order to establish the Native Mode connection.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.

WriteMessage Inputs

WriteMessage(Event,String)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

String

A string, or a reference to a cell containing a string. The maximum string length is 255 characters.

WriteMessage Outputs

Returns

A Message data structure containing the string to write, or #ERR if the input String value is invalid.


Network Functions

Most Network functions are used to share data between In-Sight sensors and other TCP/IP devices on a network. An additional function, WriteImageFTP, provides a method for automatically saving images to a network storage device using an FTP server.

  • ClearResultsBuffer: Clears any buffered results from a factory protocol results buffer after a specified event.
  • GetByteCount: Returns the number of bytes written to a FormatOutputBuffer, ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, ReadEIPBuffer, ReadLatchedUserDataBuffer, ReadModbusBuffer, ReadProfinetBuffer or ReadUserDataBuffer function.
  • GetConnectionStatus: Returns the connection status of the specified protocol.
  • GetRemoteAddress: Returns the last IP address from which the UDP server received a message.
  • GetRemotePort: Returns the last client's port number from which the UDP sever received a message.
  • Packet: Defines the binary string packet format to be read or sent by the TCPDevice function.
  • QueryDevice: Writes data out to a specified TCP/IP client device, then reads the data back from that device.
  • ReadCCLinkBitBuffer: Reads (consumes) data sent by a Mitsubishi PLC and Motion Controller (MC) using CC-Link communications.
  • ReadCCLinkWordBuffer: Reads (consumes) data sent by a Mitsubishi PLC/MC using CC-Link communications.
  • ReadDevice: Imports data to an In-Sight sensor from a TCP/IP client device.
  • ReadEIP: Reads (consumes) data produced by a client using EtherNet/IP protocol. EtherNet/IP is an application-level protocol implemented on top of Ethernet and TCP/IP protocols, allowing the transfer of data in industrial environments over the Ethernet. For more information on the EtherNet/IP protocol, go to odva.org.
  • ReadEIPBuffer: Reads (consumes) data sent by a remote client using EtherNet/IP protocol to a referenced Buffer structure created by the FormatInputBuffer function.
  • ReadLatchedUserDataBuffer: Reads data contained in a FormatInputBuffer function, when in a buffered acquisition mode.
  • ReadMC: Reads (consumes) data sent by a Mitsubishi PLC/MC using SLMP communications.
  • ReadModbusBuffer: Reads (consumes) data sent by a remote client using Modbus protocol.
  • ReadProfinetBuffer: Reads (consumes) data sent by a remote client using Profinet protocol to a referenced Buffer structure created by the FormatInputBuffer function.
  • ReadResult: Imports values from a networked In-Sight sensor (the "sender").
  • ReadUserDataBuffer: Reads (consumes) data in the User Data field of the currently enabled factory protocol.
  • TCPDevice: Defines an In-Sight spreadsheet cell as a TCP/IP device (client or server).
  • UDPDevice: Defines a single connection to communicate with another networked device over User Datagram Protocol (UDP).
  • WriteCCLinkBitBuffer: Writes data to a Mitsubishi PLC/MC using CC-Link communications.
  • WriteCCLinkWordBuffer: Writes data to a Mitsubishi PLC/MC using CC-Link communications.
  • WriteDevice: Exports data from an In-Sight sensor to a TCP/IP server device.
  • WriteEIP: Writes data at the specified Request Packet Interval (RPI) for client devices to read (consume) using EtherNet/IP protocol.
  • WriteEIPBuffer: Writes data to a referenced Buffer structure created by the FormatOutputBuffer function at the specified Request Packet Interval (RPI) for client devices to read (consume) using EtherNet/IP protocol.
  • WriteFTP: Appends a string to a specified file on an FTP server on the network.
  • WriteImageFTP: Writes the current image to a target system running an FTP server.
  • WriteImageSFTP: Writes the current image to a target system running an SFTP server.
  • WriteMC: Writes data to a Mitsubishi PLC/MC using SLMP communications.
  • WriteModbusBuffer: Writes data from a referenced Buffer structure, created by the FormatOutputBuffer function, making it available to a remote client device using the Modbus protocol.
  • WriteProfinetBuffer: Writes data to a referenced Buffer structure created by the FormatOutputBuffer function at the specified Request Packet Interval (RPI) for client devices to read (consume) using Profinet protocol.
  • WriteResult: Exports values to a networked In-Sight sensor (the "receiver").
  • WriteResultsBuffer: Writes data to a referenced Buffer structure created by the FormatOutputBuffer function for client devices to read (consume) by any enabled factory communication protocol.
  • WriteSMTP: Sends an email message by way of an SMTP server.

ClearResultsBuffer

GetByteCount

GetConnectionStatus

GetRemoteAddress

GetRemotePort

Packet

QueryDevice

ReadCCLinkBitBuffer

ReadCCLinkWordBuffer

ReadDevice

ReadEIP

ReadEIPBuffer

ReadLatchedUserDataBuffer

ReadMC

ReadModbusBuffer

ReadProfinetBuffer

ReadResult

ReadUserDataBuffer

TCPDevice

UDPDevice

WriteCCLinkBitBuffer

WriteCCLinkWordBuffer

WriteDevice

WriteEIP

WriteEIPBuffer

WriteFTP

WriteImageFTP

WriteImageSFTP

WriteMC

WriteModbusBuffer

WriteProfinetBuffer

WriteResult

WriteResultsBuffer

WriteSMTP


ClearResultsBuffer

Clears any buffered results from a factory protocol results buffer after a specified event. When the function receives the specified event, the following occurs:

  • All the results queued in the results buffer will be removed (if results buffering is enabled).
  • The current results being reported over the currently enabled factory protocol will be cleared (including the result ID, result code and all result data).
  • The results valid bit will be cleared.

After the ClearResultsBuffer function executes, additional results may be queued, using the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Note: While clearing the results buffer, the vision object will be locked, therefore any communications between the In-Sight vision system and the PLC over the factory communication protocol will be delayed until the action of clearing the results is complete.

ClearResultsBuffer Inputs

Syntax: ClearResultsBuffer(Event)

Parameter Description

Event

Specifies the spreadsheet event that triggers the data to be cleared from the results buffer. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

ClearResultsBuffer Outputs

Returns

A value of 1; returns #ERR if the input parameter is invalid.

ClearResultsBuffer Example

The ClearResultsBuffer function is used to clear the results buffer of the PROFINET factory communication protocol, when the In-Sight vision system transitions from Offline to Online.

  1. To begin, the PLC enables results buffering.

  2. Next, the PLC triggers an acquisition.

  3. The In-Sight vision system responds by acquiring the image and sending the results into the Results Buffer using the WriteResultsBuffer function.

  4. The PLC triggers another acquisition.

  5. Again, the In-Sight vision system responds by acquiring the image and sending the results into the Results Buffer using the WriteResultsBuffer function.

  6. Something occurs on the line and the production machine needs to be reset.

  7. The PLC triggers an Event in the spreadsheet to reset the state of the In-Sight vision system.

    Note: There are also two possible variations. In one of the variations, the PLC triggers an Online -> Offline -> Online transition to reset the state of the vision system. In this scenario, the spreadsheet must be programmed with an Online event that triggers the ClearResultsBuffer function. In the second variation, the PLC triggers a soft event to reset the state of the vision system. In this scenario, the spreadsheet must be programmed with an Event function that triggers the ClearResultsBuffer function when the soft event is triggered.
  8. The vision system clears the results buffer, using the ClearResultsBuffer function, and the results queued in step number 5 are removed from the queue.
  9. All of the result values are reset to 0, including data, result code and result ID.


Input/Output

Function

Description
GetBinaryString(BitStream)

Returns the BitStream data structure as a list of binary digits.

Note: The returned string is for reference purposes, only. In-Sight firmware does not support binary as a number format.

GetBufferData(ReadBuffer, Index)

Returns the indexed data from a UserData, ReadDeviceNet, ReadEIP, ReadPNIO, or a ReadModbus data structure.

Note:
  • The ReadDeviceNet, ReadEIP, ReadPNIO, and ReadModbus data structures are only supported on In-Sight vision systems running firmware 4.9.3 and earlier. These data structures are not supported on vision systems running In-Sight 5.1.0 or later firmware.
  • The Event parameter for the ReadDeviceNet function must reference a cell containing the Event function. That Event function's Trigger parameter must specify Serial Port 0 or Serial Port 1, depending on the value of the ReadDeviceNet function's Port parameter. For more information, see ReadDeviceNet and Event.
GetByteCount(Buffer) | Returns the number of bytes that have been written into a FormatOutputBuffer function or read into a ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, ReadEIPBuffer, ReadLatchedUserDataBuffer, ReadModbusBuffer, ReadProfinetBuffer or ReadUserDataBuffer function. For more information, see FormatOutputBuffer.

GetClock(Time, Format String, [Local/GMT])

Returns the current date and time as a string constructed using a "C" library standard Format-string from a Time data structure, which is returned by the Now function.

Format String

Specifies the format for the display of the date and time. The default Format String is: month/day/year hour:minute:second, which is represented as: %m/%d/%Y %H:%M:%S

The following variables are allowed:

%m | month
%d | day
%Y | year
%H | hour
%M | minute
%S | second
%3N | millisecond
%6N | microsecond
%9N | nanosecond
Local/GMT

0 = Local with Daylight Saving Time (default)

1 = GMT (UTC)

2 = Local with Standard Time
GetConnectionStatus(Event, Protocol)

Returns the connection status of the specified communication protocol.

  • If the protocol is functioning, but has no active connections, the function will return 0.
  • If the protocol is functioning and has active connections, the function will return the number of active connections.
  • If the connection has failed, the function will return #ERR, and the GetErrorCode and GetErrorString functions can be used to determine the cause of the error. For more information, see GetErrorCode and GetErrorString.

The Event parameter should reference an Event function that is set to capture the Network Error event, or to the AcquireImage function in cell A0. For more information, see Event.

The Protocol parameter is used to define which protocol will be polled for a status update:

  • 0 = EtherNet/IP
  • 1 = PROFINET
  • 2 = SLMP Scanner
  • 3 = Modbus TCP Server
  • 4 = CC Link
  • 5 = DeviceNet
  • 6 = POWERLINK
  • 8 = CC-Link IE Field Basic
  • 100 = The currently enabled industrial factory protocol
Note: CC Link and DeviceNet are not supported by this function. An “Argument Out of Range” error will be returned if these are selected.

GetFilename(FTP)

Returns the filename from an FTP data structure.
GetHexString(BitStream)

Returns the bits contained in a BitStream data structure as a hex string, with the standard "0x" prefix. The hex string is ordered so that the most significant nibble is first.

Note: If the number of bits is not a multiple of four, the zeroes are padded in the most significant position, which effectively groups the bits into nibbles, from right to left.
Closed Example - Hex Number Padding
Bits | With Padding | Hex
1 | 1000 | 1
11 | 0011 | 3
111 | 0111 | 7
1111 | 1111 | F
1 1111 | 0001 1111 | 1F
11 1111 | 0011 1111 | 3F
111 1111 | 0111 1111 | 7F
1111 1111 | 1111 1111 | FF
GetNumBits(BitStream) | Returns the total number of bits contained in a BitStream data structure.
GetNumWaveformsPending(Event)

Returns the total number of WriteWaveformPulseTrain or WriteWaveformClocked waveforms currently executing or queued for execution, or zero (0) if no waveform is currently being executed. Once this value equals zero (0), any new waveform will immediately execute; if this value is not zero (0), waveforms will be queued or dropped, depending on the applied settings and queue space. For more information, see WriteWaveformPulseTrain and WriteWaveformClocked.

Note: There is one single waveform queue, therefore this function does not use a WriteWaveformPulseTrain or WriteWaveformClocked function as an input. Instead, this function uses an event (such as a Button function or AcquireImage, for example) to update the function periodically.
GetRemoteAddress(Device) | Returns the IP address of the device from which the UDP server received the last message. Device specifies a reference to a Device data structure returned by a UDPDevice function.
GetRemotePort(Device) | Returns the Port Number of the device from which the UDP server received the last message. Device specifies a reference to a Device data structure returned by a UDPDevice function.

GetResult(Result, Index)

Returns an indexed value from a Result data structure.


Packet

Defines the binary string packet format to be read or sent by the TCPDevice function. For more information, see TCPDevice.

Packet Inputs

Syntax: Packet(Length Location,Length Size,Endianness,Length Adjustment,Buffer Size,Format String)

Parameter Description

Length Location

Specifies the location of the length field (0 to 4096).

Length Size

Specifies the number of bytes used for the length field (0, 1, 2 or 4).

Note: Setting the Length Size parameter to 0 specifies that the packet will have a fixed length, and no length field will be written to the packet. If the Length Size parameter is set to 0, the Length Location parameter must also be set to 0, and the Length Adjustment parameter must be set to the desired length of the packet.

Endianness

Specifies the order that the sequence of bytes are stored.

0 = Big Endian (default) | Specifies that the most significant value is stored first.
1 = Little Endian | Specifies that the least significant value is stored first.

Length Adjustment

Specifies the number of bytes by which the packet length (specified in the length field) is adjusted (–4096 to 4096).

Buffer Size

Specifies the amount of memory to be allocated to store the data (16 to 4096).

Format String

Constructs a string using a specified format.

Available Format-string parameters:

Parameter | Description
%c | 1 byte
%h | 2 byte
%d | 4 byte
%f | 4 byte float
%b | Binary structure
%s | String

Packet Outputs

Returns

A Packet data structure, or #ERR if any of the input parameters are invalid.


QueryDevice

Writes data to either a specified TCP/IP server device or a UDP server device, then reads the data back from that device. The response from the device must be received before the device's Timeout limit is reached.

Note: The primary use of this function is to retrieve binary data packets from a Modbus server. For more information, see Binary Text Functions or Modbus TCP Communications.

QueryDevice Inputs

Syntax: QueryDevice(Event,Device,Data)

Parameter Description

Event

Specifies the spreadsheet event that triggers the data to be written to the TCP/IP device. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Device

A reference to a Device structure, which must be a TCP/IP client, created by a TCPDevice, or a reference to a Device structure returned by a UDPDevice function. For more information, see TCPDevice or UDPDevice.

Data

The data to be written to the TCP/IP or UDP device. For the TCP/IP implementation, the data type must be of the same type specified in the device's Packet Type: either an ASCII string or a binary Modbus command. For the UDP implementation, the data type must be of the same type specified in the Binary Packet parameter: either binary data packets or string information. For more information, see Packet Type or Binary Packet.

QueryDevice Outputs

Returns

A Query data structure, or #ERR if any of the input parameters are invalid.

For more information, see Input/Output Functions, Binary Text Functions, ReadDevice, or WriteDevice.


ReadCCLinkBitBuffer

Reads data from a referenced Buffer data structure, created bya FormatInputBuffer function,from the CC-Link network using the CC-Link protocol upon on an Event trigger.For more information, see FormatInputBuffer and Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an In-Sight CIO-MICRO-CC I/O Module.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The In-Sight vision system must be connected to an In-Sight CIO-MICRO-CC I/O module to enable this functionality. For more information, see I/O Module Configuration.
  • When an In-Sight vision system is configured to communicate with a Mitsubishi Automation Controller over CC-Link, the protocol only supports the transfer of data between the vision system and the automation controller.

ReadCCLinkBitBuffer Inputs

Syntax: ReadCCLinkBitBuffer(Event,Buffer)

Parameter Description

Event

Specifies the event on which to read thespecified Buffer structure. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structurecreated by a FormatInputBufferfunction, which contains automatically formatted data.

Note: The maximum length for output data is 256 bytes.

ReadCCLinkBitBuffer Outputs

Returns

A Buffer structure which contains the read data and the format; or #ERR:

  • Ifan input parameter is invalid.
  • Ifthe In-Sight vision system is not connected to an In-Sight CIO-MICRO-CC I/O module.
  • If an item in the FormatInputBuffer function has a Data Type other than Bit or 16 Bit Integer.


ReadCCLinkWordBuffer

Reads data from a referenced Buffer data structure, created by a FormatInputBuffer function, from the CC-Link network using the CC-Link protocol upon on an Event trigger. For more information, see FormatInputBuffer and Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an In-Sight CIO-MICRO-CC I/O Module.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The In-Sight vision system must be connected to an In-Sight CIO-MICRO-CC I/O module to enable this functionality. For more information, see I/O Module Configuration.
  • When an In-Sight vision system is configured to communicate with a Mitsubishi Automation Controller over CC-Link, the protocol only supports the transfer of data between the vision system and the automation controller.

ReadCCLinkWordBuffer Inputs

Syntax: ReadCCLinkWordBuffer(Event,Buffer)

Parameter Description

Event

Specifies the event on which to read the specified Buffer structure. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structure created by the FormatInputBuffer function, which contains automatically formatted data.

Note: The maximum length for output data is 256 bytes.

ReadCCLinkWordBuffer Outputs

Returns

A Buffer data structure which contains the data read and its format; or #ERR:

  • If an input parameter is invalid.
  • If the In-Sight vision system is not connected to an In-Sight CIO-MICRO-CC I/O module.
Results Data in the Buffer data structure is accessed using the GetBufferData function. For more information, see Input/Output.


ReadDevice

Imports data into an In-Sight vision system from another host on the network using a TCP/IP or UDP connection. For more information, see TCPDevice and UDPDevice.

Note:
  • To establish a TCP/IP device connection between two In-Sight vision systems, both devices must be Online.
  • When ReadDevice is configured to communicate via UDP, there is no buffering; if another data packet arrives before the last one was processed, the new packet will replace the older packet.

ReadDevice Inputs

Syntax: ReadDevice(Device)

Parameter | Description
Device | A reference to a spreadsheet cell containing a Device data structure created by a TCPDevice or UDPDevice function.

ReadDevice Outputs

Returns

The data that is imported from the TCP/IP or UDP client whenever a connection is established, or #ERR if a cell is referenced that does not contain a valid Device data structure, or the when the received message is greater than the default buffer size of a UDP message (256 bytes).


ReadEIP

Reads (consumes) data sent by a remote client using EtherNet/IPprotocol.EtherNet/IP is an application-level protocol implemented on top of Ethernet and TCP/IP protocols, allowing the transfer of data in industrial environments over the Ethernet. For more information on the EtherNet/IP protocol, go to odva.org.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, an error message will be displayed, because this function is not present in In-Sight 5.1.0 or later firmware.This function should be replaced by the ReadUserDataBuffer function.Formore information, see ReadUserDataBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Althoughan In-Sight vision system can communicate with more than one device at the sametime using EtherNet/IP protocol, it is not recommended to have more thanone connection at a time.
  • In-Sight vision systems support both Explicit and Implicit EtherNet/IP messaging.Formore information, see In-Sight Assembly Data Configuration (Implicit Messaging). Closed See Example.

    ReadEIP($A$0,"0d:4d:8s") in cell A4, reads 2 32 bit integers and anull terminated string from the PLC.

    GetBufferData($A$4,0) displays the first 32 bit integer.

    GetBufferData($A$4,1) displays the second 32 bit integer.

    GetBufferData($A$4,2) displays the string.

  • Formore information, see Communicate with a Rockwell ControlLogix PLC.

ReadEIPInputs

Syntax: ReadEIP(Event,Mapping)

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Mapping

Specifies a data mapping, which consistsof a list of specifiers delimited by colon (:) characters.Each specifierhas two parts:

  • The starting byte.
  • A data type code.

The data typecodes are:

Code | Data Type
i | 8-bit integer
il | 16-bit integer
d | 32-bit integer
f | 32-bit floating-point number
s | Text string

Example:The data mapping, "0i:1f:5d:9s" specifies that the first dataitem (at offset 0) is an 8-bit integer; the second item (at offset 1)is a 32-bit floating-point value; the third (at offset 5) is a 4-bytesigned integer; and the rest of the packet (starting at offset 9) is astring.

Note: When using the Input Assembly Instance 12 included within the Major Revision 10, the maximum length for input data is 488 bytes.When using the Input Assembly Instance 11 included with the In-Sight Major Revision 4, the maximum length for input data is 492 bytes.

ReadEIPOutputs

Returns | A ReadEIP data structure containingthe data sent by a client.Or, #ERR if any input parameters are invalidor a connection from a client has not been established.
Results | Data in the ReadEIP structure isaccessed using the GetBufferDatafunction.For more information, see Input/Output.


ReadEIPBuffer

Reads (consumes) data sent by a remote client using EtherNet/IPprotocol.EtherNet/IP is an application-level protocol implemented on top of Ethernet and TCP/IP protocols, allowing the transfer of data in industrial environments over the Ethernet. For more information on the EtherNet/IP protocol, go to odva.org.

The referenced Buffer data structure, which is created by a FormatInputBufferfunction, defines how the received data is interpreted.For more information, see FormatInputBuffer.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, it will automatically be replaced by the ReadUserDataBuffer function (the Protocol parameter will be set to Default). For more information, see ReadUserDataBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Althoughan In-Sight vision system can communicate with more than one device at the sametime using EtherNet/IP protocol, it is not recommended to have more thanone connection at a time.
  • In-Sightvision systems support both Explicit and Implicit EtherNet/IP messaging.Formore information, see In-Sight Assembly Data Configuration (Implicit Messaging). Closed See Example.

    ReadEIP($A$0,"0d:4d:8s") in cell A4, reads 2 32 bit integers and anull terminated string from the PLC.

    GetBufferData($A$4,0) displays the first 32 bit integer.

    GetBufferData($A$4,1) displays the second 32 bit integer.

    GetBufferData($A$4, 2) displays the string.

  • For more information about using the EtherNet/IP protocol with a Rockwell ControlLogix PLC, see Communicate with a Rockwell ControlLogix PLC.

ReadEIPBufferInputs

Syntax: ReadEIPBuffer(Event,Buffer)

Parameter Description

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structurecreated by a FormatInputBuffer function,which defines how the received data is interpreted.

Note: The maximum length for input data is 4,000 bytes.Formore information, see In-Sight Assembly Data Configuration (Implicit Messaging).

ReadEIPBufferOutputs

Parameter | Description
Returns | A ReadEIP data structure containingthe data sent by a client or #ERR if any input parameters are invalidor a connection from a client has not been established.
Results | Data in the ReadEIP structure isaccessed using the GetBufferDatafunction.For more information, see Input/Output.


ReadLatchedUserDataBuffer

For use with applications that require buffered acquisitions, reads (consumes) data contained in the User Data field of the currently enabled factory communication protocol (which is enabled in the Network Settings dialog), and latches the data to the acquisition trigger.The latched data is carried with the acquired image data, and is read into the Spreadsheet through this function.The referenced Buffer data structure, which is created by a FormatInputBufferfunction, defines how the received data is interpreted.For more information, see Network Settings Dialog and FormatInputBuffer.

Note: If a periodic connection is not actively writing to the data buffer on an enabled industrial protocol, the function will return the data from the last protocol to write to the data buffer.

ReadLatchedUserDataBuffer Inputs

Syntax: ReadLatchedUserDataBuffer(Event,Buffer,Protocol,Validate Connection,Byte/Word Order)

Parameter Description

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structurecreated by a FormatInputBuffer function,which defines how the received data is interpreted.

Note: The maximum length for input data is 4,000 bytes.

Protocol

Specifies which protocol the user data should be read from.

0 = EtherNet/IP

Specifies that EtherNet/IP is the enabled factory communication protocol. For more information, see EtherNet/IP Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later.For a complete list of models and supported firmware versions, see Firmware Versions.

1 = PROFINET

Specifies that PROFINET is the enabled factory communication protocol. For more information, see PROFINET Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later.For a complete list of models and supported firmware versions, see Firmware Versions.

2 = SLMP Scanner

Specifies that SLMP Scanner is the enabled factory communication protocol. For more information, see Configuring In-Sight Vision Systems for SLMP Communications.

3 = Modbus TCP Server

Specifies that Modbus TCP Server is the enabled factory communication protocol. For more information, see Modbus TCP Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware version 5.3.0 and later.For a complete list of models and supported firmware versions, see Firmware Versions.

8 = CC-Link IE Field Basic Bit

 Specifies that CC-Link IE Field Basic is the enabled factory communication protocol, and reads user data buffer from the RY bit space.For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

9 = CC-Link IE Field Basic Word

 Specifies that CC-Link IE Field Basic is the enabled factory communication protocol, and reads user data buffer from the RWw word space.For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

100 = Any (Default)

Specifies that the currently enabled factory communication protocol will be used (which is enabled via the Network Settings dialog). If more than one protocol is enabled, the first enabled protocol will be used. For more information, see Network Settings Dialog.

Validate Connection

Specifies whether or not the function will attempt to validate the connection.If enabled, the function will return #ERR if the selected protocol does not have an active cyclic connection.

Note: For EtherNet/IP it will not return #ERR unless an implicit connection was established after the last restart.When implicit messaging is not used, this allows the sensor to receive data explicitly without returning #ERR.

Byte/Word Order

Specifies the bit order for words and bytes read by the function.

Note: This parameter is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

0 = Big endian (= default for Modbus)

Specifies that the most significant byte is stored first and subsequent bytes are stored in descending order.

1 = Little endian

Specifies that the least significant byte is stored first and subsequent bytes are stored in ascending order.

2 = Big endian (word swapping)

Big endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)

3 = Little endian (word swapping)

Little endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)

100 = Default (when unselected)

The default setting (below) is used.

EtherNet/IP | Little endian
PROFINET | Big endian
SLMP Protocol Scanner | Little endian
Modbus TCP Server | Big endian
CC-Link IE Field Basic | Little endian

Examples:

AB (one-word-sized value): A = the most significant byte, B = the least significant byte:

 | Order of Arrival
Big endian (=default) | AB
Little endian | BA
Big endian (word swapping) | AB
Little endian (word swapping) | BA

12AB (two-word-sized value): 1 = the most significant byte, B = the least significant byte:

 | Order of Arrival
Big endian (=default) | 12 | AB
Little endian | BA | 21
Big endian (word swapping) | AB | 12
Little endian (word swapping) | 21 | BA

ReadLatchedUserDataBuffer Outputs

Returns | A UserData data structure containingthe data sent by a client; or #ERR if any input parameters are invalid, a connection from a client has not been established or the data buffer has not been written to since establishing the connection.
Results | Data in the UserData data structure isaccessed using the GetBufferData function.For more information, see Input/Output.


ReadMC

The ReadMC function creates an SLMP connection to the Mitsubishi Automation Controller, and sends a Batch Read command using a 3E QnA compatible or a 1E A compatible Binary frame to receive data from the Automation Controller.

Note:
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
  • The In-Sight 2000 series vision sensor does not support robot controllers.
  • When an In-Sight vision system is configured to communicate with a Automation Controller over SLMP, the protocol only supports the transfer of data between the vision system and the Automation Controller.

ReadMCInputs

Syntax: ReadMC(Event,Host Name,Port,PLC Series,Device Address,Timeout,Buffer)

Parameter Description

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Host Name

Specifies the IP address of the Mitsubishi Automation Controller from which data is read.

Port

Specifies the TCP port number, in hexadecimal, of the SLMP server which is open on the MELSEC EtherNet module.

PLC Series

Specifies the message frame that the data packet will be encapsulated.

Note: The In-Sight 2000 series vision sensor does not support CR800-D Series (3E Frame).

  • In-Sight Firmware Version 5.4.0 or later:

    0 = iQ-R/Q/L Series (3E Frame)

    Uses the QnA compatible 3E frame to send a Batch Read command.

    1 = FX Series (1E Frame)

    Uses the A compatible 1E frame to send a Batch Read command.
    2 = iQ-F Series (3E Frame) | Uses the QnA compatible 3E frame to send a Batch Read command.
    3 = CR800-D Series (3E Frame) | Uses the QnA compatible 3E frame to send a Batch Read command.

  • In-Sight Firmware Version 4.10.4 or later:

    0 = iQ-F/R/Q/L Series (3E Frame)

    Uses the QnA compatible 3E frame to send a Batch Read command.

    1 = FX Series (1E Frame)

    Uses the A compatible 1E frame to send a Batch Read command.

Device Address

Specifies the memory location of the Mitsubishi Automation Controller from which data is read. The available Device Addresses and the Formats vary, depending on the Automtion Controller Series type (iQ-F/R/Q/L Series, FX Series or CR-80D Series) specified in the PLC Series input.

  • iQ-R/Q/L Series, iQ-F Series or iQ-F/R/Q/L Series (3E Frame):

    Note: The ZR (File Register) device type is not supported on the iQ-F Series.
    Device Address | Description | Format
    Xhhhhhh* | Input Relay | Bit
    Yhhhhhh | Output Relay | Bit
    Mdddddd* | Internal Relay | Bit
    Ldddddd | Latch Relay | Bit
    Fdddddd | Annunciator | Bit
    Bhhhhhh | Link Relay | Bit
    Ddddddd | Data Register | Word
    Whhhhhh | Link Register | Word
    Rdddddd | File Block Register | Word
    ZRhhhhhh | File Register | Word
    TNdddddd | Timer Value | Word
    CNdddddd | Counter Value | Word
    * "hhhhhh" = hex address and "dddddd" = decimal address.

  • FX Series (1E Frame)

    Device Address | Description | Format
    Xoooooo* | Input Relay | Bit
    Yoooooo | Output Relay | Bit
    Mdddddd* | Internal Relay | Bit
    Ddddddd | Data Register | Word
    Rdddddd | Extension Register | Word
    Sdddddd | State Relay | Bit
    * "oooooo" = oct address and "dddddd" = decimal address.

  • CR-800D Series

    Device Address | Description | Format
    Ddddddd* | Data Register | Word
    * "dddddd" = decimal address.

Timeout

Specifies the amount of time, in milliseconds(5 to 30000; default = 1000ms), that the function will attempt to transmit data before execution is halted and an #ERR is returned.

Note: The Timeout may potentially add time to the job; in the event that both the read and write operations were to fail, the amount of time added to the job would be twice the Timeout value, since both operations Timeout value would aggregate.

Buffer

Specifies a referenced Buffer structure created by the FormatInputBuffer function, which defines how the received data is interpreted. For more information, see FormatInputBuffer.

Note: When iQ-R/Q/L Series, iQ-F Series, iQ-F/R/Q/L Series or CR-800D Series is the selected PLC Series, the total maximum length for input data is 1920 bytes. .When FX Series is the selected PLC Series, the total maximum length for input data is 128 bytes.

ReadMCOutputs

Returns | A data structure containing the data sent by the Mitsubishi Automation Controller; or #ERR if any input parameters are invalid or a connection from the Mitsubishi Automation Controller has not been established.
Results | Data in the structure is accessed using the GetBufferDatafunction. For more information, see Input/Output.


ReadModbusBuffer

Reads (consumes) data sent by a remote client using Modbusprotocol.The referenced Buffer data structure, which is created by a FormatInputBufferfunction, defines how the received data is interpreted.The remote client that is writing to the In-Sight vision system must use Registers 50000 – 50127.For more information, see FormatInputBuffer.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • For available Modbus TCP implementations on different In-Sight firmware versions, see Modbus TCP Communications.

ReadModbusBufferInputs

Syntax: ReadModbusBuffer(Event,Buffer,Byte/Word Order)

Parameter Description

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Bufffer data structurecreated by a FormatInputBuffer function,which defines how the received data is interpreted.

Note: The maximum length for input data is 4,000 bytes.

Byte/Word Order

Specifies the bit order for words and bytes read by thefunction.The available values are:

  • Big endian -Specifies that the most significant value is stored first.
  • Little endian -Specifies that the least significant value is stored first.
  • Big endian with 16-bit words -Specifies that the most significant value is stored first.
  • Big endian with 16-bit words - Specifies that the least significant value is stored first.

ReadModbusBufferOutputs

Returns | A ReadModbus data structure containingthe data sent by a client or #ERR if any input parameters are invalidor a connection from a client has not been established.
Results | Data in the ReadModbus structure isaccessed using the GetBufferDatafunction.For more information, see Input/Output.


ReadProfinetBuffer

Reads (consumes) data sent by a remote client using PROFINET protocol.The referenced Buffer data structure, which is created by a FormatInputBufferfunction, defines how the received data is interpreted.For more information, see FormatInputBuffer.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, it will automatically be replaced by the ReadUserDataBuffer function (the Protocol parameter will be set to Default). For more information, see ReadUserDataBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

ReadProfinetBuffer Inputs

Syntax: ReadProfinetBuffer(Event,Buffer)

Parameter Description

Event

Specifies the update event on which to readdata. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structurecreated by a FormatInputBuffer function,which defines how the received data is interpreted.

Note: The maximum length for input data is 4,000 bytes.

ReadProfinetBuffer Outputs

Returns | A ReadPNIO data structure containingthe data sent by a client or #ERR if any input parameters are invalidor a connection from a client has not been established.
Results | Data in the ReadPNIO structure isaccessed using the GetBufferDatafunction.For more information, see Input/Output.


ReadResult

Imports values from the cells of one In-Sight vision system (the sender) to a separate vision system (the receiver.) Several ReadResult functions can be used to import results from multiple In-Sight slave vision systems into a single spreadsheet on the receiving vision system.

Note:
  • Both the sending and receiving In-Sight vision systems must be Online.
  • When using the WriteResult and ReadResult functions, it is strongly recommended that the In-Sight vision system using the ReadResult function be configured as a network trigger Master, and that the vision system(s) using WriteResult be configured as network trigger Slaves. This allows the results to be synchronized so the Master will read the results generated by the Slave(s) in response to the current trigger. For more information, see WriteResult and AcquireImage.

ReadResult Inputs

Syntax: ReadResult(Acquire Image,Host Name,Timeout)

Parameter Description

Acquire Image

A reference to the default Image data structure in cell A0, which specifies the source of the acquisition trigger.

Host Name

Specifies the network name of the In-Sight vision system that will send results. The spreadsheet of the In-Sight sender must contain a WriteResult function that references cells containing the values to send to the receiver.

Note:
  • If the spreadsheet on the In-Sight "receiver" vision system contains multiple ReadResult functions, each function must reference the Host Name of a different In-Sight sender. In other words, only one receiver vision system can read data from a WriteResult cell on a sender vision system.
  • If an invalid Host Name is specified, the connection may take up to 30 seconds to timeout.

Timeout

The number of milliseconds to wait for the In-Sight sender vision system to write its results out to the In-Sight receiver, including the acquisition time. (0 to 120000; 0 does not timeout)

ReadResult Outputs

Returns | A Result data structure containing the values imported from the specified In-Sight sender. Returns #ERR if any of the input parameters are invalid; if there is a network error; or if the results are not received within the specified Timeout period.
Results | When the ReadResult function is initially inserted into a cell, a table containing the first four results imported from the In-Sight sender vision system will be automatically created in the spreadsheet.

The function automatically inserted into the spreadsheet to create the result table is:

GetResult(Result, Index)

Returns the indexed value from the Result data structure. The values are indexed according to the order of cell references in the WriteResult function on the In-Sight sender.
Note: ReadResult automatically returns 4 entries in the result table, corresponding to the first 4 results imported from the In-Sight sender and contained in the Result data structure. The table can be expanded to return additional results by copying cells from the table and pasting them into empty cells, then incrementing the Index value for each additional result to return.

ReadResult Example

Assume two In-Sight vision systems, Sender and Receiver, are connected to a network. A job is configured on each vision system as follows:

Sender:

A0 = AcquireImage with the Trigger set to Manual

A1 = 'Number of Acquisitions:

A2 = 'Number of Acquisitions x 2:

A3 = Timer("00:00:05",32)

A4 = WriteResult($A$0,$D$1,$D$2)

D1 = Count($A$0,9999999,0,0)

D2 = D1*2

  • The AcquireImage cell (A0) is configured for a trigger.
  • The Timer function in cell A3 initiates a manual trigger every 5 seconds.
  • Cell D1 contains a Count function to accumulate the number of acquisitions, while D2 multiplies the number of acquisitions by two.
  • Finally, the WriteResult function in cell A4 makes the acquisition data available for the Receiver vision system.

Receiver:

A0 = AcquireImage with the Trigger set to Continuous

A1 = 'Number of Acquisitions:

A2 = 'Number of Acquisitions x 2:

A4 = ReadResult($A$0,"Sender Host Name",0)

B4 = GetResult($A$4,0)

C4 = GetResult($A$4,1)

D1 = GetResult($A$4,0)

D2 = GetResult($A$4,1)

D4 = GetResult($A$4,2)

E4 = GetResult($A$4,3)

  • The AcquireImage cell (A0) is configured for continuous triggering.
  • The ReadResult function in cell A4 pulls data from the WriteResult function on Sender.
  • The rest of the populated cells (B4, C4, D1, D2, D4, E4) contain GetResult functions to illustrate the zero-based indexing of the Result structure in cell A4.

By placing both vision systems Online, the ReadResult and WriteResult functions can be seen in action:

  • After 35 seconds, seven (7) acquisitions have occurred.
  • The Receiver vision system stays synchronized with the values from Sender.
  • Note that cells D4 and E4 on Receiver return #ERR since the WriteResult function on Sender is only passing two values.


ReadUserDataBuffer

Reads (consumes) data contained in the User Data field of the currently enabled factory communication protocol (which is enabled in the Network Settings dialog). The referenced Buffer data structure, which is created by a FormatInputBuffer function, defines how the received data is interpreted. For more information, see Network Settings Dialog and FormatInputBuffer.

Note: If a periodic connection is not actively writing to the data buffer on an enabled industrial protocol, the function will return the data from the last protocol to write to the data buffer.

ReadUserDataBuffer Inputs

Syntax: ReadUserDataBuffer(Event,Buffer,Protocol,Validate Connection,Byte/Word Order)

Parameter Description

Event

Specifies the update event on which to read data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structure created by a FormatInputBuffer function, which defines how the received data is interpreted.

Note: The maximum length for input data is 4,000 bytes.

Protocol

Specifies which protocol the user data should be read from.

Note:
  • For In-Sight vision systems running In-Sight 4.9.3 and earlier firmware, if an Industrial Ethernet protocol is not specified, the Modbus TCP Server protocol will be used by default.
  • For a complete list of models and supported firmware versions, see Firmware Versions.

0 = EtherNet/IP

Specifies that EtherNet/IP is the enabled factory communication protocol. For more information, see EtherNet/IP Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later.

1 = PROFINET

Specifies that PROFINET is the enabled factory communication protocol. For more information, see PROFINET Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later.

2 = SLMP Scanner

Specifies that SLMP Scanner is the enabled factory communication protocol. For more information, see Configuring In-Sight Vision Systems for SLMP Communications.

3 = Modbus TCP Server

Specifies that Modbus TCP Server is the enabled factory communication protocol. For more information, see Modbus TCP Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware version 5.3.0 and later.

8 = CC-Link IE Field Basic Bit

 Specifies that CC-Link IE Field Basic is the enabled factory communication protocol, and reads user data buffer from the RY bit space.For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

9 = CC-Link IE Field Basic Word

 Specifies that CC-Link IE Field Basic is the enabled factory communication protocol, and reads user data buffer from the RWw word space.For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

100 = Default

Specifies that the currently enabled factory communication protocol will be used (which is enabled via the Network Settings dialog). If more than one protocol is enabled, the first enabled protocol will be used. For more information, see Network Settings Dialog.

Validate Connection

Specifies whether or not the function will attempt to validate the connection.If enabled, the function will return #ERR if the selected protocol does not have an active cyclic connection.

Note: For EtherNet/IP it will not return #ERR unless an implicit connection was established after the last restart.When implicit messaging is not used, this allows the sensor to receive data explicitly without returning #ERR.

Byte/Word Order

Specifies the bit order for words and bytes read by the function.

Note: This parameter is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

0 = Big endian (= default for Modbus)

Specifies that the most significant byte is stored first and subsequent bytes are stored in descending order.

1 = Little endian

Specifies that the least significant byte is stored first and subsequent bytes are stored in ascending order.

2 = Big endian (word swapping)

Big endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)

3 = Little endian (word swapping)

Little endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)

100 = Default (when unselected)

The default setting (below) is used.

EtherNet/IP | Little endian
PROFINET | Big endian
SLMP Protocol Scanner | Little endian
Modbus TCP Server | Big endian
CC-Link IE Field Basic | Little endian

Examples:

AB (one-word-sized value): A = the most significant byte, B = the least significant byte:

 | Order of Arrival
Big endian (=default) | AB
Little endian | BA
Big endian (word swapping) | AB
Little endian (word swapping) | BA

12AB (two-word-sized value): 1 = the most significant byte, B = the least significant byte:

 | Order of Arrival
Big endian (=default) | 12 | AB
Little endian | BA | 21
Big endian (word swapping) | AB | 12
Little endian (word swapping) | 21 | BA

ReadUserDataBuffer Outputs

Returns | A UserData data structure containing the data sent by a client; or #ERR if any input parameters are invalid, a connection from a client has not been established or the data buffer has not been written to since establishing the connection.
Results | Data in the UserData data structure is accessed using the GetBufferData function. For more information, see Input/Output.


TCPDevice

Defines an In-Sight spreadsheet cell as a TCP/IP device (client or server), which opens a connection between the In-Sight vision system and another TCP/IP device for sharing data over the network. Once a TCP/IP connection has been established, data is communicated using the ReadDevice, WriteDevice, and QueryDevice functions. For more information, see ReadDevice, WriteDevice and QueryDevice.

If the TCPDevice function initiates the communication with another TCP/IP device on the network, then the cell is the TCP/IP client. If the TCPDevice function waits for the communication to be received from another TCP/IP device on the network, then the cell is the TCP/IP server.

Note:
  • TCPDevice generates an event when it receives a packet; this updates the spreadsheet.
  • To establish a TCP/IP device connection between two In-Sight vision systems, both must be Online.

TCPDevice Inputs

Syntax: TCPDevice(Host Name,Port,Protocol,Packet Type,Timeout,Terminator)

Host Name

Specifies the name of the TCP/IP server device with which to establish a connection, if the cell containing the TCPDevice function will be the client.

Note:
  • The Host Name drop-down does not list Host Names of In-Sight vision systems and/or emulators on the network. Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.
  • If a Host Name is not specified (null-string is the default), then the cell will be a server device, waiting for a TCP/IP client to initiate communications.

Port
  • The port number of the TCP/IP server at which the connection will be established between TCP/IP devices. If a Host Name is specified, the Port number entered here must also be assigned on the server. If a Host Name is not specified (null-string), then this parameter assigns the TCP/IP port number to this device.
  • No two TCPDevice functions on the same host can share the same TCP/IP Port number assignment, or one of the devices will be unable to establish a TCP/IP connection. For example, if two cells in the same In-Sight spreadsheet contain TCPDevice functions which use the default Port number '3000', only one of the cells will be able to function as a TCP/IP device. Therefore, it is important to avoid duplication of Port number assignments.
Note: A valid Port assignment is any unused number between 1 and 65535, except for ports used for In-Sight communications. In-Sight Emulator users should always assign Port numbers 3000 (the default) and higher to prevent potential conflicts with ports reserved by services on the PC. For more information, see In-Sight Ports.

Protocol

The network protocol to use when communicating between an In-Sight vision system and other TCP/IP devices on the network. In-Sight vision systems currently only support the standard TCP/IP protocol.

  • 0 = TCP/IP

Packet Type

Defines the formatting of the data string communicated between an In-Sight vision system and another TCP/IP device.

0 = String CR+LF (default) | ASCII format. When an In-Sight vision system is sending, ASCII characters 13 (Carriage Return) and 10 (Line Feed) will be appended to the data string; when receiving, CR+LF will terminate the data string.
1 = String CR (13) | ASCII format. When an In-Sight vision system is sending, the ASCII character 13 (Carriage Return) will be appended to the data string; when receiving, CR will terminate the data string.
2 = String LF (10) | ASCII format. When an In-Sight vision system is sending, the ASCII character 10 (Line Feed) will be appended to the data string; when receiving, LF will terminate the data string.
3 = String Nullchar (0) | ASCII format. When an In-Sight vision system is sending, the ASCII character 0 (Nullchar) will be appended to the data string; when receiving, Nullchar will terminate the data string.
4 = Modbus | Binary format. The data string will adhere to the Modbus protocol. For more information, see Binary Text Functions.
6 = String with Custom Terminator | ASCII format. When an In-Sight vision system is sending, the specified Terminator will be appended to the data string; when receiving, the specified Terminator will terminate the data string.
7 = Binary with Custom Terminator | Binary format. When an In-Sight vision system is sending, the specified Terminator will be appended to the data string; when receiving, the specified Terminator will terminate the data string.
Note:
  • The Modbus parameter applies only when the In-Sight vision system acts as a Modbus client, as defined in the Open Modbus/TCP Specification (external link; requires Internet access. Published by Modicon). Also note that when Packet Type is set to Modbus, the Port should be set to 502, which is reserved by In-Sight communications.
  • Regardless of the Packet Type, when an In-Sight vision system is receiving data, the ASCII character 0 (Nullchar) will terminate the data string.

Timeout

The number of milliseconds (100 to 15000; default = 1000) to wait for a TCP/IP connection to be established before aborting the connection attempt. This parameter only applies when the TCPDevice function is in a cell defined as a TCP/IP client.

Terminator

Specifies the ASCII character (0 to 255) to be used when String with Customer Terminator or Binary with Customer Terminator is specified for the Packet Type.

TCPDevice Outputs

Returns

A Device data structure. Returns #ERR if any of the input parameters are invalid, or when the Timeout is exceeded.

Note: Up to 12 Device structures can be inserted into a single job.

Results

When the function is inserted into a cell, an additional function will be automatically inserted in the adjacent cell to the right:

  • WriteDevice if the function is a TCP/IP client.
  • ReadDevice if the function is a TCP/IP server.

TCPDevice Example

An In-Sight host vision system named SYSTEM0 is configured as follows:

A3=TCPDevice("SYSTEM1",3000,0,0,300)

B3=WriteDevice($A$0,A3,C3)

A second host system, named SYSTEM1, includes the TCP/IP server and is configured as follows:

A4=TCPDevice("",3000,0,0,300)

B4=ReadDevice(A4)

Both systems are Online. Whenever the default image in cell $A$0 on SYSTEM0 is acquired, the TCP/IP client in cell A3 will establish a connection with the TCP/IP server in cell A4 on SYSTEM1 at Port 3000. The WriteDevice function in cell B3 on SYSTEM0 will then export the data in cell C3 to the ReadDevice function in cell B4 on SYSTEM1.


UDPDevice

Defines an In-Sight spreadsheet cell as a UDP device (client or server), which opens a connection between the In-Sight vision system and another UDP device for sharing data over the network. Once a UDP connection has been established, data is communicated using the ReadDevice, WriteDevice, and QueryDevice functions. If the UDPDevice function initiates the communication with another UDP device on the network, then the cell is the UDP client. If the UDPDevice function waits for the communication to be received from another UDP device on the network, then the cell is the UDP server. For more information, see ReadDevice, WriteDevice, or QueryDevice.

User Datagram Protocol (UDP), an alternative to TCP, is a connectionless communication transport method that offers a limited amount of service when messages are exchanged over the Internet Protocol. Unlike TCP, UDP does not acknowledge or guarantee delivery, nor does it provide for sequencing packets.

Note:
  • UDPDevice generates an event when it receives a packet; this updates the spreadsheet.
  • To establish a UDP device connection between two In-Sight vision systems, both must be Online.

UDPDevice Inputs

Syntax: UDPDevice(Host Name,Port,Timeout,Binary Packet)

Parameter | Description

Host Name

Specifies the name of the UDP server device with which to establish a connection, if the cell containing the UDPDevice function will be the client.

Note:
  • The Host Name drop-down does not list Host Names of In-Sight vision systems and/or emulators on the network. Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.
  • If a Host Name is not specified (null-string is the default), then the cell will be a server device, waiting for a UDP client to initiate communications.

Port

The port number of the UDP server at which the connection will be established between UDP devices. If a Host Name is specified, the Port number entered here must also be assigned on the server. If a Host Name is not specified (null-string), then this parameter assigns the UDP/IP port number to this device.

No two UDPDevice functions on the same host can share the same UDP Port number assignment, or one of the devices will be unable to establish a UDP connection. For example, if two cells in the same In-Sight spreadsheet contain UDPDevice functions which use the default Port number '3000', only one of the cells will be able to function as a UDP device. Therefore, it is important to avoid duplication of Port number assignments.

Note: A valid Port assignment is any unused number between 1 and 65535, except for ports used for In-Sight communications. In-Sight Emulator users should always assign Port numbers 3000 (the default) and higher to prevent potential conflicts with ports reserved by services on the PC. For more information, see In-Sight Ports.

Timeout

The number of milliseconds (100 to 15000; default = 1000) to wait for a UDP connection to be established before aborting the connection attempt. This parameter only applies when the UDPDevice function is in a cell defined as a UDP client.
Binary Packet | Specifies whether or not the function will process data as binary data packets, or the data will be processed as string information. By default, this option is disabled and the function will process data as string information.

UDPDevice Outputs

Returns | A Device data structure. Returns #ERR if any of the input parameters are invalid, or when the Timeout is exceeded. Note: Up to 12 Device structures can be inserted into a single job.
Results | When the function is inserted into a cell, an additional function will be automatically inserted in the adjacent cell to the right: WriteDevice, if the function is a UDP client, or ReadDevice if the function is a UDP server.

UDPDevice Examples

The following examples illustrate how the UDPDevice function is to be used when configured as a: UDP Client (No Response Required), UDP Client (Response Required), UDP Server (Only Receives Messages) and UDP Server (Receives and Responds to Messages).

UDP Client (No Response Required)

In this configuration, the In-Sight vision system is configured to send a UDP message to a UDP server device.

Setup

The UDPDevice function is added to the job, and valid Hostname and Port parameters are configured for the function. A WriteDevice function is automatically added to the job when the UDPDevice function determines that it will be operating as a client. The WriteDevice function is configured by applying a valid Event parameter, the Device parameter is configured to the Device data structure output by the UDPDevice function (this is setup automatically when the WriteDevice function is added to the job), and a reference is made to a cell outputting a valid binary data packet or string information.

Execution

When the vision system is Online, UDP messages will be sent out whenever the WriteDevice function receives a valid event. The Timeout parameter is not required because a response is not needed from the server.

UDP Client (Response Required)

In this configuration, the In-Sight vision system is configured to send a UDP message to a UDP server device, and await a response from the server device before the Timeout parameter expires.

Setup

The UDPDevice function is added to the job, and valid Hostname and Port parameters are configured for the function. Next, the Timeout parameter is configured with an appropriate timeout value, and then the WriteDevice function that was automatically added is configured. After configuring those functions, add a QueryDevice function and configure its Event function to an appropriate event, the Device parameter to the Device data structure output by the UDPDevice function and a reference to the appropriate data to be sent. The UDPDevice function is added to the job, and valid Hostname and Port parameters are configured for the function. A WriteDevice function is automatically added to the job when the UDPDevice function determines that it will be operating as a client. The WriteDevice function is configured by applying a valid Event parameter, the Device parameter is configured to the Device data structure output by the UDPDevice function and a reference to the appropriate data to be sent.

Execution

When the vision system is Online, UDP messages will be sent out whenever the Event parameter of the QueryDevice function is triggered. While waiting for a response from the server, the other functions in the job will be run. If the response from the server never occurs, or is received after the Timeout parameter has expired, the function will return an error; the error will be cleared when the next event triggers the sending of another UDP message.

UDP Server (Only Receives Messages)

In this configuration, the In-Sight vision system is configured to receive a UDP message from a UDP client device.

Setup

The UDPDevice function is added to the job, and the Hostname parameter is left empty, while a valid Port parameter is set. A ReadDevice function is automatically added to the job when the UDPDevice function determines that it will be operating as a server. The ReadDevice function is configured by applying a valid Event parameter and the Device parameter is configured to the Device data structure output by the UDPDevice function (this is setup automatically when the ReadDevice function is added to the job).

Execution

When the vision system is Online, it will be operating as a UDP server, running in the background of the Spreadsheet, waiting for a message to be sent. When a message is received, the server triggers the Spreadsheet to execute and populates the ReadDevice function with the incoming data. The message can be sent to the IP address of the vision system directly, or as a broadcast message to multiple vision systems on the network.

UDP Server (Receives and Responds to Messages)

In this configuration, the In-Sight vision system is configured to receive a UDP message from a UDP client device, and send a response indicating that the message was successfully received.

Setup

Two UDPDevice functions are added to the job. The first UDPDevice function will be configured as a server (the Hostname parameter is left empty, while a valid Port parameter is set). The second UDPDevice function will be configured as a client. The GetRemoteAddress function will be used to retrieve the remote address of the incoming packet, and the GetRemotePort function will be used to retrieve the remote port that issued the packet.

Execution

Two UDPDevice functions are used to handle the incoming and outgoing messages of the server. When a message is received, the Spreadsheet is triggered to execute and process the message. If the job creates a response, that event will also trigger the WriteDevice function to send the response packet. The IP address and port number are included in the incoming packet and are used by the WriteDevice function to send the response packet. The message can be sent to the IP address of the vision system directly, or as a broadcast message to multiple vision systems on the network.

For more information, see Binary Text Functions.


WriteCCLinkBitBuffer

Writes data from a referenced Buffer structure, created bythe FormatOutputBuffer function,to the CC-Link network using the CC-Link protocol upon on an Event trigger.For more information, see FormatOutputBuffer and Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an In-Sight CIO-MICRO-CC I/O Module.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The In-Sight vision system must be connected to an In-Sight CIO-MICRO-CC I/O module to enable this functionality. For more information, see I/O Module Configuration.
  • When an In-Sight vision system is configured to communicate with a Mitsubishi Automation Controller over CC-Link, the protocol only supports the transfer of data between the vision system and the automation controller.

WriteCCLinkBitBufferInputs

Syntax: WriteCCLinkBitBuffer(Event,Buffer)

Parameter Description

Event

Specifies the event on which to write thespecified Buffer structure. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structurecreated by a FormatOutputBufferfunction, which contains automatically formatted data.

Note: The maximum length for output data is 256 bytes.

WriteCCLinkBitBufferOutputs

Returns

The number of elements written or #ERR:

  • Ifan input parameter is invalid.
  • Ifthe In-Sight vision system is not connected to an In-Sight CIO-MICRO-CC I/O module.
  • If an item in the FormatOutputBuffer function has a Data Type other than Bit or 16 Bit Integer.


WriteCCLinkWordBuffer

Writes data from a referenced Buffer structure, created bythe FormatOutputBuffer function,to the CC-Link network using the CC-Link protocol upon on an Event trigger.For more information, see FormatOutputBuffer and Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an In-Sight CIO-MICRO-CC I/O Module.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The In-Sight vision system must be connected to an In-Sight CIO-MICRO-CC I/O module to enable this functionality. For more information, see I/O Module Configuration.
  • When an In-Sight vision system is configured to communicate with a Mitsubishi Automation Controller over CC-Link, the protocol only supports the transfer of data between the vision system and the automation controller.

WriteCCLinkWordBufferInputs

Syntax: WriteCCLinkWordBuffer(Event,Buffer)

Parameter Description

Event

Specifies the event on which to write thespecified Buffer data structure. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structurecreated by a FormatOutputBufferfunction, which contains automatically formatted data.

Note: The maximum length for output data is 256 bytes.

WriteCCLinkWordBufferOutputs

Returns

The number of elements written or #ERR:

  • Ifan input parameter is invalid.
  • Ifthe In-Sight vision system is not connected to an In-Sight CIO-MICRO-CC I/O module.


WriteDevice

Exports data from an In-Sight vision system to another host on the network using a TCP/IP or UDP connection.

Note: To establish a TCP/IP connection between two In-Sight vision systems, both must be Online.

WriteDevice Inputs

Syntax: WriteDevice(Event,Device,Data1,[Data2, ...])

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A cell containing a numeric value (any non-zero numeric value will force the update).

Device

 A reference to a spreadsheet cell containing a Device data structure created by a TCPDevice or UDPDevice function. For more information, see TCPDevice and UDPDevice.

Data1, 2, ...

A reference to a cell which contains the data to export to the TCP/IP server device specified in the TCPDevice function. The data Packet Type in the TCPDevice function may be ASCII or binary.

WriteDevice Outputs

Returns

A Write data structure, containing the data that will be exported whenever the specified Event is initiated, or #ERR if any of the input parameters are invalid.

Note:
  • If the Timeout period, specified in the referenced TCPDevice function, is exceeded during a write operation to a TCP/IP buffer that is full, an #ERR is not returned.
  • Due to the fact that UDP communications are connectionless, there is no need for a timeout period when configured to UDP communications.


WriteEIP

Writes data to remote client devices using EtherNet/IP protocol. EtherNet/IP is an application-level protocol implemented on top of Ethernet and TCP/IP protocols, allowing the transfer of data in industrial environments over the Ethernet. For more information on the EtherNet/IP protocol, go to odva.org.

The data will be sent to the client device within one Request Packet Interval (RPI). The RPI frequency is set by the client device.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, an error message will be displayed, because this function is not present in In-Sight 5.1.0 or later firmware. This function should be replaced by the WriteResultsBuffer function. For more information, see WriteResultsBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Although an In-Sight vision system can communicate with more than one device at the same time using EtherNet/IP protocol, there can only be one bi-directional implicit connection.
  • An In-Sight vision system can act as a server only; it will not initiate a connection to another device. The Assembly data configuration must be specified on the client device. For more information, see In-Sight Assembly Data Configuration (Implicit Messaging).
  • Only one WriteEIP function should be placed in the spreadsheet. Multiple WriteEIP functions may overwrite data waiting to be sent in the flash memory buffers.
  • RPI frequencies of less than 10ms may impact the performance of some vision tools.
  • In-Sight vision systems support both Explicit and Implicit EtherNet/IP messaging. Closed See Example.

    ReadEIP($A$0, "0d:4d:8s") in cell A4, reads 2 32 bit integers and a null terminated string from the PLC.

    GetBufferData($A$4, 0) displays the first 32 bit integer.

    GetBufferData($A$4, 1) displays the second 32 bit integer.

    GetBufferData($A$4, 2) displays the string.

  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • For more information, see Communicate with a Rockwell SLC 5/05 PLC.

WriteEIP Inputs

Syntax: WriteEIP(Event,MapSpec,Value1,[Value2,...])

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

MapSpec

Specifies a data mapping, which consists of a list of specifiers delimited by colon characters. Each specifier has two parts: the starting byte and a data type code. Supported character codes include:

Code | Data Type
i | 8-bit integer
il | 16-bit integer
d | 32-bit integer
f | 32-bit floating-point number
s | Text string

For example, "0i:1f:5d:9s" specifies that the first data item (at offset 0) is an 8-bit integer; the second item (at offset 1) is a floating-point value; the third (at offset 5) is a 4-byte signed integer; and the rest of the packet (starting at offset 9) is a string.

Note: The maximum length for output data is 492 bytes.

Value

Specifies a variable-length list of values consistent with the MapSpec (Value1, Value2, ...)

WriteEIP Outputs

Returns

The number of elements written or #ERR if an input parameter is invalid, or if a connection to a client has not been established.


WriteEIPBuffer

Writes data from a referenced Buffer structure, created by the FormatOutputBuffer function, to remote client devices using the EtherNet/IP protocol. EtherNet/IP is an application-level protocol implemented on top of Ethernet and TCP/IP protocols, allowing the transfer of data in industrial environments over the Ethernet. For more information on the EtherNet/IP protocol, go to odva.org. The data is sent to the client within one Request Packet Interval (RPI). The RPI frequency is set by the client device. For more information, see FormatOutputBuffer.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, it will automatically be replaced by the WriteResultsBuffer function (the Protocol parameter will be set to Default). For more information, see WriteResultsBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Although an In-Sight vision system can communicate with more than one device at the same time using EtherNet/IP protocol, there can only be one bi-directional implicit connection.
  • An In-Sight vision system can act as a server only; it will not initiate a connection to another device. The Assembly data configuration must be specified on client device. For more information, see In-Sight Assembly Data Configuration (Implicit Messaging).
  • Only one WriteEIPBuffer function should be placed in the spreadsheet. Multiple WriteEIPBuffer functions may overwrite data waiting to be sent in the flash memory buffers.
  • RPI frequencies of less than 10ms may impact the performance of some vision tools.
  • In-Sight vision systems support both Explicit and Implicit EtherNet/IP messaging. Closed See Example.

    ReadEIP($A$0, "0d:4d:8s") in cell A4, reads 2 32 bit integers and a null terminated string from the PLC.

    GetBufferData($A$4, 0) displays the first 32 bit integer.

    GetBufferData($A$4, 1) displays the second 32 bit integer.

    GetBufferData($A$4, 2) displays the string.

  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • For more information, see Communicate with a Rockwell SLC 5/05 PLC.

WriteEIPBuffer Inputs

Syntax: WriteEIPBuffer(Event,Buffer)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer structure created by a FormatOutputBuffer function, which contains automatically formatted data.

Note: The maximum length for output data is 4,000 bytes.

WriteEIPBuffer Outputs

Returns

The number of elements written or #ERR if an input parameter is invalid, or if a connection to a client has not been established.


WriteFTP

Writes a data file or appends a data string to a file. This function is typically used to log data results that can be viewed in a file.

Note:
  • The WriteFTP function requires the In-Sight vision system to be Online.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • The port number of the FTP server connection can be changed by appending the host name (or IP address) with a colon (:) then the new port number. For example, if the current Host Name was PRODUCTION1, to change the port number from the default (port 21) to port 34, the Host Name parameter would be specified as PRODUCTION1:34.
  • When using the In-Sight emulator as an FTP Server, by default, files are written to the Emulator folder (C:\ProgramData\Cognex\In-Sight\Emulators\x.x.x). In addition to this directory, files can be written to a user-defined location (Authorized FTP directory). For more information on the Emulator directory and the Authorized FTP directory, see Emulation Panel.

WriteFTP Inputs

Syntax: WriteFTP(Event,Host Name,User Name,Password,File Name,Data Format,String,Append)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Host Name

The host name (or IP address) of the target system on the network where the file is located. The target system can be an In-Sight emulator or any other device recognized as an FTP server on the network.

Note: The Host Name drop-down does not list Host Names of In-Sight vision systems and/or emulators on the network. Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

User Name

A valid user name for the target system's FTP server. This user name is not required to exist on the In-Sight vision system that is writing the image file.

Password

A valid password for the target system's FTP server. The password is case-sensitive, and its length cannot exceed 15 characters.

Note:
  • For security purposes, the entered password will be masked with "*" in the WriteFTP property sheet and in the formula bar.
  • The password will be saved in the job file in encrypted form.

File Name

The name of the file. Long file names are supported. If no path is specified, the file will be written to the default directory of the FTP server on the target system. If the file does not exist, it will be created when the function is first executed; the default filename is "InSight".

Note: When writing files to the Authorized FTP Directory, the File Name path must precisely match the specified Authorized FTP Directory path in the Option dialog. For more information, see Emulation Panel. Files can also be written to any sub-directories within the Authorized FTP Directory (the sub-directory must exist).

For example, if the Authorized FTP Directory is C:\temp and the name of the file is "InSight", the File Name must be specified as "C:\temp\InSight". If writing to a sub-directory "Jobs", the File Name will be "C:\temp\Jobs\InSight". If only specified as "InSight", the file will be written to the default Emulator directory.

Data Format

The type of file. The extension will automatically be appended to the File Name.

0 = TEXT | Standard ASCII Text file format (.TXT).
1 = HTML (default) | Standard HTML file format (.HTM).
4 = XML | Standard XML file format (.XML).
5 = CSV | Standard CSV file format (.CSV).

String

A text string or a reference to a cell containing a text string. The maximum string length is 255 characters.

Note:
  • When HTML is selected for the Data Format parameter, HTML tags should be used in the text string.
  • The string will not be written or appended unless it has been modified.

Append

Specifies the way in which the data is written to the file.

0 = OFF | Overwrites the existing data in the file.
1 = ON (default) | Appends the data string to the end of the file.

WriteFTP Outputs

Returns
  • An FTP data structure that will write the data string contained in the String parameter to a file on the target system whenever the spreadsheet is updated.
  • Returns #ERR if the Host Name, User Name, or Password are invalid for the target host, if any input parameters are invalid or if the file queue is full.
Note:
  • If a file is queued, but the transfer to the target host failed, an #ERR is not returned.

  • Network errors that are generated by the function (such as invalid Host Name, User Name or Password) can be detected by inserting a separate Event function into the spreadsheet and specifying "Network Error" for the Trigger parameter. For more information, see WriteImageFTP and Event. These errors are then reported by the GetErrorString and GetErrorCode functions, which must reference the Event function. The last error message/code is stored and is returned until another network error is reported. For more information, see GetErrorString and GetErrorCode.

When Data Format is set to HTML, the following are inserted into the spreadsheet after exiting the WriteFTP property sheet the first time:

Stringf Text String Function

Returns a text string constructed using a "C" library standard Format-string. The format of the Stringf function is dependent on the type of file selected. For more information, see String Functions.

Text String

This cell contains the text string, " Test string.".

GetFilename function

Returns the name of the image file that is written by the WriteImageFTP function in the adjacent cell to the right. By default, the name of the image file is the same as the File Name entered in the WriteFTP property sheet, with a numeric counter appended. For more information, see Input/Output.

Additional FTP data structure

Returns an FTP data structure created by a WriteImageFTP function. The values for the first five parameters in the WriteImageFTP property sheet are taken from the initial WriteFTP parameters.

Note: Any subsequent modifications to the WriteFTP property sheet will not update values in the WriteImageFTP property sheet.

When Data Format is set to TEXT, only the Stringf text string function is inserted into the spreadsheet.

WriteFTP Examples

Note:
  • In Example 1, the only parameters edited in the WriteFTP property sheet are the Host Name, User Name, and Password.
  • For Example 2, the Host Name, User Name, Password, and Data Format parameters are edited.
  • In Example 3, the same parameters are used from Example 1, but functions that were automatically inserted in the spreadsheet are edited, and additional functions are added.

WriteFTP Example 1:

A2 = WriteFTP($A$0,"FACTORYFLOOR-1","admin","*","InSight",1,B2,1)

B2 = Stringf("<LI><A HREF=%c%s%c>%s</A></LI>\r\n",34,D2,34,C2)

C2 = ' Test string.

D2 = GetFilename(E2)

E2 = WriteImageFTP($A$0,"FACTORYFLOOR-1","admin","*", $A$0,"InSight",999,0,0,0,1,0)

Whenever the spreadsheet updates after an image acquisition, the function appends the text string in cell C2 to the end of InSight.HTM on the host named FACTORYFLOOR-1. The User Name "admin" and its password must already exist on FACTORYFLOOR-1 or #ERR will be returned in the spreadsheet. Within the HTML file, there will be a hyperlink to the image file, InSightxxx.bmp, and the text message " Test string." contained within cell C2. Since the value for the Reset parameter of WriteImageFTP is Off, the first file written would be InSight000.bmp, the second InSight001.bmp, and so on.

Closed See Example 1 functions inserted into the spreadsheet

WriteFTP Example 2:

A2 = WriteFTP($A$0,"FACTORYFLOOR-1","admin","*","InSight",0,B2,1)

B2 = Stringf("Test string.\r\n")

Whenever the spreadsheet updates after an image acquire, the function appends the text string in cell C2 to the end of the InSight.txt file on the host named FACTORYFLOOR-1. The User Name "admin" and its password must already exist on FACTORYFLOOR-1 or #ERR will be returned in the spreadsheet. Within the text file, the text message, " Test string." is written.

Closed See Example 2 functions inserted into the spreadsheet

WriteFTP Example 3:

A2 = WriteFTP($A$0,"FACTORYFLOOR-1","admin","*","InSight",1,B2,1)

B2 = Stringf("<LI>%s</LI><BR>\r\n<IMG SRC=%c%s%c><BR><BR>\r\n",C2,34,D2,34)

C2 = Concatenate("Failure #",F2,".")

D2 = GetFilename(E2)

E2 = WriteImageFTP($A$0,"FACTORYFLOOR-1","admin","*", $A$0,"InSight",999,0,0,0,1,0)

F2 = Count($A$0,999,G2,-1)

G2 = Button("Reset Counter", -1)

Whenever the spreadsheet updates after an image acquire, the function appends the text string in cell C2 to the end of the InSight.htm file on the host named FACTORYFLOOR-1. The User Name, "admin", and its password must already exist on FACTORYFLOOR-1 or #ERR will be returned in the spreadsheet. Within the HTML file, images are displayed along with a bulleted heading for each image. The first heading written would be "Failure #0.", the second "Failure #1.", and so on. Since the value for the Reset parameter of WriteImageFTP is Off, the first image file written would be InSight000.bmp, the second InSight001.bmp, and so on.

Closed See Example 3 functions inserted into the spreadsheet

Closed See a sample output HTML file, viewed in Internet Explorer


Configure the Write ImageFTP Function

The WriteImageFTP function writes the current image to an FTP server on the network. This function is typically used to automatically save images of failed inspections during runtime.

  1. Insert the WriteImageFTP function into the spreadsheet to open the WriteImageFTP property sheet. Configure the following parameters, using the default settings for the rest of the parameters.

  2. Select the name of your PC for Host Name. (Use the IP address if your PC name is not listed).

    Note: When using the In-Sight emulator as an FTP Server, by default, files are written to the Emulator folder (C:\ProgramData\Cognex\In-Sight\Emulators\x.x.x). In addition to this directory, files can be written to a user-defined location (Authorized FTP directory). For more information on the Emulator directory and the Authorized FTP directory, see Emulation Panel.
  3. Enter a User Name and Password to log on to the FTP server. In-Sight Explorer has an integrated FTP server built-in to the software. The FTP server is running when In-Sight Explorer is open. If using the In-Sight Explorer FTP server, the default user name is admin and the default password is blank.

  4. Enter a File Name for your image file.

    Note: When writing files to the Authorized FTP Directory, the File Name path must precisely match the specified Authorized FTP Directory path in the Options dialog. Images can also be written to any sub-directories within the Authorized FTP Directory (the sub-directory must exist). For example, if the Authorized FTP Directory is C:\temp and the name of the file is "Failed", the File Name must be specified as "c:\temp\Failed". If writing to a sub-directory "Images", the File Name will be "C:\temp\Images\Failed". If only specified as "Failed", the file will be written to the default Emulator directory.

  5. After configuring the parameters, click OK to close the property sheet.
  6. Place the vision system Online.
  7. Trigger the vision system. For each acquired image, a bitmap file is stored on the specified host.

Troubleshoot FTP Problems

  • The In-Sight vision system must be Online, otherwise the WriteImageFTP function will not execute and no images will be sent.

  • The Internet Connection Firewall must be disabled. For more information, see Firewalls.

  • If IIS (Internet Information Services) is installed, verify that IIS is not using Port 21. If Port 21 is being used, change it to an unused port, such as 22.

  • If the name of your Local PC is not listed in the drop-down for the Host Name, then manually enter the IP address of the PC.

FAQs

Q: Can I have more than one FTP server running on the same network?

A: Yes. You can have multiple PCs running In-Sight Explorer on the same network. Note that you cannot have more than one FTP server running on the same PC, using the same FTP port number 21, while using any FTP functions.

Q: Can I save my images to another location besides my local PC?

A: Yes. If you have another PC with an FTP server installed, then you can choose that as your storage location. Note that the In-Sight Explorer software is considered an FTP server. If you are using a third party FTP server, In-Sight Explorer should be closed. If no other FTP server is running, In-Sight Explorer must be running. If the Host Name is not listed in In-Sight Explorer, or you are using a third party FTP server, the PC's IP Address must be used in the WriteImageFTP dialog.

Q: Does In-Sight Explorer need to be open when I use the FTP functions?

A: Yes. In-Sight Explorer is actually an FTP server. If In-Sight Explorer is not running, a third party FTP server must be running.

Q: What port number does In-Sight Explorer use for file transfer?

A: In-Sight Explorer uses port 21 for file transfer (FTP); if another application is using port 21 besides In-Sight Explorer, the WriteImageFTP function will not execute properly. Please contact your IT department to disable all firewalls and anti-virus software or make an exception for port 21.


WriteImageFTP

Writes the current image to an FTP server on the network. Optionally, an SVG file may be created, which includes the overlay graphics on top of the image. This function is typically used to automatically save images of failed inspections during runtime.

Note:
  • The function requires the In-Sight vision system to be Online to send images and SVG files.
  • If you are logged on to an In-Sight vision system remotely, the screen image may not be refreshed with every image acquisition when using the function.
  • If a memory-intensive job containing the function is executed repeatedly, the FTP command "Get image.jpg" (or .bmp) may fail because the vision system's memory becomes too fragmented. The job will continue to execute correctly.
  • If an AcquireImage function parameter is modified while the vision system is Online, the function will send the current image.

  • The image width is based on the width of the source image. The width will be adjusted, if needed, making it word-aligned (a multiple of 4). The width will be adjusted up to the next multiple of 4. If this new width is greater than the source image's width, the width will be adjusted down to the previous multiple of 4.

  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • The port number of the FTP server connection can be changed by appending the host name (or IP address) with a colon (:) then the new port number. For example, if the current Host Name was PRODUCTION1, to change the port number from the default (port 21) to port 34, the Host Name parameter would be specified as PRODUCTION1:34.
  • If the default location of the saved images is kept as the Emulator folder, allowing more than 250 image files to be stored in the directory will prevent a firmware update of the vision system. Remove the image files from the directory to restore firmware update capability. For more information, see Update Firmware Dialog.
  • When using the In-Sight emulator as an FTP Server, by default, files are written to the Emulator folder (C:\ProgramData\Cognex\In-Sight\Emulators\x.x.x). In addition to this directory, files can be written to a user-defined location (Authorized FTP directory). For more information on the Emulator directory and the Authorized FTP directory, see Emulation Panel.

WriteImageFTP Inputs

Syntax: WriteImageFTP(Event,Host Name,User Name,Password,Image,File Name,Max Append Value,Reset,Data Format,Save Graphic Overlays,Resolution,Disable FTP Queuing)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Host Name

The host name (or IP address) of the target device on the network where the image file will be written. The target device can be an In-Sight emulator, or any other host acting as an FTP server on the network.

Note:
  • When the Host Name is set to an In-Sight emulator, the files are saved to: C:\ProgramData\Cognex\In-Sight\Emulators\5.x.x.
  • The Host Name drop-down does not list Host Names of In-Sight vision systems and/or emulators on the network. Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.
  • If an invalid Host Name is specified, the connection may take up to 30 seconds to timeout.
  • When writing images to an FTP server, do not use spaces before or after the name specified in the Host Name or User Name. If the name specified in the Host Name or User Name parameters contains a space before or after the name, the function will fail to write the image to the specified server.

User Name

A valid user name for the target system's FTP server. This user name is not required to exist on the In-Sight vision system that is writing the image file.

Password

A valid password for the target system's FTP server. The password is case-sensitive, and its length cannot exceed 15 characters.

Note:
  • For security purposes, the entered password will be masked with "*" in the property sheet and in the formula bar.
  • The password will be saved in the job file in encrypted form.

Image

A reference to a cell containing an Image data structure. The default reference is to the Image data structure in cell A0.

File Name

The name of the image file to write; also defines the name of the SVG file, if the Save Graphic Overlays parameter is enabled. Long file names are supported, including a numeric counter that can be appended to the file name as each file is written (up to the specified Max Append Value). If no path is specified, the image file will be written to the default directory of the FTP server on the target host.

Note: When writing files to the Authorized FTP Directory, the File Name path must precisely match the specified Authorized FTP Directory path in the Options dialog. Images can also be written to any sub-directories within the Authorized FTP Directory (the sub-directory must exist). For example, if the Authorized FTP Directory is C:\temp and the name of the file is "Failed", the File Name must be specified as "c:\temp\Failed". If writing to a sub-directory "Images", the File Name will be "C:\temp\Images\Failed". If only specified as "Failed", the file will be written to the default Emulator directory.

Max Append Value

The maximum number (0 to 9999999; default = 999) of unique image files that can be written using the specified File Name. A counter will be added to the end of the specified File Name and will increment itself as each image file is written. The counter automatically resets itself when it equals the Max Append Value; existing image files on the target system will be overwritten by new files of the same name.

The number of digits in the counter will be equal to the number of digits in the Max Append Value. For example, the default Max Append Value '999' will always cause 3 digits to be added to the FileName. If 0 is specified, then no counter will be appended to the File Name.

Reset

Restarts the counter that is appended to the specified File Name for both image and SVG files. Existing image files and SVG files on the target system will be overwritten by new files of the same name.

0 = OFF (default) | The counter will continue to increment as each image is written out, up to the Max Append Value.
1 = ON | The counter will reset to 0.

Data Format

The file format of the image that will be written out to the target host.

0 = BMP (default) | Windows bitmap format (.BMP extension).
1 = JPEG | Standard encoded JPEG format (.JPG extension).

Save Graphic Overlays

Specifies whether an SVG file is created that contains overlay graphic data for supported In-Sight Vision Tools, Geometry Functions and Graphics Functions, when their Show parameter is set to display graphics. For more information, see Vision Tools, Geometry Functions and Graphics Functions. The overlay graphics uses the formatting specified by the Format Cells dialog. For more information, see Format Cells Dialog.

To view the SVG file and image file, open the SVG file with a Web browser that supports the SVG file type. The SVG file contains an internal link to the acquired image associated with it, and when the browser opens the SVG file, it follows the link to open and display the acquired image along with the overlay graphics.

Note:
  • When enabled, the SVG file will use the name specified in the File Name parameter.
  • Due to the graphics being rendered by a third-party application, such as a Web browser, the overlay graphic data will not be an exact pixel-for-pixel match.
  • In-Sight firmware does not guarantee the transmission of every SVG and image file pair. If the In-Sight vision system is overloaded, it may skip the transmission of the SVG and/or image file to ensure that inspections and/or image acquisitions are not missed.
  • When using In-Sight firmware 5.6.0 or later and the function's Host Name parameter is set to an In-Sight emulator, the SVG files are saved to the emulator directory (C:\ProgramData\Cognex\In-Sight\Emulators\5.x.x) and displayed in the In-Sight Files pane. For more information, see In-Sight Files
  • When using In-Sight firmware 5.5.x or earlier and the function's Host Name is set to an In-Sight emulator, the SVG files are saved to the emulator directory but will not be displayed in the In-Sight Files pane.
0 = OFF (default) | Specifies that only the image will be transferred.
1 = ON | Specifies that the image and an SVG file will be transferred. When enabled, the SVG file containing the graphic overlay data will be saved into the same directory specified for the images. Use a Web browser, such as Microsoft Internet Explorer 9.0 or later, to view the graphic overlay data and images together.
Resolution

Specifies the image resolution at which the image will be exported.

1 = Full (default) | The image is exported at full resolution.
2 = Half | The image is exported at half resolution.
3 = Quarter | The image is exported at quarter resolution.
Disable FTP Queuing

Specifies whether or not images should be queued prior to FTP transfer.

0 = Queue (default) | When this functionality is enabled, an attempt will be made to add the image to the FTP task queue every 5 milliseconds, up to 1,000 times, before dropping the image.
1 = Disable Queuing | When queuing is disabled, only one image from each instance of the function will be added to the FTP task queue at a time, otherwise the image will be dropped and no attempts will be made to re-send the image to the FTP task queue.

WriteImageFTP Outputs

Returns
  • An FTP data structure that will write the image data contained in the specified Image data structure to a file on the target system whenever the spreadsheet is updated.
  • Returns #ERR if the Host Name, User Name, or Password are invalid for the target host, if any input parameters are invalid or if the image queue is full. The image queue may contain one image at a time. If WriteImageFTP executes and tries to send an image before the previous image has been sent, the function will return an error.
Note:
  • If an image is queued, but the transfer to the target host failed, an #ERR is not returned.
  • Network errors that are generated by the function (such as invalid Host Name, User Name or Password) can be detected by inserting a separate Event function into the spreadsheet and specifying "Network Error" for the Trigger parameter. For more information, see WriteImageFTP and Event. These errors are then reported by the GetErrorString and GetErrorCode functions, which must reference the Event function. The last error message/code is stored and is returned until another network error is reported. For more information, see GetErrorString and GetErrorCode.

WriteImageFTP Example

WriteImageFTP($A$0,"SYSTEM1","admin","*",$A$0,"\IMAGES\TEST",999,0,0,0,1,0)

Whenever the spreadsheet updates after an image acquisition, this formula writes a bitmap image file across the network to the IMAGES directory located on the host named SYSTEM1. The user name admin, its password, and the IMAGES directory must already exist on SYSTEM1, or #ERR will be returned in the spreadsheet. The first file written would be TEST000.BMP, the second TEST001.BMP, and so on.

Note: A typical application would have the function be cell-state driven to save images only when a failed inspection occurs during runtime. For more information, see Cell State Dialog.


WriteImageSFTP

Writes the current image to an SFTP server on the network, communicating over the SSH protocol. Optionally, an SVG file may be created, which includes the overlay graphics on top of the image. This function is typically used to automatically save images of failed inspections during runtime.

Note:
  • This function cannot be used to transfer images to another In-Sight vision system or Emulator; a vision system may only serve as a client on a SFTP network.
  • The function requires the In-Sight vision system to be Online to send images and SVG files.
  • If you are logged on to an In-Sight vision system remotely, the screen image may not be refreshed with every image acquisition when using the function.
  • If a memory-intensive job containing the function is executed repeatedly, the FTP command "Get image.jpg" (or .bmp) may fail because the vision system's memory becomes too fragmented. The job will continue to execute correctly.
  • If an AcquireImage function parameter is modified while the vision system is Online, the function will send the current image.
  • Jobs containing this function that are saved in In-Sight Explorer 4.3.0 or higher are only compatible with In-Sight Explorer 4.3.0 and higher.
  • The port number of the FTP server connection can be changed by appending the host name (or IP address) with a colon (:) then the new port number. For example, if the current Host Name was PRODUCTION1, to change the port number from the default (port 21) to port 34, the Host Name parameter would be specified as PRODUCTION1:34.

  • The Emulator folder is located: C:\ProgramData\Cognex\In-Sight\Emulators\x.x.x (Windows 7/Windows 10). For more information, refer to the Emulation Panel.

  • If the default location of the saved images is kept as the Emulator folder, allowing more than 250 image files to be stored in the directory will prevent a firmware update of the vision system. Remove the image files from the directory to restore firmware update capability. For more information, see Update Firmware Dialog.

WriteImageSFTP Inputs

WriteImageSFTP(Event,Host Name,User Name,Password,Image,File Name,Max Append Value,Reset,Data Format,Save Graphic Overlays,Resolution,Disable SFTP Queuing)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Host Name

The host name (or IP address) of the target device on the network where the image file will be written. The target device can be an In-Sight emulator, or any other host acting as an FTP server on the network. An In-Sight vision system may only serve as a client on a SFTP network. The WriteImageSFTP function cannot be used to transfer images to another In-Sight vision system or Emulator.

Note:
  • If an invalid Host Name is specified, the connection may take up to 30 seconds to timeout.
  • When writing images to an FTP server, do not use spaces before or after the name specified in the Host Name or User Name. If the name specified in the Host Name or User Name parameters contains a space before or after the name, the function will fail to write the image to the specified server.

User Name

A valid user name for the target system's SFTP server. This user name is not required to exist on the In-Sight vision system that is writing the image file.

Password

A valid password for the target system's SFTP server. The password is case-sensitive, and its length cannot exceed 15 characters.

Note:
  • For security purposes, the entered password will be masked with "*" in the property sheet and in the formula bar.
  • The password will be saved in the job file in encrypted form.

Image

A reference to a cell containing an Image data structure. The default reference is to the Image data structure in cell A0.

File Name

The name of the image file to write; also defines the name of the SVG file, if the Save Graphic Overlays parameter is enabled. Long file names are supported, including a numeric counter that can be appended to the file name as each file is written (up to the specified Max Append Value). If no path is specified, the image file will be written to the default directory of the FTP server on the target host.

Max Append Value

The maximum number (0 to 9999999; default = 999) of unique image files that can be written using the specified File Name. A counter will be added to the end of the specified File Name and will increment itself as each image file is written. The counter automatically resets itself when it equals the Max Append Value; existing image files on the target system will be overwritten by new files of the same name.

The number of digits in the counter will be equal to the number of digits in the Max Append Value. For example, the default Max Append Value '999' will always cause 3 digits to be added to the FileName. If 0 is specified, then no counter will be appended to the File Name.

Reset

Restarts the counter that is appended to the specified File Name for both image and SVG files. Existing image files and SVG files on the target system will be overwritten by new files of the same name.

0 = OFF (default) | The counter will continue to increment as each image is written out, up to the Max Append Value.
1 = ON | The counter will reset to 0.

Data Format

The file format of the image that will be written out to the target host.

0 = BMP (default) | Windows bitmap format (.BMP extension).
1 = JPEG | Standard encoded JPEG format (.JPG extension).

Save Graphic Overlays

Specifies whether an SVG file is created that contains overlay graphic data for supported In-Sight Vision Tools, Geometry Functions and Graphics Functions, when their Show parameter is set to display graphics. For more information, see Vision Tools, Geometry Functions and Graphics Functions. The overlay graphics uses the formatting specified by the Format Cells dialog. For more information, see Format Cells Dialog.

To view the SVG file and image file, open the SVG file with a Web browser that supports the SVG file type. The SVG file contains an internal link to the acquired image associated with it, and when the browser opens the SVG file, it follows the link to open and display the acquired image along with the overlay graphics.

Note:
  • When enabled, the SVG file will use the name specified in the File Name parameter.
  • Due to the graphics being rendered by a third-party application, such as a Web browser, the overlay graphic data will not be an exact pixel-for-pixel match.
  • In-Sight firmware does not guarantee the transmission of every SVG and image file pair. If the In-Sight vision system is overloaded, it may skip the transmission of the SVG and/or image file to ensure that inspections and/or image acquisitions are not missed.
0 = OFF (default) | Specifies that only the image will be transferred.
1 = ON | Specifies that the image and an SVG file will be transferred. When enabled, the SVG file containing the graphic overlay data will be saved into the same directory specified for the images. Use a Web browser, such as Microsoft Internet Explorer 9.0 or later, to view the graphic overlay data and images together.
Resolution

Specifies the image resolution at which the image will be exported.

1 = Full (default) | The image is exported at full resolution.
2 = Half | The image is exported at half resolution.
3 = Quarter | The image is exported at quarter resolution.
Disable SFTP Queuing

Specifies whether or not images should be queued prior to FTP transfer.

0 = Queue (default) | When this functionality is enabled, an attempt will be made to add the image to the FTP task queue every 5 milliseconds, up to 1,000 times, before dropping the image.
1 = Disable Queuing | When queuing is disabled, only one image from each instance of the function will be added to the FTP task queue at a time, otherwise the image will be dropped and no attempts will be made to re-send the image to the FTP task queue.

WriteImageSFTP Outputs

Returns
  • An SFTP data structure that will write the image data contained in the specified Image data structure to a file on the target system whenever the spreadsheet is updated.
  • Returns #ERR if the Host Name, User Name, or Password are invalid for the target host, if any input parameters are invalid or if the image queue is full. The image queue may contain one image at a time. If WriteImageFTP executes and tries to send an image before the previous image has been sent, the function will return an error.
Note:
  • If an image is queued, but the transfer to the target host failed, an #ERR is not returned.
  • Network errors that are generated by the function (such as invalid Host Name, User Name or Password) can be detected by inserting a separate Event function into the spreadsheet and specifying "Network Error" for the Trigger parameter. For more information, see WriteImageFTP and Event. These errors are then reported by the GetErrorString and GetErrorCode functions, which must reference the Event function. The last error message/code is stored and is returned until another network error is reported. For more information, see GetErrorString and GetErrorCode.

WriteImageSFTP Example

WriteImageSFTP($A$0,"SYSTEM1","admin","*",$A$0,"\IMAGES\TEST",999,0,0,0,1,0)

Whenever the spreadsheet updates after an image acquisition, this formula writes a bitmap image file across the network to the IMAGES directory located on the host named SYSTEM1. The user name admin, its password, and the IMAGES directory must already exist on SYSTEM1, or #ERR will be returned in the spreadsheet. The first file written would be TEST000.BMP, the second TEST001.BMP, and so on.

Note: A typical application would have the function be cell-state driven to save images only when a failed inspection occurs during runtime. For more information, see Cell State Dialog.


WriteMC

The WriteMC function creates an SLMP connection to the Mitsubishi PLC and Motion Controller (MC), and sends a Batch Write command using a 3E QnA compatible or a 1E A compatible Binary frame to write data from the PLC/MC.

Note:
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
  • The In-Sight 2000 series vision sensor does not support robot controllers.
  • When an In-Sight vision system is configured to communicate with a Automation Controller over SLMP, the protocol only supports the transfer of data between the vision system and the Automation Controller.

WriteMCInputs

Syntax: WriteMC(Event,Host Name,Port,PLC Series,Device Address,Timeout,Buffer)

Parameter Description

Event

Specifies the update event on which to read data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Host Name

Specifies the IP address of the Mitsubishi Automation Controller to which data is written.

Port

Specifies the port number of the SLMP server which is open on the MELSEC EtherNet module.

PLC Series

Specifies the message frame that the data packet will be encapsulated.

Note: The In-Sight 2000 series vision sensor does not support CR800-D Series (3E Frame).

  • In-Sight Firmware Version 5.4.0 or later:

    0 = iQ-R/Q/L Series (3E Frame)

    Uses the QnA compatible 3E frame to send a Batch Read command.

    1 = FX Series (1E Frame)

    Uses the A compatible 1E frame to send a Batch Read command.
    2 = iQ-F Series (3E Frame) | Uses the QnA compatible 3E frame to send a Batch Read command.
    3 = CR800-D Series (3E Frame) | Uses the QnA compatible 3E frame to send a Batch Read command.

  • In-Sight Firmware Version 4.10.4 or later:

    0 = iQ-F/R/Q/L Series (3E Frame)

    Uses the QnA compatible 3E frame to send a Batch Read command.

    1 = FX Series (1E Frame)

    Uses the A compatible 1E frame to send a Batch Read command.

Device Address

Specifies the memory location of the Mitsubishi PLC to which data is written.

Timeout

Specifies the amount of time, in milliseconds(5 to 30000; default = 1000ms), that the function will attempt to transmit data before execution is halted and an #ERR is returned.

Buffer

Specifies a referenced Buffer structure created by the FormatOutputBuffer function, which defines how the received data is interpreted. For more information, see FormatOutputBuffer.

Note: When iQ-R/Q/L Series, iQ-F Series, iQ-F/R/Q/L Series or CR800-D is the selected PLC Series, the total maximum length for input data is 1920 bytes. When FX Series is the selected PLC Series, the total maximum length for input data is 128 bytes.

WriteMCOutputs

Returns

The number of elements written or #ERR if an input parameter is invalid.


WriteModbusBuffer

Writes data from a referenced Buffer structure, created by the FormatOutputBuffer function, making it available to a remote client device using the Modbus protocol. The remote client that is reading from the In-Sight vision system must read from Registers 30010 – 30137 to access this data. For more information, see FormatOutputBuffer.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • For available Modbus TCP implementations based on different In-Sight firmware versions, see Modbus TCP Communications.

WriteModbusBuffer Inputs

Syntax: WriteModbusBuffer(Event,Buffer,Byte/Word Order)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structure created by a FormatOutputBuffer function, which contains automatically formatted data.

Note: The maximum length for output data is 4,000 bytes.

Byte/Word Order

Specifies the bit order for words and bytes written by the function. The available values are:

  • Big endian - Specifies that the most significant value is stored first using 32-bit words.
  • Little endian - Specifies that the least significant value is stored first using 32-bit words.
  • Big endian with 16-bit words - Specifies that the most significant value is stored first.
  • Big endian with 16-bit words - Specifies that the least significant value is stored first.

WriteModbusBuffer Outputs

Returns

The number of elements written or #ERR if an input parameter is invalid, or if a connection to a client has not been established.


WriteProfinetBuffer

Writes data from a referenced Buffer structure, created by the FormatOutputBuffer function, to remote PROFINET IO client devices. For more information, see FormatOutputBuffer.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, it will automatically be replaced by the WriteResultsBuffer function (the Protocol parameter will be set to Default). For more information, see WriteResultsBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • An In-Sight vision system can act as a server only; it will not initiate a connection to another device.
  • Only one WriteProfinetBuffer function should be placed in the spreadsheet. Multiple WriteProfinetBuffer functions may overwrite data waiting to be sent in the flash memory buffers.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.

WriteProfinetBuffer Inputs

Syntax: WriteProfinetBuffer(Event,Buffer)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Bufer data structure created by the FormatOutputBuffer function, which contains automatically formatted data.

Note: The maximum length for output data is 4,000 bytes.

WriteProfinetBuffer Outputs

Returns

The number of elements written or #ERR if an input parameter is invalid, or if a connection to a client has not been established.


WriteResult

Exports values from the spreadsheet of one In-sight sensor (the sender) to another device (the receiver).

Note:
  • Only one WriteResult function is allowed per job; if there are multiple WriteResult functions in one job, all but one will return #ERR.
  • The receiving device must have a ReadResult function in its spreadsheet in order to import the values. For more information, see ReadResult.
  • Both the sending and receiving devices must be Online.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • When using the WriteResult and ReadResult functions, it is strongly recommended that the In-Sight sensor using the ReadResult function be configured as a network trigger Master in the AcquireImage function, and that the sensor(s) using WriteResult be configured as network trigger Slaves. This allows the results to be synchronized so the Master will read the results generated by the Slave(s) in response to the current trigger. For more information, see AcquireImage.

WriteResult Inputs

Syntax: WriteResult(Event,Cell1,[Cell2,...])

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Cell

References one or more spreadsheet cells containing the values to export from the sending In-Sight sensor to the receiving device. The order in which the cells are referenced determines the index position of each value in the Result data structure on the receiving device.

WriteResult Outputs

Returns

A Result data structure containing the values that will be written out to the receiving In-Sight sensor, or #ERR if any of the input parameters are invalid.

Note: If the Timeout period, specified in the referenced ReadResult function, is exceeded during a write operation to a TCP/IP buffer that is full, an #ERR is not returned.

WriteResult Example

For an illustration of these two functions working together, see the ReadResult Example.


WriteResultsBuffer

Writes data from a referenced Buffer data structure, created by a FormatOutputBuffer function, to the currently enabled factory communication protocol (which is enabled in the Network Settings dialog). This function also writes the Result Code field for the factory communication protocols. For more information, see FormatOutputBuffer.

Note: If the WriteResultsBuffer function is used when the PROFINET communication protocol is enabled, bytes will be swapped. For more information, see PROFINET Communications.

WriteResultsBuffer Inputs

Syntax: WriteResultsBuffer(Event,Buffer,Result Code,Protocol,Byte/Word Order)

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

Specifies a reference to a Buffer data structure created by a FormatOutputBuffer function, which contains automatically formatted data.

Note: The maximum length for output data is 4,000 bytes.
Result Code

Specifies a 16-bit integer that can be used to communicate the result of the In-Sight vision system's inspection to any connected devices.
Protocol

Specifies which protocol the user data should be written to.

Note: This parameter is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

0 = EtherNet/IP

 Specifies that EtherNet/IP is the enabled factory communication protocol. For more information, see EtherNet/IP Communications.

1 = PROFINET

 Specifies that PROFINET is the enabled factory communication protocol. For more information, see PROFINET Communications.

2 = SLMP Protocol Scanner

 Specifies that SLMP Scanner is the enabled factory communication protocol. For more information, see Configuring In-Sight Vision Systems for SLMP Communications.

3 = Modbus TCP Server

Specifies that Modbus TCP Server is the enabled factory communication protocol. For more information, see Modbus TCP Communications.

Note: This protocol is only available on In-Sight vision systems running In-Sight firmware version 5.3.0 and later.

8 = CC-Link IE Field Basic Bit

 Specifies that CC-Link IE Field Basic is the enabled factory communication protocol, and writes result buffer to the RX bit space. For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

9 = CC-Link IE Field Basic Word

 Specifies that CC-Link IE Field Basic is the enabled factory communication protocol, and writes result buffer to the RWr word space. For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

100 = Any (Default)

Specifies that the currently enabled factory communication protocol will be used (which is enabled via the Network Settings dialog). If more than one protocol is enabled, the first enabled protocol will be used. For more information, see Network Settings Dialog.

Byte/Word Order

Specifies the bit order for words and bytes read by the function.

Note: This parameter is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

0 = Big endian (= default for Modbus)

Specifies that the most significant byte is stored first and subsequent bytes are stored in descending order.

1 = Little endian

Specifies that the least significant byte is stored first and subsequent bytes are stored in ascending order.

2 = Big endian (word swapping)

Big endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)

3 = Little endian (word swapping)

Little endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)

100 = Default (when unselected)

The default setting (below) is used.

EtherNet/IP | Little endian
PROFINET | Big endian
SLMP Protocol Scanner | Little endian
Modbus TCP Server | Big endian
CC-Link IE Field Basic | Little endian

Examples:

AB (one-word-sized value): A = the most significant byte, B = the least significant byte:

 | Order of Arrival
Big endian (=default) | AB
Little endian | BA
Big endian (word swapping) | AB
Little endian (word swapping) | BA

12AB (two-word-sized value): 1 = the most significant byte, B = the least significant byte:

 | Order of Arrival
Big endian (=default) | 12 | AB
Little endian | BA | 21
Big endian (word swapping) | AB | 12
Little endian (word swapping) | 21 | BA

WriteResultsBuffer Outputs

Returns
  • A Write Result data structure containing the data sent to the client.
  • When connected to an In-Sight vision system running In-Sight firmware 4.x.x and earlier, the function will return the number of elements written or #ERR if an input parameter is invalid, or if a connection to a client has not been established.


WriteSMTP

Sends an email message via an Simple Mail Transfer Protocol (SMTP) server, a protocol for sending email messages between servers.

The message can be sent with an image attached. Optionally, the image file may be a complete screen capture, including overlay graphics on top of the image.

CAUTION: Do not reference this function to an event that triggers with high frequency, such as continuous image acquisition; the mail server may become overloaded with messages.
Note:
  • The cell state of the WriteSMTP function must be referenced to an Event or Button function. For more information, see Cell State Dialog.
  • The WriteSMTP function requires the In-Sight sensor to be Online.
  • If a memory-intensive job containing the function is executed repeatedly, the FTP command "Get image.jpg" (or .bmp) may fail because the vision system's memory becomes too fragmented. The job will continue to execute correctly.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.

WriteSMTP Inputs

Syntax: WriteSMTP(Event,SMTP Mail Server,To,Cc,From,Subject,Importance,Image Attachment,Image Name,Image Format,Screen Capture,Message Text,Message Text,Message Text,Message Text)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

SMTP Mail Server

Host name or IP address of an SMTP server.

Note:
  • The messages are sent in Multipurpose Internet Mail Extensions (MIME) 1.0 format, a specification for formatting non-ASCII messages so that they can be sent over the Internet. The actual SMTP mail server name or IP address must be referenced.
  • Domain Name Service (DNS) mail exchange (MX) record lookups are not supported. The actual SMTP mail server name or IP address must be referenced. For more information, see Domain Name Service (DNS) Server.
  • When the In-Sight sensor is assigned a static IP address, both the default gateway and the domain must be properly configured. Otherwise, WriteSMTP may fail to send messages. For more information, see Network Settings Dialog.
  • If an invalid Host Name is specified, the connection may take up to 30 seconds to timeout.

To

Email address of the message recipient.

Cc

Email address(es) of any alternate recipients.

From

Sender of the message.
Note: The To, Cc, and From values must be in the format "user@domain", and the domain must be valid.

Subject

Subject text of the message.

Importance

Importance of the message.

  • 0 = Low
  • 1 = Normal (default)
  • 2 = High

Image Attachment

Sends an image as an attachment.

Image Name

File name of the attachment; the default is "Image".

Image Format

File format of the image that will be written out to the target host.

0 = BMP (default) | Windows bitmap format (.BMP extension).
1 = JPEG | Standard encoded JPEG format (.JPG extension).

Screen Capture

Specifies whether the image will be written to the remote host system with or without any graphic overlays (In-Sight 3400 only).

  • 0 = no graphic overlays (default)
  • 1 = include graphic overlays

Message Text

 Specifies the message body text string to be written, or a reference to a cell containing the text. The function allows reference to four cells; each cell can hold up to 254 characters of text.

WriteSMTP Outputs

Returns

An SMTP data structure that will send an email message whenever the spreadsheet is updated.

WriteSMTP Example

WriteSMTP($A$0,"mailserver@yourdomain.com.","recipient@yourdomain.com","copy@yourdomain.com","from@yourdomain.com","Message",1,0,"Image",0,0,"Image Sent", "","","")

Whenever the spreadsheet updates after the referenced Event function activates, this function sends an email message by way of an SMTP mail server. Here is an example of a WriteSMTP property sheet:


Serial Functions

Serial functions read/write data from/to the serial ports on an In-Sight sensor.

  • ReadSerial: Reads a text string from the serial port into a cell.
  • ReadDeviceNet: Reads data sent by the DeviceNet Interface Module into a cell.
  • ReadDeviceNetBuffer: Reads data sent by the DeviceNet Interface Module, attached to the serial port of an In-Sight sensor, to a referenced Buffer structure created by the FormatInputBuffer function.
  • WriteDeviceNet: Writes data from a cell out to the optional DeviceNet Interface Module.
  • WriteDeviceNetBuffer: Writes data to a referenced Buffer structure created by the FormatOutputBuffer function to be read by a DeviceNet Interface Module attached to the serial port of an In-Sight sensor.
  • WriteSerial: Writes a text string from a cell out to the serial port.
Note:
  • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .

ReadDeviceNet

ReadDeviceNetBuffer

ReadSerial

WriteDeviceNet

WriteDeviceNetBuffer

WriteSerial


ReadDeviceNet

Reads data into a spreadsheet cell from the (optional) DeviceNet Interface Module connected to an In-Sight serial port.

Note:
  • The selected serial port must be configured for DeviceNet communications, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • When using the CIO-1450 I/O Module, if a serial packet is greater than 256 bytes (including termination character), there could be a loss of serial communication between the In-Sight vision system and I/O module, requiring the power to be cycled on both.

  • The ReadDeviceNet function requires a third-party RS-232-to-DeviceNet Gateway adapter. This function is available for legacy installations and should not be used in new applications, unless the RS-232-to-DeviceNet Gateway converter has been thoroughly tested to verify it is suitable for the application.

ReadDeviceNet Inputs

Syntax: ReadDeviceNet(Event,Port,Mapping,Compatibility Mode)

Parameter Description

Event

Specifies the update event on which to read data.

  • This parameter must reference a cell containing an Event function in order to return data. For more information, see Event.
  • The Event function's Trigger parameter must specify Serial Port 1 and the Manual parameter must be unchecked.
  • The Event function will appear in the Job Edit toolbar as Event(65,0).

Port

Specifies the serial port (0 or 1) from which to read data, depending on the port availability of the active In-Sight vision system.

Mapping

Specifies a data mapping, which consists of a list of specifiers delimited by colon (:) characters. Each specifier has two parts:

  • The starting byte.
  • A data type code.

The various data type codes are listed in the following table:

Code | Data Type
i | 8-bit integer
u | 8-bit unsigned integer
il | 16-bit integer
ul | 16-bit unsigned integer
f | 32-bit floating-point number
s | Text string

Example: The data mapping, "0i:1f:5u:6s" specifies that the first data item (at offset 0) is an 8-bit integer, which triggers an acquisition if non-zero; the second item (at offset 1) is a floating-point value; the third (at offset 5) is a 1-byte unsigned integer; and the rest of the packet (starting at offset 6) is a string.

Note: The length of the data must match the DeviceNet block size specified in the DeviceNet details. For more information, see Serial Port Settings Dialog.

Compatibility Mode

Specifies whether or not an In-Sight 1000 interprets the incoming byte stream in the same order as an In-Sight 3000. This parameter is ignored for all other In-Sight models.

ReadDeviceNet Outputs

Returns | A ReadDeviceNet data structure containing the data read into the spreadsheet from the DeviceNet Interface Module, or #ERR if any input parameters are invalid.
Results | Data in the ReadDeviceNet structure is accessed using the GetBufferData function. For more information, see Input/Output.


ReadDeviceNetBuffer

Reads data sent by the DeviceNet Interface Module, attached to the serial port of an In-Sight sensor. The referenced Buffer structure, which is created by the FormatInputBuffer function, defines how the received data is interpreted. For more information, see FormatInputBuffer.

Note:
  • The selected serial port must be configured for DeviceNet communications, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • When using the CIO-1450 I/O Module, if a serial packet is greater than 256 bytes (including termination character), there could be a loss of serial communication between the In-Sight vision system and I/O module, requiring the power to be cycled on both.
  • This function is available for legacy installations and should not be used in new applications, unless the RS-232-to-DeviceNet Gateway converter has been thoroughly tested to verify it is suitable for the application.

ReadDeviceNetBuffer Inputs

Syntax: ReadDeviceNetBuffer(Event,Port,Buffer)

Parameter Description

Event

Specifies the update event on which to read data.

  • This parameter must reference a cell containing an Event function in order to return data. For more information, see Event.
  • The Event function's Trigger parameter must specify Serial Port 1 and the Manual parameter must be unchecked.
  • The Event function will appear in the Job Edit toolbar as Event(65,0).

Port

Specifies the serial port (0 or 1) from which to read data, depending on the port availability of the active In-Sight vision system.

Buffer

Specifies a referenced Buffer structure created by the FormatInputBuffer function, which defines how the received data is interpreted.

Note: The length of the data must match the DeviceNet block size specified in the DeviceNet details. For more information, see Serial Port Settings Dialog.

ReadDeviceNetBuffer Outputs

Returns | A ReadDeviceNet data structure containing the data read into the spreadsheet from the DeviceNet Interface Module, or #ERR if any input parameters are invalid.
Results | Data in the ReadDeviceNet structure is accessed using the GetBufferData function. For more information, see Input/Output.


ReadSerial

Reads a text string from the specified serial port into a cell.

Note:
  • The selected serial port must be configured for Text mode, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
  • The CIO-WENET Ethernet I/O module does not support serial communication.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.
  • When using the CIO-1450 I/O Module, if a serial packet is greater than 256 bytes (including termination character), there could be a loss of serial communication between the In-Sight vision system and I/O Module, requiring the power to be cycled on both.

ReadSerial Inputs

Syntax: ReadSerial(Event,Port)

Parameter Description

Event

Specifies the update event on which to read data.

  • This parameter must reference a cell containing an Event function in order to return data. For more information, see Event.
  • The Event's Trigger parameter must specify Serial Port 1 and the Manual parameter must be unchecked.
  • The Event function will appear in the Job Edit toolbar as Event(65,0).

Port

Specifies the serial port to be read.

  • Must be 1 for In-Sight vision systems.
  • Can be 0 or 1 for an In-Sight emulator.

ReadSerial Outputs

Returns

A Serial data structure containing the text string read, or #ERR if either input parameter is invalid.


WriteDeviceNet

Writes data from a cell out to a DeviceNet Interface Module attached to the serial port of an In-Sight sensor.

Note:
  • The selected serial port must be configured for DeviceNet communications, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • WriteDeviceNet will halt the execution of acquisition and spreadsheet functions if the serial port's internal buffer is full. WriteDeviceNet will resume spreadsheet operations as data is read out from the buffer and the buffer is emptied.
  • The WriteDeviceNet function requires a third-party RS-232-to-DeviceNet Gateway adapter. This function is available for legacy installations and should not be used in new applications, unless the RS-232-to-DeviceNet Gateway converter has been thoroughly tested to verify it is suitable for the application.

WriteDeviceNet Inputs

Syntax: WriteDeviceNet(Event,Port,MapSpec,Compatibility,Value1,[Value2,...])

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Port

Specifies the serial port to be written. Must be 1 for In-Sight sensors. Can be 0 or 1 for an In-Sight emulators.

MapSpec

Specifies a data mapping (DataMap), which consists of a list of specifiers delimited by colon (:) characters. Each specifier has two parts: the starting byte and a data type code. The various data type codes are listed in the following table:

Code | Data Type
i | 8-bit integer
u | 8-bit unsigned integer
il | 16-bit integer
ul | 16-bit unsigned integer
f | 32-bit floating-point number
s | Text string

Example: "0i:1f:5u:6s" specifies that the first data item (at offset 0) is an 8-bit integer, which triggers an acquisition if non-zero; the second item (at offset 1) is a floating-point value; the third (at offset 5) is a 1-byte unsigned integer; and the rest of the packet (starting at offset 6) is a string.

Note: The length of the data must match the DeviceNet block size specified in the DeviceNet details. For more information, see Serial Port Settings Dialog.

Compatibility

Specifies whether an In-Sight 1000 sends an outgoing byte stream in the same order as an In-Sight 3000. This parameter is ignored for all other In-Sight models.

  • 0 = Compatibility Off
  • 1 = Compatibility On

Value

Specifies a variable length list of values consistent with the MapSpec (Value1, Value2, ...).

WriteDeviceNet Outputs

Returns

#ERR on invalid input parameter.


WriteDeviceNetBuffer

Writes data from a referenced Buffer structure created bythe FormatOutputBuffer function tobe read by a DeviceNetInterface Module attached to the serial port of an In-Sight sensor.For more information, see FormatOutputBuffer.

Note:
  • The selected serial port must be configured for DeviceNet communications, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • The WriteDeviceNet function requires a third-party RS-232-to-DeviceNet Gateway adapter.This function is available for legacy installations and should not be used in new applications, unless the RS-232-to-DeviceNet Gateway converter has been thoroughly tested to verify it is suitable for the application.

WriteDeviceNetBufferInputs

Syntax: WriteDeviceNetBuffer(Event,Port,Buffer)

Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • TheImage data structurein cell A0, containing the AcquireImagefunction.For more information, see AcquireImage.
  • Acell containing an Event function.For more information, see Event.
  • Acell containing a Button function.For more information, see Button.
  • A cell containing a numeric value (any non-zero numeric value will force the update).

Port

Specifies the serial port to be written.Must be 1 for In-Sight sensors.Can be 0 or 1for an In-Sight emulators.

Buffer

Specifies a referenced Buffer structurecreated by the FormatOutputBufferfunction, which contains automatically formatted data.

Note: The lengthof the data must match the DeviceNet block size specified in the DeviceNetdetails.For more information, see Serial Port Settings Dialog.

WriteDeviceNetBufferOutputs

Returns

#ERR on invalid input parameter.


WriteSerial

Writes a text string out to the specified serial port whenever the spreadsheet is updated.

Note:
  • The selected serial port must be configured for Text mode, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
  • The CIO-WENET Ethernet I/O module does not support serial communication.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.
  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.

WriteSerial Inputs

Syntax: WriteSerial(Event,Port,String)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Port

Specifies the serial port to be written. Must be 1 for In-Sight vision systems. Can be 0 or 1 for an In-Sight emulator.

String

Specifies the text string to be written or a reference to a cell containing the text.

WriteSerial Outputs

Returns

The text string to be written or #ERR if either input parameter is invalid.


SetEvent

Queues up an Event function to execute after the current job execution is complete. This function can also be used as a source of soft triggers for the AcquireImage function. For more information, see Event and AcquireImage.

Note:
  • The maximum number of queued events that an In-Sight vision system is able to store is 30.
  • If creating a repeating iteration of cells using the Repeat or RepeatUntil functions, the SetEvent function should not be placed within the cells being iterated. Doing so may cause the SetEvent function to exceed the maximum number of queued events, resulting in missed event triggers.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

SetEvent Inputs

Syntax: SetEvent(Trigger)

Parameter Description

Trigger

Specifies a trigger signal for the event.

-1 = none (default) | No trigger will be signaled.
32 = manual | A manual trigger will be signaled.
80 to 87 = soft (0 to 7) | A soft trigger event will be signaled.

SetEvent Outputs

Returns

The trigger signal value, or #ERR if any of the input parameters are invalid.

SetEvent Example

The SetEvent function may be used to trigger an event in the spreadsheet, using conditionally enabled cell-state functionality. For more information, see Cell State Dialog.

The following example illustrates how to trigger the SetEvent function through conditionally enabling and disabling the SetEvent function through another spreadsheet cell's state. In this example, a spreadsheet cell is monitored to determine if it has transitioned between 0 and 1, which is used to determine whether or not SetEvent should be enabled or disabled.

  1. For the purposes of this example, a spreadsheet is configured as shown in the graphic below:

  2. The Logic Cell in A3 is monitored by the SetEvent function in B3. The Count in cell D3 monitors the number of transitions.

  3. When cell A3 transitions from 1 to 0 and back to 1, the SetEvent function in B3 will issue a soft trigger event, and the Count in D3 will increment.


Time/Timer Functions

Time functions read an In-Sight vision system's internal clock and can trigger spreadsheet events at specified times.

Note:
  • The Date/Time Settings dialog configures an In-Sight vision system to use either Simple Network Time Protocol (SNTP) for automatic synchronization of the sensor's internal clock to a local or remote network server's time, or CIP-Sync and the Precision Time Protocol (PTP), defined by the IEEE 1588 (version 2) standard. For more information about setting up and configuring In-Sight vision systems for use with PTP, see Configure Time Synchronization.

  • CIP-Sync/PTP is supported on the following vision systems:

    • In-Sight 5000 series vision systems with 128MB non-volatile flash memory and running firmware version 4.5.0 or later

      Note: The In-Sight 5605 vision system (Hardware Type 821-0032-1R), In-Sight 5705 vision system and In-Sight 5705C vision systems are not supported.
    • In-Sight 7000 Gen2 series vision systems
    • In-Sight 9000 series vision systems
  • GetSystemTimeOffset: Returns the extracted system time offset value from a Time data structure. The system time offset is only valid when PTP is enabled.
  • GetTimeValue: Converts a Time data structure into a time value. The time value is only valid when PTP is enabled.
  • Now: Reads the date and time from an In-Sight sensor's internal clock.
  • Sleep: Pauses the execution of the job.
  • Timer: Triggers a spreadsheet event after a specified interval of time or at specified times, occurring every day.

Now

Sleep

Timer


Now

Reads the date and time from an In-Sight sensor's internal clock.TheGetClock function insertsa formatted text string representing the current date and time into thespreadsheet.For more information, see GetClock(Time, Format String, [Local/GMT]).

Note: The Date/Time Settings dialog configures an In-Sight vision system to use Simple Network Time Protocol (SNTP) for automatic synchronization of the vision system's internal clock to a local or remote network server's time. For more information, see Date/Time Settings Dialog.

NowInputs

Syntax: Now(Event)

Parameter Description

Event

Specifies the update event on which to readthe date and time. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

NowOutputs

Returns | A Time data structure containingthe current date and time, or #ERR if the input Eventvalue is invalid.
Results | The VisionData Access function, GetClock, is automatically inserted into thespreadsheet.


Sleep

Pauses the execution of the job for a specified period of time.

Sleep Inputs

Syntax: Sleep(Duration,Cel1,[Cell2],...)

Parameter | Description
Duration | Specifies the time, in milliseconds, to pause the execution of the job. (5 to 5000) Note: The function will execute when it is first inserted into the spreadsheet and each time the function is updated, whether Online/Offline.
Cell | Specifies a variable-length list of cells to reference. If a range of cells is referenced, the job will pause for the specified Duration after the last cell has updated. If no cells are updated, the function will not execute.


Timer

Triggers a spreadsheet event after an interval of time, or at specific times occurring every day. By default, the function becomes enabled when the In-Sight vision system is placed Online.

Note:
  • The Date/Time Settings dialog configures an In-Sight vision system to use Simple Network Time Protocol (SNTP) for automatic synchronization of the vision system's internal clock to a local or remote network server's time. For more information, see Date/Time Settings Dialog.
  • In order to start or stop the function, the Timer function can be enabled/disabled via its cell state. For more information, see Cell State Dialog.

  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Timer Inputs

Syntax: Timer(Time,Trigger)

Parameter Description

Time

A string indicating an interval of time, or specific daily times. The default interval is one minute.

Time Examples:

"01:00:00" | Triggers every hour.
"00:10:00" | Triggers every 10 minutes.
"00:01:00" | Triggers every 1 minute.
"00:00:10" | Triggers every 10 seconds.
"@8:00" | Triggers at 8:00 a.m. every day.
"@8:30, 20:00" | Triggers at 8:30 a.m. and 8:00 p.m. every day.
Note:
  • When using the @ symbol to designate a specific time, the function will return an #ERR unless the date and time are set manually in the Date/Time Settings Dialog or an SNTP server is enabled.

  • The Time parameter can be a cell reference. In this case, an apostrophe (') must be prepended to the time in the referenced cell. For example, a spreadsheet can be configured as follows:

    A2=Timer(B2,80)

    B2='00:01:00

Trigger

Specifies a trigger signal to occur after the Time interval, or at the specific daily Time(s).

Number | Type of Trigger
-1 = none | No trigger will be signaled.
32 = Manual | Manual trigger will be signaled.
80 to 87 = Soft 0 to Soft 7 | A soft trigger (0 to 7) will be signaled (Default = Soft 0).

Timer Outputs

Returns

A Timer data structure, or #ERR if any of the input parameters is invalid.


Waveform Functions

The Waveform functions generate a Waveform data structure, which is a timing pattern to be sent out one or more of an In-Sight vision system's discrete output lines (either the built-in high-speed outputs or those provided by Cognex I/O modules, selected and configured in the Discrete I/O Settings dialog). For more information, see Discrete I/O Settings.

  • WriteWaveformPulseTrain: Initiates a series of pulses on a single discrete output line.
  • WriteWaveformClocked: Uses two discrete output lines to clock a series of data bits.

WriteWaveformClocked

WriteWaveformPulseTrain


WriteWaveformClocked

Requests data to be clocked out one bit at a time, using one discrete output as a clock and a second output for the data, and produces a Waveform data structure containing the clocked data.

Note:
  • This function is enabled only when the vision system is Online.
  • When transitioning between Online and Offline states, any currently executing Waveform function will be stopped immediately, and all queued Waveforms will be dropped. The Waveforms will only begin when the In-Sight vision system is Online.
  • After the function is triggered to begin the Waveform, the Waveform will continue in the background until it completes its cycle.

WriteWaveformClocked Inputs

Syntax: WriteWaveformClocked(Event,Clock Output,Data Output,Clock Period,Data Valid Edge,Queuing,Idle Periods,Bits)

Parameter | Description

Event

Specifies the event on which to begin the waveform. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Clock Output

Specifies the output line to be used as the clock. Any discrete output line may be used, e.g. high-speed, an In-Sight vision system's user-configurable LEDs or additional I/O module outputs (if connected).

Note:

  • If the selected discrete output's Type parameter is not configured to Waveform, the function will return #ERR. For more information, see Waveform Functions. The #ERR state will not be cleared until the Waveform function is executed, by either one or more cells referenced in the function's parameters executing:

    • A cell referenced in a Conditionally Enabled expression executing. For more information, see Cell State Dialog.
    • The cell containing the function being edited.
    • A job being loaded.

Data Output

Specifies the output line to be used to send the bit stream. Any discrete output line may be used, e.g. high-speed, an In-Sight vision system's user-configurable LEDs or additional I/O module outputs (if connected).

Note:

  • If the selected discrete output's Type parameter is not configured to Waveform, the function will return #ERR. For more information, see Waveform Functions. The #ERR state will not be cleared until the Waveform function is executed, by either one or more cells referenced in the function's parameters executing:

    • A cell referenced in a Conditionally Enabled expression executing. For more information, see Cell State Dialog.
    • The cell containing the function being edited.
    • A job being loaded.
Clock Period | Specifies the period of time (in milliseconds) for each clock output cycle (10 to 10000; default = 1000). The duty cycle for the WriteWaveformClocked function is always 50%; i.e. the clock spends the same amount of time high and low.
Data Valid Edge

Specifies whether or not the next bit should be read on the rising or falling edge of the clock.

0 = Falling Edge (default) | The next bit will be read on the falling edge of the clock.
1 = Rising Edge | The next bit will be read on the rising edge of the clock.
Queuing

Specifies whether or not Waveform queuing is enabled or disabled.

0 = Disabled | When queuing is disabled, if an old Waveform is executing, the function will return #ERR.
1 = Enabled (default) | When queuing is enabled, if an old Waveform is executing, the function will place the new Waveform on a queue to be executed later.

Idle Periods

 Specifies the number of periods (0 to 10000; default = 3) that the function waits in the idle state after the Waveform has completed before beginning the next Waveform.
Bits | Specifies a reference to a BitStream data structure returned by a BitStream function, which contains the bits to be sent. No more than 253 bits can be specified in the BitStream function. For more information, see BitStream.

WriteWaveformClocked Outputs

Returns

A Waveform data structure containing the clocked data; or #ERR if either input parameter is invalid.

WriteWaveformClocked Examples

The following figures illustrate the parameters of the WriteWaveformClocked function. In each example, there are three (3) data bits and two (2) idle periods.

  • WriteWaveformClocked Function with Data Valid Edge set to Falling Edge:

  • WriteWaveformClocked Function with Data Valid Edge set to Rising Edge:

Note: The actual voltage at the output varies, depending on the particular output and wiring. For outputs wired for "NPN" or "Current Sink" operations, the voltage levels will be the reverse of those in the figures above.


WriteWaveformPulseTrain

Requests a series of pulses be sent out a specified discrete output line, and produces a Waveform data structure containing the pulse train data.

Note:
  • This function is enabled only when the vision system is Online.
  • When transitioning between Online and Offline states, any currently executing Waveform function will be stopped immediately, and all queued waveforms will be dropped. The Waveforms will only begin when the In-Sight vision system is Online.
  • After the function is triggered to begin the Waveform, the Waveform will continue in the background until it completes its cycle.
  • Only one Waveform may be generated at a time, regardless of the number of WriteWaveformPulseTrain functions in the job, or the number of output lines dedicated to the function(s).

WriteWaveformPulseTrain Inputs

Syntax: WriteWaveformPulseTrain(Event,Output,Period,Duty Cycle,Pulse Polarity,Queuing,Idle Periods,Number of Pulses)

Parameter | Description

Event

Specifies the event on which to begin the waveform. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

Output

Specifies the output line to be used. Any discrete output line may be used, e.g. high-speed, an In-Sight vision system's user-configurable LEDs or additional I/O module outputs (if connected).

Note:

  • If the selected discrete output's Type parameter is not configured to Waveform, the function will return #ERR. For more information, see Waveform Functions. The #ERR state will not be cleared until the Waveform function is executed, by either one or more cells referenced in the function's parameters executing:

    • A cell referenced in a Conditionally Enabled expression executing. For more information, see Cell State Dialog.
    • The cell containing the function being edited.
    • A job being loaded.

Period

Specifies the total amount of time (in milliseconds) from the start of one pulse to the start of the next pulse (10 to 10,000; default = 1000).
Duty Cycle

Specifies the percent of time (a percentage of the Period parameter) that the pulse spends in the active state (0 to 100%; default = 50).

Note: The actual duty cycle will be the closest possible, given the limitations of the In-Sight vision system and the I/O module used. The Duty Cycle will be less accurate if the Period parameter is set near its minimum value.
Pulse Polarity

Specifies the polarity of the pulse.

0 = High (default) | When the pulse is active, the output line is forced to High. When the pulse is inactive, the output is set to Low.
1 = Low | When the pulse is active, the output line is forced to Low. When the pulse is inactive, the output is set to High.
Queuing

Specifies whether or not Waveform queuing is enabled or disabled.

0 = Disabled | When queuing is disabled, if an old Waveform is executing, the function will return #ERR.
1 = Enabled (default) | When queuing is enabled, if an old Waveform is executing, the function will place the new Waveform on a queue to be executed later.

Idle Periods

 Specifies the number of periods (0 to 10000; default = 3) that the function waits in the idle state after the Waveform has completed before beginning the next Waveform.
Number of Pulses | Specifies the total number of pulses (1 to 10000; default = 10) that constitute the pulse train.

WriteWaveformPulseTrain Outputs

Returns

A Waveform data structure containing the pulse train data, or #ERR if either input parameter is invalid.

WriteWaveformPulseTrain Examples

The following figures illustrate the parameters of the WriteWaveformPulseTrainfunction. In each example, there are three (3) pulses and two (2) idle periods.

  • WriteWaveformPulseTrain Function with Pulse Polarity set to High:

  • WriteWaveformPulseTrain Function with Pulse Polarity set to Low:

Note: The actual voltage at the output varies, depending on the particular output and wiring. For outputs wired for "NPN" or "Current Sink" operations, the voltage levels will be the reverse of those in the figures above.


Clocked Data Storage Functions

Clocked Data Storage functions store a stream of values from a cell over time. Each function returns a single value selected from the stream of values whenever the specified event updates the spreadsheet.

  • Accumulate: Integrates a value over an interval.
  • ClockedMax: Returns the maximum value from a sampled stream during a specified interval.
  • ClockedMin: Returns the minimum value from a sampled stream during a specified interval.
  • ClockedSum: Sums a value from a sampled stream during a specified interval.
  • Count: Counts events over an infinite interval.
  • CountPassFail: Counts and returns passes, failures and total events for a given referenced value.
  • DelayLine: Implements shift-register array into which values are read on an event signal.
  • Latch: Stores an input value on the specified event.
  • LatchImage: Stores an image on the specified event.
  • LatchString: Stores an alphanumeric input string on the specified event.
  • Maximum: Latches a maximum on an input data stream over an infinite interval.
  • Minimum: Latches a minimum on an input data stream over an infinite interval.
  • Repeat: Repeats the execution of specified cells for a specified number of iterations.
  • RepeatUntil: Repeats the execution of specified cells until either an exit condition becomes valid or the maximum number of iterations is reached.
  • ShiftRegister: Implements a shift-register array, or data "stream", into which a cell's values are buffered after each event.
  • StoreData: Stores the results of a cell.

Accumulate

ClockedMax

ClockedMin

ClockedSum

Count

CountPassFail

DelayLine

Latch

LatchImage

LatchString

Maximum

Minimum

Repeat

RepeatUntil

ShiftRegister

StoreData


Accumulate

Sums a value over an infinite interval.The function returns the integralof a data stream sampled on each occurrence of the specified event.

AccumulateInputs

Syntax: Accumulate(Event,Value,Reset,Preset)

Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: The Accumulate function buffersthe state of a referenced value before that value is updated by any otherfunction that depends on the specified Event.

Value

A reference to the cell containing the sourceof the data stream to be accumulated.

Reset

Forces the accumulator to reset to the Preset value.

0 = OFF (default) | The accumulator will continue tosum the specified value indefinitely.
1 = ON | The accumulator will reset immediately.

Preset

Specifies the minimum value to which theaccumulator is reset when Resetis ON.

AccumulateOutputs

Returns

A value representing the summation of thedata stream over a time interval since the last Reset.


ClockedMax

Samples a stream of values over an infinite interval, then returns the maximum value sampled from the stream during that interval.

ClockedMax Inputs

Syntax: ClockedMax(Event,Value,Reset,Preset)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: Unlike the Maximum function, which samples the state of a referenced value before that value is updated by any other function that depends on the specified Event, ClockedMax samples the state of the referenced value after that value is updated by any other function.

Value

A reference to the source cell for the data stream on which a minimum is sought. (-9999999 to 9999999; default = 0).

Reset

Forces the function to reset its internal register to the value specified by Preset.

0 = OFF (default) | The function will continue to sample Value in the current data stream.
1 = ON | The function will reset the minimum value it returns and begin a new data stream from which to sample.

Preset

Specifies the minimum value to which the function is reset (-9999999 to 9999999; default = -9999999).

ClockedMax Outputs

Returns

A value representing the minimum of a data stream over an interval from Reset to current.


ClockedMin

Samples a stream of values over an infinite interval, then returns the minimum value sampled from the stream during that interval.

ClockedMin Inputs

Syntax: ClockedMin(Event,Value,Reset,Preset)

Parameter Description

Event

Specifies the update event on which to read Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: Unlike the Minimum function, which samples the state of a referenced value before that value is updated by any other function that depends on the specified Event, ClockedMin samples the state of the referenced value after that value is updated by any other function.

Value

A reference to the source cell for the data stream on which a minimum is sought (-9999999 to 9999999; default = 0).

Reset

Forces the function to reset its internal register to the value specified by Preset.

0 = OFF (default) | The function will continue to sample Value in the current data stream.
1 = ON | The function will reset the minimum value it returns and begin a new data stream from which to sample.

Preset

Specifies the minimum value to which the function is reset (-9999999 to 9999999; default = 9999999).

ClockedMin Outputs

Returns

A value representing the minimum of a data stream over an interval from Reset to current.


ClockedSum

Sums a value over an infinite interval.The function returns the integralof a data stream sampled on each occurrence of the specified event.

ClockedSumInputs

Syntax: ClockedSum(Event,Value,Reset,Preset)

Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: Unlike theAccumulate function, which sums the stateof a referenced value beforethat value is updated by any other function that depends on the specifiedEvent, ClockedSumsums the state of the referenced value afterthat value is updated by any other function.

Value

A reference to the cell containing the sourceof the data stream to be accumulated (-9999999to 9999999; default = 1).

Reset

Forces the accumulator to reset to the Preset value.

0 = OFF (default) | The accumulator will continue tosum the specified value indefinitely.
1 = ON | The accumulator will reset immediately.

Preset

Specifies the minimum value to which theaccumulator is reset when Resetis ON (-9999999 to 9999999; default =0).

ClockedSumOutputs

Returns

A value representing the summation of thedata stream over a time interval since the last Reset.


Count

Counts events over an infinite interval.The function returns the Preset value plus the number of eventsthat occurred since the last reset.

CountInputs

Syntax: Count(Event,Max Value,Reset,Preset)

Parameter Description

Event

Specifies the update event on which to incrementthe counter. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Max Value

Specifies the highest value allowed beforethe counter automatically resets itself to the minimum Presetvalue.(default = 9999999)

Reset

Forces the counter to reset to the Preset value.

0 = OFF (default) | The counter will be allowed to reachthe Max Value before it resets.
1 = ON | The counter will reset immediately,even though the Max Value hasnot been reached.

Preset

Specifies the minimum value to which thecounter is reset when the Max Valueis reached, or when Reset isON.(default = 0)

CountOutputs

Returns

A value, which is the Presetvalue plus the number of events that occurred since the last reset.


CountPassFail

Counts and returns passes, failures and total events for a given referencedvalue.

CountPassFailInputs

Syntax: CountPassFail(Event,Value,CountWhen Offline,ResetEvents.Manual,ResetEvents.Online,ResetEvents.Job Load)

Parameter Description

Event

Specifies the event on which to incrementthe counter. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Value

Specifies a required reference to the cell containing the source ofthe data stream to be counted.If no cell is referenced, the functionreturns a #ERR for all results.The counter that is incremented (Pass,Fail or #ERR) is based on the returned Value, as follows:

Pass | Value > 0
Fail | Value = 0
#ERR | Value < 0

Count When Offline

Specifies whether the counters will be incrementedwhile the sensor is Offline.

0 = OFF | Do not increment counters when thesensor is Offline.
1 = ON (default) | Increment counters when the sensoris Offline.

Reset Events

Forces the counters to reset depending onspecific events.

Manual

Specifies whether the counters will be resetto zero when the specified Eventoccurs.This parameter automatically references the Reset button, whichis inserted into the spreadsheet when the function is initially created.

Note: If this checkboxin manually toggled in the Property Sheet, the reference to the Resetbutton will be removed.To use the Reset button, this parameter must referencethe cell containing the Reset button.
0 = OFF (default) | Do not reset counters when the specifiedEvent occurs.
1 = ON | Reset counters when the specifiedEvent occurs.

Online

When the sensor is put Online, specifies whether the counters will be resetto zero after the first Eventoccurs.

0 = OFF | When the sensoris put Online, do not reset counters after the first Event occurs.
1 = ON (default) | When the sensor isput Online, reset counters after the first Event occurs.

Job Load

Specifies whether the counters will be resetto zero when a job is loaded.

0 = OFF | Do not reset counters when a jobis loaded.
1 = ON (default) | Reset counters when a job is loaded.

CountPassFailOutputs

Returns | A Count data structure containingthe incremented counters or #ERR if any of the input parameters are invalid.
Results | When CountPassFailis initially inserted into a cell, a result table and a Reset button arecreated in the spreadsheet.When the Reset button is pressed, all counterswill be reset to zero.

CountPassFailVision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Clocked Data Storage.

Passes | GetPassCount(Count) | The incremental count of passes.The counteris incremented when the returned Valueis greater than zero.
Failures | GetFailCount(Count) | The incremental count of failures.The counteris incremented when the returned Value is equal to zero.
Errors | GetErrorCount(Count) | The incremental count of errors.The counteris incremented when the returned Value is less than zero.
Total | GetTotalCount(Count) | The total number of passes, failures anderrors.


DelayLine

Implements a shift-register array, or data "stream", into which a cell's values are buffered after each event.

Note: After a reset, the first value that is read fills the shift-register.

DelayLine Inputs

Syntax: DelayLine(Event,Value,Number of Steps,Reset)

Parameter Description

Event

 Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: DelayLine buffers the state of a referenced value before that value is updated by any other function that depends on the specified Event.

Value

A reference to the cell containing the source data.

Number of Steps

Specifies the number of values in the function's internal shift-register array. (default = 10)

Reset

Forces the function to purge itself of previously read values. The first value read after Reset will effectively "fill" the shift register.

0 = OFF (default) | The function will continue to read in values to the data stream.
1 = ON | The function will purge all values from the data stream.

DelayLine Outputs

Returns | A Delay data structure containing statistics for the specified Value over an interval from Reset to current.
Results | When the function initially inserted into a cell, a result table is created in the spreadsheet.

DelayLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Clocked Data Storage.

Last | GetValue(Delay, Index) | The last value contained in the structure.
Mean | GetMean(Delay) | The mean of all the values in the structure.
SDev | GetSDev(Delay) | The standard deviation of all the values in the structure.
Min | GetMin(Delay) | The smallest value contained in the structure.
Max | GetMax(Delay) | The largest value contained in the structure.

Additional data elements can be accessed using the following Vision Data Access functions:

Count | GetCount(Delay) | The number of values contained in the structure.
Sum | GetSum(Delay) | The sum of all values contained in the structure.


Latch

Stores (latches) an input value on the specified event.

Latch Inputs

Syntax: Latch(Event,Value)

Parameter Description

Event

Specifies the update event on which to read Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Value

A reference to the cell containing the data to store.

Latch Outputs

Returns

The value stored on the last event.


LatchImage

Stores (latches) an image on the specified event.

LatchImageInputs

Syntax: LatchImage(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Event,Colorize,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheetcell that contains a valid Image data structure.By default, the cell referenced isA0, the cell containing the Image data structure returned by AcquireImage.

Fixture

Defines the Region of Interest (ROI) relativeto a Fixture input or the output of a VisionTool function's image coordinate system.Setting the ROI relativeto a Fixture ensures that if the Fixture is rotated or translated, theROI will be rotated or translated in relation to the Fixture.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | Specifies the row offset, in imagecoordinates.
Column | Specifies the column offset, in imagecoordinates.
Theta | Specifies the orientation, in imagecoordinates.

Region

Also known as the Region of Interest (ROI),specifies the region of the image that undergoes image processing; createsa rectangularimage region that can be transformed and rotated.With this parameterselected, pressing the MaximizeRegion button will automatically stretch the region to cover the entireimage.

X | Specifies the x-offset of the origin,in fixture coordinates.
Y | Specifies the y-offset of the origin,in fixture coordinates.
High | Specifies the dimension along theregion's x-axis.
Wide | Specifies the dimension along theregion's y-axis.
Angle | Specifies the orientation, in fixturecoordinates.

Event

Specifies the update event on which to storethe image. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Colorize

Only relevant for color images.When disabled, the latched image will be converted to greyscale (otherwise it remains in color).

0 = Disabled (default)

1 = Enabled

Show

Specifies which graphical overlays are displayedon top of the image.

0 = hide all (default)

The available graphics items willbe hidden except when the cell containing the function is the active cellin the spreadsheet.

Note: If the input region changes, a second region is displayed, indicating where the latching will occur on the next specified event.

1 = results graphics only

The processed image will be displayedat all times.

2 = input graphics only

The graphics items associated withthe input image region will be will be displayed at all times.

LatchImageOutputs

Returns

A LatchImage data structure that contains the image stored on the last event.


LatchString

Stores (latches) an alphanumeric input string on the specified event.

LatchString Inputs

Syntax: LatchString(Event,"String")

Parameter Description

Event

Specifies the update event on which to read String. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

String

A reference to the cell containing the string to store.

LatchString Outputs

Returns

The string stored on the last event.


Maximum

Samples a stream of values over an infinite interval, then returns the maximum value sampled from the stream during that interval.

Maximum Inputs

Syntax: Maximum(Event,Value,Reset,Preset)

Parameter Description

Event

Specifies the update event on which to read Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: Maximum samples the state of a referenced value before that value is updated by any other function that depends on the specified Event.

Value

A reference to the source cell for the data stream on which a maximum is sought.

Reset

Forces the function to reset its internal register to the value specified by Preset.

0 = OFF (default) | The function will continue to sample Value in the current data stream.
1 = ON | The function will reset the maximum value it returns, and begin a new data stream from which to sample.

Preset

Specifies the maximum value to which the function is reset (default = -9999999).

Maximum Outputs

Returns

A value, which is the maximum value in a data stream since the last Reset occurred.

For more information, see Event or Clocked Data Storage Functions.


Minimum

Samples a stream of values over an infinite interval, then returns the minimum value sampled from the stream during that interval.

Minimum Inputs

Syntax: Minimum(Event,Value,Reset,Preset)

Parameter Description

Event

Specifies the update event on which to read Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: Minimum samples the state of a referenced value before that value is updated by any other function that depends on the specified Event.

Value

A reference to the source cell for the data stream on which a minimum is sought.

Reset

Forces the function to reset its internal register to the value specified by Preset.

0 = OFF (default) | The function will continue to sample Value in the current data stream.
1 = ON | The function will reset the minimum value it returns and begin a new data stream from which to sample.

Preset

Specifies the minimum value to which the function is reset (default = 9999999).

Minimum Outputs

Returns

A value representing the minimum of a data stream over an interval from Reset to current.


Repeat

Repeats the execution of specified cells for a specified number of iterations.For more information, see Create a Loop of Spreadsheet Cells.

Note: When creating a repeating iteration of cells using the Repeat or RepeatUntil functions, if using a SetEvent function, it should be placed outside the cells being iterated.Placing the SetEvent function within the cells being iterated may cause the SetEvent to miss event triggers.

RepeatInputs

Syntax: Repeat(Event,Iterations to Repeat,Cells to Repeat)

Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A cell containing a numeric value, and if the numeric value changes, an event will be triggered.

Iterations to Repeat

Specifies the number of iterations (0 to 5000) that should be repeated.

Cells to Repeat

Specifies the reference to the cell or cells to be repeated.The reference must be a range of cells, a comma delimited list of cell references or a combination of the two.

RepeatOutputs

Returns

A Loop data structurecontaining data about the repetition of the cells.


RepeatUntil

Repeats the execution of specified cells until either an exit condition becomes valid or the maximum number of iterations is reached.For more information, see Create a Loop of Spreadsheet Cells.

Note: When creating a repeating iteration of cells using the Repeat or RepeatUntil functions, if using a SetEvent function, it should be placed outside the cells being iterated.Placing the SetEvent function within the cells being iterated may cause the SetEvent to miss event triggers.

RepeatUntilInputs

Syntax: RepeatUntil(Event,Exit Condition,Max Iterations,Cells to Repeat)

Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A cell containing a numeric value, and if the numeric value changes, an event will be triggered.

Exit Condition

Specifies a non-zero value that defines the requirement to exit the repetitions.

Max Iterations

Specifies the maximum number of iterations (0 to 5000) that should be repeated.

Cells to Repeat

Specifies the reference to the cell or cells to be repeated.The reference must be a range of cells, a comma delimited list of cell references or a combination of the two.

RepeatUntilOutputs

Returns

A Loop data structurecontaining data about the repetition of the cells.


ShiftRegister

Implements a shift-register array, or data "stream", into which a cell's values are buffered after each event.

Note: After a reset, the first value that is read fills the shift-register.

ShiftRegister Inputs

Syntax: ShiftRegister (Event,Value,Number of Steps,Reset)

Event

Specifies the update event on which to read Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: Unlike the DelayLine function, which buffers the state of a referenced value before that value is updated by any other function that depends on the specified Event, ShiftRegister buffers the state of the referenced value after that value is updated by any other function.

Value

A reference to the cell containing the source data (-9999999 to 9999999; default = 0).

Number of Steps

Specifies the number of values in the function's internal shift-register array (1 to 5000; default = 10).

Reset

Forces the function to purge itself of previously read values. The first value read after Reset will effectively "fill" the shift register.

0 = OFF (default) | The function will continue to read in values to the data stream.
1 = ON | The function will purge all values from the data stream.

ShiftRegister Outputs

Returns | A Buffer data structure containing statistics for the specified Value over an interval from Reset to current.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

ShiftRegister Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Clocked Data Storage.

Last | GetValue(Delay, Index) | The last value contained in the structure.
Mean | GetMean(Delay) | The mean of all the values in the structure.
SDev | GetSDev(Delay) | The standard deviation of all the values in the structure.
Min | GetMin(Delay) | The smallest value contained in the structure.
Max | GetMax(Delay) | The largest value contained in the structure.

Additional data elements can be accessed using the following Vision Data Access functions:

Count | GetCount(Delay) | The number of values contained in the structure.
Sum | GetSum(Delay) | The sum of all values contained in the structure.


StoreData

Used in conjunction with a Repeat or RepeatUntil function, stores the results of a cell.For more information, see Repeat, RepeatUntil and Create a Loop of Spreadsheet Cells

Note:
  • When used in conjunction with the Repeat or RepeatUntil functions to generate a loop, the StoreData function should be placed inside the loop of spreadsheet cells being iterated.
  • The StoreData function stores data in a "first in, first out" manner, meaning that when a new result is stored, it is inserted into the buffer at index zero, and all of the other stored results will be shifted one position in the buffer.
  • The StoreData function does not store the data it contains when the job file is saved; any StoreData function that is saved in a job file will be automatically reset when the job is reloaded.
  • If a stored cell contains a reference to an input image, the input image will not be stored and if referenced by a GetValue function, will only display the graphics unique to the stored cell.For more information, see GetValue.
  • If referencing a cell containing an InspectEdge, InspectEdgeForDefect, InspectEdgePosition, InspectEdgeTrainBeadPath or InspectEdgeWidth function, the edge detection indicator dotted yellow line will be missing from the region graphic.
  • If referencing a cell containing a BlobToBlob, BlobToLine, BlobToPoint, or BlobToRadian function, their externally referenced blob graphics will not be displayed.

StoreDataInputs

Syntax: StoreData(Event,Data,Number of Steps,Manual Reset,Online Reset)

Parameter Description

Event

Specifies the event on which to read thespecified Data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Data

Specifies a reference to a cell containing a results structure.Any cell containing numeric or string values may be referenced.

Note: The StoreData function cannot be used with the following functions: The Image functions, DetectFlaw, FlexFlawModel, ReadIDMax, TrainFlawModel, TrainPatMaxPattern, ValidateIDData, VerifyIDCode.

Number of Steps

Specifies the number of repetitive iterations; 1 to 5000.

Reset

Specifies an event on which the stored data will be reset.

Manual | The values will be reset based on acell containing a Button function.
Online | The data will be reset when the In-Sight vision system is placed Online.

StoreDataOutputs

Returns

A Data data structurecontaining result data for the specified Dataover an interval from Reset tocurrent.


Vision Data Access Functions

Vision Data Access (VDA) functions extract individual values from data structures, functions and other cell references, categorized as follows.

Note:
  • The Color, ColorHist and WhiteBalance VDA functions are only supported on color vision systems.
  • The LineScan VDA functions are only supported on Line Scan vision systems.
  • The ReadIDCode VDA functions are only supported on vision systems running In-Sight firmware 4.x.x firmware. For a complete list of models and supported firmware versions, see Firmware Versions.
VDA Category | Referenced Structure(s) and Function(s) | Related Topics
Bead | Bead | Bead
Blobs | Blobs | Blobs
CircleFit | CircleFit | CircleFit
Clocked Data Storage | Count | Clocked Data Storage
Color | ExtractColorLib MatchColorLib | Color
ColorHist | ColorHist | ColorHist
Controls | Authorize ListBox | Controls
Dist | Dist | Dist
Edges | Edges | Edges
Flaw Detection | DetectFlaw | Flaw Detection
Font | Font | Font
GetErrorCode | Most structures | GetErrorCode
GetErrorString | Most structures | GetErrorString
GetOnline | Event | GetOnline
Hist | Hist | Hist
IDCode | IDCode | VerifyIDCode
IDMax | IDMax | IDMax
IDValidate | IDValid | IDValidate
IDVerify | IDVerify | IDVerify
Image | Image | Image
Input/Output | Device Event FTP Message MSStack Query ReadDeviceNet ReadEIP Result Serial SMTP Time Timer Write | Input/Output
InspectEdge | Inspect InspectEdge InspectEdgeForDefect InspectEdgePosition InspectEdgeWidth | InspectEdge
LineFit | LineFit | LineFit
Line Scan | Event | Line Scan
OCRMax | OCRMax | OCRMax
Patterns | Patterns | Patterns
Scripting | Script Get | Scripting
Statistics | Stats | Stats
Structures | Annulus Circle Cross Fixture Line Point Region | Structures
Text | Text | Text (OCV/OCR)
Time/Timer | Image, Referenced Cell(s) | Time/Timer
WhiteBalance | Event | White Balance

Bead

Blobs

CircleFit

Clocked Data Storage

Color

ColorHist

Controls

Dist

Edges

Flaw Detection

Font

GetErrorCode

GetErrorString

GetOnline

Hist

IDCode

IDMax

IDValidate

IDVerify

Image

Input/Output

InspectEdge

LineFit

Line Scan

OCRMax

Patterns

Scripting

Statistics

Structures

Text

Time/Timer

WhiteBalance


Bead

BeadFind Vision Data Access Functions

All of the formulas for the BeadFind functions conform to the following:

  • BeadFind = A Bead data structure output by a BeadFind function
  • Caliper Index = -1, 0 to N (determines which caliper to reference; -1 = get the overall average)
  • Edge = 0 or 1 (determines which edge to reference; 0 = the first edge, and 1 = the second edge)

  • If a bead path is trained, the value returned is likely to be different from the one that is returned from a bead path candidate.

Function | Description
GetBeadColor(BeadFind) | Returns the color of the selected bead path or trained bead path against the background color ( 0 = Dark On Light, 1 = Light On Dark).
GetBeadContrastThreshold(BeadFind) | Returns the calculated contrast threshold of the selected bead path.
GetBeadCount(BeadFind) | Returns the number of found bead path candidates. Returns 0, if no bead path is found or Find Bead Paths is not executed.
GetBeadEdgeOffset(BeadFind, [Caliper Index], [Edge]) | Returns the average edge offset (in pixels) from the polyline path at the indexed caliper, or the average edge offset along the entire selected bead path.
GetBeadEnclosed(BeadFind) | Returns whether the selected bead path is an enclosed loop (0 = Bead is not enclosed, 1 = Bead is enclosed).

GetBeadExtremeWidth(BeadFind, [Extreme])

  • Extreme = 0 or 1 (0 = Min, 1 = Max)

Returns the caliper index that contains the minimum or maximum width of the selected bead path.

GetBeadNumPoints(BeadFind) | Returns the number of points that are used in the selected bead path.

GetBeadPoint(BeadFind, [Index], [Dimension])

  • Index = 0 to N (determines which vertex to reference)
  • Dimension = 0 or 1 (0 = X-coordinate of the vertex, 1 = Y-coordinate of the vertex)
 Returns the X or Y coordinate of a specified point for the selected bead path.
GetBeadSearchWidth(BeadFind) | Returns the calculated half search width (in pixels) of the selected bead path.
GetBeadSelected(BeadFind) | Returns the index of the selected bead path.
GetBeadTrained(BeadFind) | Returns the trained state of the selected bead path (0 = Untrained, 1 = Trained).
GetBeadWidth(BeadFind, [Caliper Index])

Returns the bead width at the indexed caliper or the average bead width of the selected bead path.
GetNumCalipers(BeadFind) | Returns the number of calipers used for the selected bead path.

BeadInspect Vision Data Access Functions

All of the formulas for the Bead functions conform to the following:

  • BeadInspect = A Bead data structure output by a BeadInspect function
  • Edge = 0 or 1 (determines which edge to reference; 0 = the first edge, and 1 = the second edge; default = 0)
  • Format = 0 or 1(determines which format to use; 0 = percent, and 1 = pixels; default = 0)
  • Index = 0 to Defect Count -1 (determines which defect index to reference; default = 0)
  • Index* = -1 to Defect Count -1 (determines which defect index to reference; -1 = find the defect with the extreme minimum or maximum value among all defects based on the Type parameter and return the defect index value; default = 0)

  • Number of Calipers = 0 to Calipers -1 (determines the range of calipers to use; 0 = use all calipers from the start index to the last caliper; default = 0):

    Note: If the entered Number of Calipers value is greater than Calipers - 1, the value will be adjusted to be the remaining calipers from the start index.
  • Start Index = 0 to Calipers - 1 (determines from which caliper index to start; default = 0)
Function Name | Description

GetBeadDefectArea(BeadInspect, [Index*], [Type])

  • Type (0 or 1; 0 = minimum; 1 = maximum; default = 0)
Note: Type parameter is valid only when the Index is -1.

Returns the change in bead area compared to the trained bead for the specified defect. The value returned will be positive if the area increases and negative if the area decreases.

Closed Example:

If a trained bead width is 20 and the inspected bead width is 18 the return value will be -2 (based on caliper region is one pixel wide).

GetBeadDefectBoundAngle(BeadInspect, [Index])

 Returns the angle of the bounding box of a defect at the specified index.

GetBeadDefectBoundCol(BeadInspect, [Index])

 Returns the column coordinate of the bounding box of a defect at the specified index.

GetBeadDefectBoundHigh(BeadInspect, [Index])

 Returns the height of the bounding box of a defect at the specified index.

GetBeadDefectBoundRow(BeadInspect, [Index])

 Returns the row coordinate of the bounding box of a defect at the specified index.

GetBeadDefectBoundWide(BeadInspect, [Index])

 Returns the width of the bounding box of a defect at the specified index.

GetBeadDefectCaliperIndex(BeadInspect, [Index], [Type])

  • Type (0 or 1; 0 = start index; 1 = end index; default = 0)
 Returns the index of the first or last caliper in the specified defect.

GetBeadDefectCol(BeadInspect, [Index], [Type])

  • Type (0 or 1; 0 = start index; 0 = end index; default = 0)
Returns the X coordinate of a defect at the specified index.

GetBeadDefectContrast(BeadInspect, [Index*], [Type], [Edge])

  • Type (0 to 3; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); 3 = proposed (not valid if Index parameter is -1); default = 0)

 Returns the minimum, maximum, average or proposed contrast statistics for the specified defect.

GetBeadDefectCount(BeadInspect, [Type])

  • Type (-1 to 9; default = 0)
-1 | Count of defects with multiple types
0 | All defects
1 | Coverage Min (Underfill)
2 | Coverage Max (Overfill)
3 | Width Min (Too Narrow)
4 | Width Max (Too Wide)
5 | Step Change
6 | Missing Both Edges
7 | Missing First Edge
8 | Missing Second Edge
9 | No Bead Found
 Returns the number of found defects of the specified type.

GetBeadDefectCoverage(BeadInspect, [Index*], [Type])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); default = 0)
Note:
  • There is only one proposed value per defect. The proposed value is the max value that will fix both edges. It is the value that will be entered in the Contrast Threshold parameter to clear the defect.
  • Edge parameter is not valid if Type = 3.
 Returns the minimum, maximum or average bead coverage statistics for the specified defect.

GetBeadDefectEdgeOffset(BeadInspect, [Index*], [Type], [Edge], [Format])

  • Type (0 to 3; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); 3 = proposed (not valid if Index parameter is -1); default = 0)
Note:
  • There is only one proposed value per defect. The proposed value is the max value that will fix both edges. It is the value that will be entered in the Bead Edge Position Tolerance parameter to clear the defect.
  • Edge parameter is not valid if Type = 3.

Returns the minimum, maximum, average or proposed edge offset from the trained path for the specified defect.

GetBeadDefectLength(BeadInspect, [Index*], [Type])

  • Type (0 or 1; 0 = minimum; 1 = maximum; default = 0)
Note: Type parameter is valid only when the Index is -1.
 Returns the length (in pixel) for the specified defect.

GetBeadDefectRow(BeadInspect, [Index], [Type])

  • Type (0 or 1; 0 = start index; 0 = end index; default = 0)
Returns the Y coordinate of a defect at the specified index.

GetBeadDefectStep(BeadInspect, [Index**], [Edge])

  • Index** (-1 to Defect Count -1; -1 = find the defect with the maximum step change percentage and return the index value; default = 0)
 Returns the maximum step change statistics for the specified defect.

GetBeadDefectType(BeadInspect, [Index], [Format*])

Format* (0 or 1; default = 0)
0

Displays defect type as an integer. The integer will be converted to binary value, representing all of the defect types contained within the specific defect.

Closed Example:

Type = 133;

133 (decimal) = 1000 0101 (binary);

According to the position chart (reading from right to left), position 1, 3 and 8 indicating the defect types are Coverage Min (Underfill), Width Min (Too Narrow) and Missing seconding Edge.
1

Displays defect type in string format. Corresponding position is either 0 or position number to indicate the defect type.

Closed Example:

Type = 8000 0301;

According to the position chart (reading from right to left), position 1, 3 and 8 indicating the defect types are Coverage Min (Underfill), Width Min (Too Narrow) and Missing seconding Edge.
Position Chart:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Coverage Min (Underfill) | Coverage Max (Overfill) | Width Min (Too Narrow) | Width Max (Too Wide) | Step Change | Missing Both Edges | Missing First Edge | Missing Second Edge | No Bead Found
Returns the classification type of the specified defect.

GetBeadDefectWidth(BeadInspect, [Index*], [Type], [Format])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average (not valid if Index parameter is -1); default = 0)
 Returns the minimum, maximum or average bead width statistics for the specified defect.

GetBeadCaliperContrast(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
 Returns the minimum, maximum or average bead contras statistics for a range of calipers.

GetBeadCaliperCoverage(BeadInspect, [Type], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
 Returns the minimum, maximum or average bead coverage statistics for a range of calipers.

GetBeadCaliperEdgeOffset(BeadInspect, [Type], [Edge], [Format], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
 Returns the minimum, maximum or average bead offset from the trained path for a range of calipers.

GetBeadCaliperMax(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0 to 4; 0 = coverage; 1 = width; 2 = step; 3 = contrast; 4 = displacement)

    Note: Edge parameter is not valid if Type = 0 or 1.

Returns the index of the caliper that detected the maximum value for the specified type of measurement.

Note: A return value of -1 indicates that all of the calipers within the range are in a masked area.

GetBeadCaliperMin(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0 to 4; 0 = coverage; 1 = width; 2 = step; 3 = contrast; 4 = displacement)

    Note: Edge parameter is not valid if Type = 0 or 1.

Returns the index of the caliper that detected the minimum value for the specified type of measurement.

Note: A return value of -1 indicates that all of the calipers within the range are in a masked area.

GetBeadCaliperWidth(BeadInspect, [Type], [Format], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
 Returns the minimum, maximum or average bead width statistics for a range of calipers.

GetBeadCaliperStep(BeadInspect, [Type], [Edge], [Start Index], [Number of Calipers])

  • Type (0, 1 or 2; 0 = minimum; 1 = maximum; 2 = average; default = 0)
 Returns the minimum, maximum or average bead step change statistics for a range of calipers.
GetNumCalipers(BeadInspect) | Returns the number of calipers in the BeadInspect function.

ShowBeadCaliperGraphic(BeadInspect, [Type], [Show], [Start Index], [Number of Calipers])

  • Type (0 or 1; 0 = region; 1 = edge; default = 0)
  • Show (0 or 1; 0 = hide graphic; 1 = show graphic; default = 0)

Displays the boundary region or the edge graphics for a range of calipers.


Blobs

Each of the following functions references a Blobs data structure for the first parameter. Index (zero-based) determines which blob is being indexed from the structure. If the index is not specified, the index will default to zero (i.e., the first blob returned).

Function

Description

GetAngle(Blobs, Index)

Returns the angle of a blob's center of mass, relative to the center of the Region of Interest (ROI), that defines the area of the image that will be inspected.

The center of mass of a blob represents the blob's balance point. If a sheet of a uniform material were cut out in the shape of the blob, the point upon which the blob would balance is the center of mass. Note that the center of mass of a blob might not actually lie within the blob itself.

For example, assume that the black region depicted in the following image is a blob, identified by the ExtractBlobs function. The red dot represents the blob's center of mass.

The x-coordinate and y-coordinate of the center of mass are returned by the GetCol and GetRow Vision Data Access functions, respectively.

GetArea(Blobs, Index)

Returns the area (in pixels) of a blob.

The area of a blob is calculated by counting the number of pixels contained within the blob. For example, consider the enlarged blob, shown in the following image:

By counting the pixels, we can see that this blob has an area of 8 pixels.

GetCol(Blobs, Index)

Returns the x-coordinate (column) of a blob's center of mass.

GetColor(Blobs, Index)

Returns the color value (0 = black, 1 = white) of a blob.

GetElongation(Blobs, Index)

Returns an elongation value from the specified blob.

GetHigh(Blobs, Index)

Returns the height of the indexed blob.

GetHoles(Blobs, Index)

Returns the number of holes contained within the blob.

GetMaxCol(Blobs, Index)

Returns the Max Col value of the blob.

GetMaxColRow(Blobs, Index)

Returns the row coordinate at the maximum (right-most) column coordinate.

GetMaxRow(Blobs, Index)

Returns the Max Row value of the blob.

GetMaxRowCol(Blobs, Index)

Returns the column coordinate at the maximum (bottom-most) row coordinate.

GetMinCol(Blobs, Index)

Returns the minimum (left-most) column coordinate of the blob.

GetMinColRow(Blobs, Index)

Returns the row coordinate at the minimum (left-most) column coordinate.

GetMinRow(Blobs, Index)

Returns the Min Row value of the blob.

GetMinRowCol(Blobs, Index)

Returns the column coordinate at the minimum (top-most) row coordinate.

GetNFound(Blobs)

Returns the number of blobs found within the specified ROI.

GetPerimeter(Blobs, Index)

Returns the perimeter (in pixels) of the blob.

For example, consider an enlarged blob with an area of 8 pixels, as shown:

The perimeter of the blob is calculated by counting the number of external pixel edges, for every pixel contained in the blob. In this case, the blob has 12 external edges that constitute the perimeter.

GetPolygon(Blobs, Index, [Show])

Returns a Polygon data structure, which represents the boundary points of the specified blob. The Polygon data structure can be used as an input for functions that have an External Region parameter, which allows for image processing to be performed within the boundary of a blob.

Note:
  • Optionally, the Show parameter can be specified. When set to 0 (the default), the polygon graphic will only be shown when the GetPolygon cell is selected; when set to 1, it will always be shown.
  • The polygon will not be graphically displayed if its length exceeds approximately 4950 points.

GetRow(Blobs, Index)

Returns the y-coordinate (row) value of the blob's center of mass.

GetScore(Blobs, Index)

Returns the Score value of the blob.

GetSpread(Blobs, Index)

Returns the Spread value of the blob.

GetThresh(Blobs)

Returns either the manual binary threshold value or the optimum value (if -1, automatic specified) of the blob.

GetWide(Blobs, Index)

Returns the width of the indexed blob.


CircleFit

Each of the following functions references a CircleFit data structure for the first parameter.

Function | Description
GetCol(CircleFit) | Returns the y-coordinate of the center of the circle.
GetDistance(CircleFit, Index) | Returns the distance between the indexed point and the circle. If the value is negative, the point is within the circle. If the indexed point is invalid, an #ERR is returned.
GetMaxDist(CircleFit) | Returns the distance between the circle and the point farthest from the circle. If the value is negative, the point is within the circle.
GetMaxDistIndex(CircleFit) | Returns the index of the point farthest from the circle.
GetNPointsUsed(CircleFit) | Returns the number of points used to fit the circle.
GetRadius(CircleFit) | Returns the radius of the circle.
GetRow(CircleFit) | Returns the x-coordinate of the center of the circle.
GetSigma(CircleFit) | Returns the square root of the sum of the squares of the distances from the points to the circle divided by the number of points.


Clocked Data Storage

Note:
  • The GetCount, the GetMax, the GetMean, the GetMin, the GetSDev, the GetSum and the GetValue functions reference a Delay data structure for the first parameter.
  • For the GetErrorCount, the GetFailCount, the GetPassCount and the GetTotalCount functions, returned values are from a referenced Count structure, which is inserted in the spreadsheet when the CountPassFail function is created. For more information, see CountPassFail.

Function

Description
GetCount(Delay) | Returns the Count value from a Delay structure.
GetErrorCount(Count) | Returns the incremental count of errors from a Count structure. The counter is incremented when the returned Value is less than zero.
GetFailCount(Count) | Returns the incremental count of failures from a Count structure. The counter is incremented when the returned Value is equal to zero.

GetLoopCount(Loop)

Returns the current index of the repeated iterations performed by a Repeat or RepeatUntil function stored in a Loop data structure. For more information, see Repeat and RepeatUntil.

Note: To ensure proper evaluation, place the GetLoopCount function within the selection of cells that the loop operates on; otherwise the function will only be evaluated once and will not update in sync with the loop.

GetLoopReset(Loop)

Returns a 1 (TRUE) prior to the first execution of a repeated iteration performed by a Repeat or RepeatUntil function stored in a Loop data structure. This function may also be used to clear the data from any functions that retain data within the loop, such as a StoreData cell. For more information, see Repeat, RepeatUntil and StoreData.

Note: To ensure proper evaluation, place the GetLoopReset function within the selection of cells that the loop operates on; otherwise the function will only be evaluated once and will not update in sync with the loop.
GetMax(Delay) | Returns the Max Value from a Delay structure.
GetMean(Delay) | Returns the Mean value from a Delay structure.
GetMin(Delay) | Returns the Min value from a Delay structure.
GetPassCount(Count)

Returns the incremental count of passes from a Count structure. The counter is incremented when the returned Value is greater than zero. For more information, see CountPassFail.

GetSDev(Delay)

Returns the SDev value from a Delay structure.

Note: This calculation is a biased standard deviation, where the denominator is N-1 (an unbiased standard deviation has a denominator of N).

GetSum(Delay)

 Returns the Sum value from a Delay structure.
GetTotalCount(Count) | Returns the total number of passes, failures and errors from a Count structure.

GetValue(Delay)

 Returns the value stored in a Delay structure.


Color

For each of the following functions, the first parameter references a cell containing a color data structure. The structure is named according to the color tool that created it:

  • TrainExtractColor creates a ExtractColorLib data structure. For more information, see TrainExtractColor.
  • TrainMatchColor creates a MatchColorLib data structure. For more information, see TrainMatchColor.
  • ExtractColor and MatchColor create Colors. For more information, see ExtractColor and MatchColor.

The GetColorLibraryName function can be used to determine which tool created the data structure.

Function | Description
GetActiveExtClrModelName(Colors, Index) | Returns the name of the indexed active Color Model for an ExtractColor function.
GetActiveMatchClrColorName(Colors, Index) | Returns the name of the indexed active Color for a MatchColor function.
GetArea(ExtractColor) | Returns the area (number of pixels) of the extracted color. Note: Supported on the In-Sight vision systems running firmware version 5.3.0 or later.
GetBlue(Colors) | Returns the blue component of the average Color in the region of interest (ROI) for a MatchColor function.
GetColorLibraryName(Color Structure) | Works with TrainExtractColor, TrainMatchColor, ExtractColor, and MatchColor. For the TrainExtractColor and TrainMatchColor functions, returns the name of the Color Library stored by the function. For the ExtractColor and MatchColor functions, returns the name of the referenced Train function (e.g. TrainExtractColor or TrainMatchColor, respectively).
GetConfidenceScore(Colors) | Returns the confidence score of the current inspection for a MatchColor function. The confidence score = ( s1 * (M - s2) - s2 * (M - s1)) / ( (M - s2) + (M - s1)); where s1 is best score, s2 is the second best score, M is a constant equal to 1.01. The higher the confidence score, the more likely it is that the best match was selected.
GetExtClrColorModelState(Colors, ColorModelName) | Returns the state of the specified Color Model for an ExtractColor function.
GetExtClrModelByRank(Colors, Rank) | Returns the index of the Color Model that has the specified pixel count rank for an ExtractColor function. A rank of 0 is the highest and n-1 is the lowest.
GetGreen(Colors) | Returns the Green component of the average color in the ROI for a MatchColor function.
GetHue(Colors) | Returns the Hue component of the average color in the ROI for a MatchColor function.
GetIntensity(Colors) | Returns the Intensity component of the average color in the ROI for a MatchColor function.
GetMatchClrColorByRank(Colors, Rank) | Returns the index of the Color that matches the rank (0 to n-1) for a MatchColor function. The Color with a rank of 0 has the highest score.
GetMatchClrColorState(Colors, ColorName) | Returns the state of the specified Color for a MatchColor function.
GetMatchClrDistByIndex(Colors, Index) | Returns the color distance of the indexed Color for a MatchColor function.
GetMatchClrDistByName(Colors, Name) | Returns the color distance of the named Color for a MatchColor function.
GetMatchClrScoreByIndex(Colors, Index) | Returns the score of the indexed Color for a MatchColor function.
GetMatchClrScoreByName(Colors, Name) | Returns the score of the named Color for a MatchColor function.
GetNActiveExtClrModels(Colors) | Returns the number of referenced Color Models that are active in the referenced ExtractColor function.
GetNActiveMatchClrColors(MatchColorLib) | Returns the number of referenced Colors that are active in the referenced MatchColor function.
GetNTrainExtClrModels(ExtractColorLib) | Returns the number of color models stored by the TrainExtractColor function.
GetNTrainMatchClrColors(MatchColorLib) | Returns the number of colors stored by the TrainMatchColor function.
GetOverallPixelCount(Colors) | Returns the pixel count, which is the combination of all active Color Models, for an ExtractColor function.
GetPixelCountByIndex(Colors, Index) | Returns the pixel count for the indexed Color Model in an ExtractColor function.
GetPixelCountByName(Colors, Name) | Returns the pixel count of the named Color Model for an ExtractColor function.
GetRed(Colors) | Returns the Red component of the average color in the ROI for a MatchColor function.
GetSaturation(Colors) | Returns the Saturation component of the average color in the ROI for a MatchColor function.
GetTrainExtClrModelName(ExtractColorLib, Index) | Returns the name of the indexed Color Model for an ExtractColor function.
GetTrainMatchClrColorName(MatchColorLib, Index) | Returns the name of the indexed stored Color for a MatchColor function.
SetExtClrColorModelState(Colors, Enable, ColorModelName1, [ColorModelName2,...]) | Returns the number of Color Models enabled or disabled for an ExtractColor function. This function’s cell state is disabled when first inserted into the spreadsheet; it must be conditionally enabled by a Button function.
SetMatchClrColorState(Colors, Enable, ColorName1, [ColorName2,...]) | Returns the number of Color(s) enabled or disabled for a MatchColor function.This function’s cell state is disabled when first inserted into the spreadsheet; it must be conditionally enabled by a Button function.


ColorHist

Function

Description

GetValue(ColorHist, Index, [Color])

Returns the value contained in the indexed bin (0 to 255) for the specified Color of the ColorHist data structure.

Color is an optional parameter that determines from which color component to pull histogram data. If unspecified, this parameter will default to 0 (Red).

0 = Red | Selects the Red component from the ColorHist structure.
1 = Green | Selects the Green component from the ColorHist structure.
2 = Blue | Selects the Blue component from the ColorHist structure.
3 = Hue | Selects the Hue component from the ColorHist structure.
4 = Saturation | Selects the Saturation component from the ColorHist structure.
5 = Intensity | Selects the Intensity component from the ColorHist structure.


Controls

Note:
  • The GetAuthorizeApprover and the GetAuthorizeDateTime functions reference an Authorize function cell. For more information, see Authorize.
  • The GetAuthorizedValue function references a supported edit control cell that is referenced by the Authorize function.
  • The GetString function references a cell containing a ListBox function. For more information, see ListBox.

Function

Description

GetAuthorizeApprover(Authorize)

 Returns the name of the approver that performed the last successful authorization when the Authorize function's Type is set to Authorize-Only or Double-Blind. Returns the name of the user who entered new values when Type is set to None.

GetAuthorizeDateTime(Authorize)

 Returns the date and time when the last successful authorization occurred. The format of the date and time: MM/DD/YYYY HH:MM:SS.

GetAuthorizedValue(Controls)

Returns the authorized value of the referenced edit control. If the edit control has not been authorized, returns the current value.

Note: The GetAuthorizedValue function always returns a string type value. To use a numeric output of this function as an input to another function, use the Value function to convert it into a numeric value.

GetString(ListBox)

 Returns the text string. If a cell containing the ListBox function is referenced, the text string that is currently selected from the list is returned.


Dist

Each of the following functions references a Dist data structure for the first parameter.

Function | Description
GetAngle(Dist, Index) | Returns the Angle value.
GetCol(Dist, Index1, Index2) | Returns the Col value.
GetDistance(Dist) | Returns the Distance value.
GetRow(Dist, Index1, Index2) | Returns the Row value.


Edges

Each of the following functions references a Edges data structure as the first parameter.

Function Description

GetAngle(Edges, Index)

Returns the Angle of the indexed edge.

GetCol(Edges, Index1, Index2)

Returns the specified Column value from the indexed edge. Index1 selects the edge number, and Index2 specifies the point (0 = left-most point; 1 = right-most point; or 2 = mid-point).

GetContrast(Edges)

Returns the average contrast between the foreground and background (in grey levels, 0 to 255) found. Contrast is positive for black-to-white transitions, and negative for white-to-black transitions. The Edges structure must be created by a FindCircleMinMax function.

GetEdgeDistance(Edges)

Returns the distance between two edges (edge pair). The Edges structure must be created by a Caliper function. For more information, see Caliper.

GetMax(Edges)

Returns the radius of the maximum deviation from the best edge. The Edges structure must be created by a FindCircleMinMax function. For more information, see FindCircleMinMax.

GetMin(Edges)

Returns the radius of the minimum deviation from the best edge. The Edges structure must be created by a FindCircleMinMax function.

GetNFound(Edges)

Returns the number of edges found.

GetPosition(Edges, Index)

Returns the region X position of the edge or the edge pair center. The Edges structure must be created by a Caliper function.

GetRadius(Edges, Index)

Returns the Radius value from the indexed curved edge.

GetRow(Edges, Index1, Index2)

Returns the specified Row value from the indexed edge. Index1 selects the edge number, and Index2 specifies the point (0 = top-most point; 1 = bottom-most point; or 2 = mid-point).

GetScore(Edges, Index)

Returns the Score value from the indexed edge. Score is positive for black-to-white transitions and negative for white-to-black transitions (except for FindSegment and FindCircleMinMax, where Score is always positive). For more information, see FindSegment.

GetSDev(Edges)

Returns the standard deviation value. The Edges structure must be created by a FindCircleMinMax function.

Note: This calculation is a biased standard deviation, where the denominator is N-1 (an unbiased standard deviation has a denominator of N).


Flaw Detection

Function | Description
GetNFound(SurfaceFlaw) | Returns the total number of flaws found.
GetTrained(TrainFlawModel) | Returns 1 if a model has been successfully trained, and 0 if the model cannot be trained by a TrainFlawModel function. For more information, see TrainFlawModel.
GetTotalFlawArea(SurfaceFlaw) | Returns the total area of all of the flaws detected by the SurfaceFlaw function. For more information, see SurfaceFlaw.
GetTotalFlawCount(DetectFlaw, All/Area/Missing Edges/Extra Edges) | Returns the total number of a particular type of flaw, or the total number of all flaws (All = -1; Area = 0; Missing Edges = 1; Extra Edges = 2).
GetTotalFlawSize(DetectFlaw, All/Area/Missing Edges/Extra Edges) | Returns the total number of pixels that have been classified as a particular flaw, or the total number of pixels that have been classified as a flaw (All = -1; Area = 0; Missing Edges = 1; Extra Edges = 2).
GetFlawType(DetectFlaw, Index) | Returns the type of the specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2).
GetFlawSize(DetectFlaw, Area/Missing Edge/Extra Edge, Index) | Returns the number of pixels in a specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2). Each type of flaw has its own set of Index values (Index = 0 to the total returned by GetTotalFlawCount, minus 1).
GetFlawContrast(DetectFlaw, Area/Missing Edge/Extra Edge, Index) | Returns the contrast value of a specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2). Each type of flaw has its own set of Index values (Index = 0 to the total returned by GetTotalFlawCount, minus 1).
GetFlawRow(DetectFlaw, Area/Missing Edge/Extra Edge, Index) | Returns the row coordinate of the bounding box of a specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2). Each type of flaw has its own set of Index values (Index = 0 to the total returned by GetTotalFlawCount, minus 1).
GetFlawCol(DetectFlaw, Area/Missing Edge/Extra Edge, Index) | Returns the column coordinate of the bounding box of a specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2). Each type of flaw has its own set of Index values (Index = 0 to the total returned by GetTotalFlawCount, minus 1).
GetFlawHigh(DetectFlaw, Area/Missing Edge/Extra Edge, Index) | Returns the height value of the bounding box of a specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2). Each type of flaw has its own set of Index values (Index = 0 to the total returned by GetTotalFlawCount, minus 1).
GetFlawWide(DetectFlaw, Area/Missing Edge/Extra Edge, Index) | Returns the width value of the bounding box of a specified flaw (Area = 0; Missing Edge = 1; Extra Edge = 2). Each type of flaw has its own set of Index values (Index = 0 to the total returned by GetTotalFlawCount, minus 1).
GetMatchScore(FlexFlawModel) | Returns a score value indicating the edge match score before the Flex algorithms were applied.
GetFlexScore(FlexFlawModel) | Returns a score value indicating the edge match score after the Flex algorithms were applied.


Font

Each of the following functions references a Font data structure for the first parameter.

Function | Description
GetFontLabel(Font, Index) | Returns the label of the indexed character model.
GetFontAllLabels(Font) | Returns a list of labels for all of the trained characters in a font.
GetFontName(Font) | Returns the name of the font.
GetFontNumCharacter(Font) | Returns the number of trained character models.


GetErrorCode

GetErrorCode is a Vision Data Access function that returns a diagnostic code from most structures and functions. For more information, see Vision Data Access Functions.

Note: If no error code is available for the #ERR, GetErrorCode will return -1.

Using GetErrorCode

The general syntax of GetErrorCode is as follows:

GetErrorCode(Structure)


GetErrorString

GetErrorString is a Vision Data Access function that returns diagnostic information from most structures and functions. For more information, see Vision Data Access Functions.

Using GetErrorString

The general syntax of GetErrorString is as follows:

GetErrorString(Structure)


GetOnline

Returns the Online state of the In-Sight sensor. For more information, see Online/Offline.

GetOnline Inputs

Syntax: GetOnline(Event)

Parameter | Description
Event | Updates the spreadsheet on the specified event trigger. This parameter must be a reference to a cell containing an Event function, with the Trigger parameter set to Online/Offline. For more information, see Trigger.

GetOnline Outputs

Returns

A value of 0.000 if the sensor is Offline; a value of 1.000 if the sensor is Online.

Results

When the function is initially inserted into a cell, an Event function, with the Trigger parameter set to Online/Offline, is automatically inserted into the adjacent cell.

Note: If the adjacent cell already contains data, a warning message appears and the Event function is not automatically inserted into the adjacent cell.

GetOnline Example

  1. Right-click cell A2 and click Insert Function to open the Insert Function dialog.

  2. In the left side of the Insert Function dialog, select the Vision Data Access list of tool categories.

  3. From the right-hand pane, double-click GetOnline. The GetOnline property sheet opens.

  4. Click OK to accept the default property sheet settings. An Event function, with the Trigger parameter set to Online/Offline, is automatically inserted into the adjacent cell. Cell A2 returns 0.000 indicating that the sensor is Offline.

    Note: If the adjacent cell already contains data, a warning message appears and the Event function is not automatically inserted into the adjacent cell.

  5. Place the sensor Online. Cell A2 now returns 1.000, indicating that the sensor is Online.


Hist

Function | Description
GetArea(ExtractHistogram) | Returns the area (number of pixels) of the extracted histogram. Note: Supported on the In-Sight vision systems running firmware version 5.3.0 or later.
GetValue(Hist, Index) | Returns the number of values contained in the indexed bin (0 to 255) of the specified Hist data structure.


IDCode

Note:
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • All returned values are from a referenced IDCode structure, which is inserted in the spreadsheet when the ReadIDCode function is created.

Function

Description

GetAngle(IDCode)

Returns the angle of a symbol (except PharmaCode, RSS-14\Stacked and RSS Limited codes).

Note:
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.
  • The Algorithm parameter in the ReadIDCode function must be enabled.
  • When the Algorithm parameter in the ReadIDCode function is disabled, if the angle is within approximately 4 degrees of 0, 90, 180 or 270 degrees, the returned value will be 0, 90, 180 or 270 degrees, respectively.

GetBarSkew(IDCode)

Returns the mean of the skew of the bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetBarSpace(IDCode)

Returns the mean space width between bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetBarWidth(IDCode)

Returns the average width of the bars in a Postal barcode.

GetCodeName(IDCode)

Returns the name of the code type. This is the same code name shown in the property sheet. For more information, see Property Sheet.

GetCodeType(IDCode)

Returns the code type.

GetCol(IDCode, [Index])

Returns the column coordinate (in pixels) of the upper left-hand corner of a Postal symbol and the column (y) coordinate for 2D symbols at the indexed (0 to 3) finder pattern points. For more information, see Finder Pattern Points.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetColor(IDCode)

Returns the value (0 = black, 1 = white) of the foreground color for a Data Matrix, QR Code or PDF417 symbol.

GetContrast(IDCode)

Returns the mean contrast between foreground and background in grey levels in a Postal barcode.

Note:
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.
  • If the Algorithm parameter is enabled in the ReadIDCode function, GetContrast returns a #ERR for PDF417 codes.

GetDecodability(IDCode)

Returns the minimum decodability of the barcode (except RSS Stacked barcodes).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetDefect(IDCode)

Returns the ratio of the maximum element reflectance nonuniformity to the average barcode contrast (except RSS Stacked barcodes). An element refers to either a bar or space in a barcode.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetECLevel(IDCode)

Returns the error correction level of a Data Matrix or a PDF 417 code.

GetECMin(IDCode)

Returns the minimum edge response between successive elements in a barcode (except RSS Stacked barcodes).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetErrorCode(IDCode)

Returns an error code for each information string.

Closed See error codes and corresponding strings

Note: Error strings are inserted into the spreadsheet using the GetErrorString function.
Diagnostic Code | Corresponding Information String
00010000 | Vision processing error.
00010001 | Invalid image memory.
00010001 | Input region is too small.
00010002 | Input region exceeds image boundary.
00019000 | IDMax vision processing error.
04010000 | ReadCompositeCode error.
04010001 | Can't detect 2D component address patterns.
04010002 | Too much invalid 2D component image data.
04010003 | Can't detect 2D component symbol version.
04010004 | Unable to fill in missing 2D component address patterns.
04010005 | Scan line detected invalid image data.
04010006 | Scan line exceeds image boundary.
04010007 | Can't detect 1D component finder patterns.
04010008 | Too much invalid 1D component image data.
04010009 | No valid Composite symbols found. Note: For all other symbols, 04020001 is returned.
04010010 | Too many symbol errors to correct.
04010011 | Error correction failed.
04010012 | 1D and 2D are decodable but are not linked.
04010013 | Automatic contrast threshold calculation failed.
04010014 | Contrast sensitivity exceeds allowed range.
04010015 | Scanning parameter exceeds allowed range.
04020000 | ReadIDCode error.
04020001 | No valid symbols found.
04020002 | Could not decode symbol.

GetErrorCount(IDCode)

Returns the number of erroneous codewords found in a 2D symbol. This value is used to calculate UnusedEC.

GetErrorString(IDCode)

Returns diagnostic information if symbol decoding fails. For more information, see ID Error Strings.

GetFormat(IDCode)

Returns the value representing the format of a 2D symbol in the ReadIDCode function. For more information, see GetFormat Values.

GetGrade(IDCode, [IDCode])

Returns the overall quality grade for the barcode based on the lowest grade received from the Contrast, Modulation, Defect and Decodability tests. The Verify checkbox in ReadIDCode must be enabled. A second IDCode structure can be referenced as an optional parameter.

  • Grade A = 4.0
  • Grade B = 3.0
  • Grade C = 2.0
  • Grade D = 1.0
  • Grade F = 0.0
Note: If the Algorithm parameter is enabled in the ReadIDCode function, GetGrade returns a #ERR for PDF417 codes.

Closed See return values when the optional second IDCode parameter is used

The optional IDCode parameter supports Composite symbols. The Composite symbol is a combination of a linear 1D RSS barcode component, and a 2D CC-A\CC-B Composite component, which is an EAN/UCC-specific variant of MicroPDF417. For more information, see Reduced Space Symbology (RSS) Symbols and MicroPDF417 Variant.

The following is returned if the optional IDCode parameter is used:

  • If both decoded symbols from the two IDCode structures are 1D, or both symbols are 2D, GetGrade will return an #ERR. One IDCode structure must contain a 1D symbol and the other IDCode structure must contain a 2D symbol.
  • If the IDCode structure containing the 2D component of the Composite symbol is not an RSS CC-A\CC-B or a PDF417 symbol, GetGrade returns an #ERR.
  • If the IDCode structure containing the 1D component of the Composite symbol is not an RSS symbol, GetGrade returns the lesser of the two incoming IDCode grades.
  • If the IDCode structure containing the 1D component of the Composite symbol is an RSS symbol, GetGrade checks the composite linkage flag. If the flag passes (meaning that the 1D and 2D symbols are linked) the lesser of the two grades is returned. If the flag fails, meaning that the 1D and 2D symbols are not linked, then GetGrade returns 0.

GetGridCols(IDCode)

Returns the number of columns contained in a 2D symbol.

GetGridRows(IDCode)

Returns the number of rows contained in a 2D symbol.

GetGrowth(IDCode)

Returns the 2D symbol print growth test result. The horizontal and vertical print growths are calculated independently and the lower score is returned.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetHigh(IDCode)

Returns the height of the symbol.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetLearned(IDCode)

Returns '1' if the model of the symbol has been successfully learned and '0' if the model is not learned.

GetLearnedGridCol(IDCode)

Returns the number of columns in a learned QR Code or Data Matrix symbol.

GetLearnedGridRow(IDCode)

Returns the number of rows in a learned QR Code or Data Matrix symbol.

GetMaxBarSkew(IDCode)

Returns the maximum skew of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMaxBarWidth(IDCode)

Returns the maximum width of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMaxSpaceWidth(IDCode)

Returns the maximum space width between bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMinBarSkew(IDCode)

Returns the minimum skew of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMinBarWidth(IDCode)

Returns the minimum width of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMinSpaceWidth(IDCode)

Returns the minimum space width between bars in a Postal barcode.

Note: If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetMirror(IDCode)

Returns the mirrored status (0 = not mirrored, 1 = mirrored) of a Data Matrix or QR Code symbol.

GetModulation(IDCode)

Returns the ratio of the Minimum Edge Response (ECMin) to the average contrast of the barcode (except RSS Stacked barcodes).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetNBars(IDCode)

Returns the number of bars found in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetNonUniformity(IDCode)

Returns the 2D symbol axial non-uniformity test result (except PDF417 symbols).

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetNumEdges(IDCode)

Returns the total number of edges found for one valid scan line for the verified RSS CC-A\CC-B symbol component(s).

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Algorithm parameter must be disabled in the ReadIDCode function.

GetQuietZonesCheck(IDCode)

Returns the ratio of the maximum non-uniformity found in a 2D RSS CC-A\CC-B symbol's quiet zones to the average symbol contrast. The Verify checkbox in ReadIDCode must be enabled.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Algorithm parameter must be disabled in the ReadIDCode function.

GetRawStream(IDCode)

Returns the undecoded data stream from a read symbol of a Code 128 symbol.

GetReflectanceDark(IDCode)

Returns the minimum (dark) reflectance for a 2D RSS CC-A\CC-B or Postal symbol.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetReflectanceLight(IDCode)

Returns the maximum (light) reflectance for a 2D RSS CC-A\CC-B or Postal symbol.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetResolution(IDCode)

Returns the minimum (narrowest) element width for a Postal barcode. For 2D symbols, the average size, in pixels, of the cells is returned.

GetRow(IDCode, [Index])

Returns the row coordinate (in pixels) of the upper left-hand corner of a Postal symbol and the row (y) coordinate for 2D symbols at the indexed (0 to 3) finder pattern point. For more information, see Finder Pattern Points.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetSDevBarSkew(IDCode)

Returns the standard deviation of the skew of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetSDevBarSpace(IDCode)

Returns the standard deviation of the space width between bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetSDevBarWidth(IDCode)

Returns the standard deviation of the width of the bars in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetSDevContrast(IDCode)

Returns the standard deviation of the contrast between foreground and background in grey levels in a Postal barcode.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • If the Algorithm parameter is disabled in the ReadIDCode function, the Verify checkbox must be enabled. If the Algorithm parameter is enabled in the ReadIDCode function, the function must reference the VerifyIDCode function. For more information, see VerifyIDCode.

GetString(IDCode)

Returns the string encoded in the symbol.

GetSymbologyIdentifier(IDCode)

Returns the type of symbol, as a three-character code, based on the ISO 15424 specification.

Note: The Algorithm parameter in the ReadIDCode function must be enabled.

GetUnusedEC(IDCode)

Returns the unused error correction test result for a 2D symbol, as a percentage.

GetWide(IDCode)

Returns the width of the symbol.

Note: The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.


IDMax

All returned values are from a referenced IDMax structure, which is inserted in the spreadsheet when the ReadIDMax function is created. The optional Index can reference an indexed string from the ReadIDMax function result table. For more information, see ReadIDMax.

Function

Description

GetAngle(IDMax,[Index])

Returns the angle of a symbol (except PharmaCode and DataBar symbols).

Note: The Verify checkbox in ReadIDMax must be enabled.

GetCodeName(IDMax,[Index])

Returns the name of the code type. This is the same code name shown in the ReadIDMax property sheet. For more information, see Property Sheet.

GetCodeType(IDMax,[Index])

Returns the Code Type.

Closed See Code Type and the Corresponding Code Name

Code Type | Corresponding Code Name
1 | Code 128
0 | Code 39
2 | ITF-14
7 | Pharmacode
3/4 | UPC/EAN
11 | Code 93
12 | Codabar
128 | Data Matrix
129 | QR Code
132 | PDF 417
9 | DataBar
10 | DataBar Limited
12 | DataBar Expanded
16 | EAN.UCC Composite
5 | POSTNET
6 | PLANET
14 | Japan Post
13 | Australia Post
8 | UPU
15 | Intelligent Mail Barcode

GetCol(IDMax, [Index1], [Index2])

Returns the column coordinate (in pixels) of the upper left-hand corner of a POSTNET, PLANET or Postal symbol and the column (y) coordinate for 2D symbols at the indexed (0 to 3) finder pattern points. The second index identifies the indexed symbol. For more information, see Finder Pattern Points.

Note: The Verify checkbox in ReadIDMax must be enabled.

GetColor(IDMax,[Index])

Returns the value (0 = black, 1 = white) of the foreground color for a Data Matrix, QR Code or PDF417 symbol.

GetContrast(IDMax,[Index])

Returns the mean contrast between foreground and background in greyscale values in a barcode. This provides a measurement of the contrast between the darkest and lightest elements in the symbol. A high quality symbol exhibits a high percentage of contrast between the symbol's foreground and background.

  • Grade A (4.0) ≥ 70%
  • Grade B (3.0) ≥ 55%
  • Grade C (2.0) ≥ 40%
  • Grade D (1.0) ≥ 20%
  • Grade F (0.0) < 20%

GetDecodability(IDMax,[Index])

Returns the minimum decodability of the barcode (except DataBar barcodes). A measure of printing accuracy, decodability is the fraction of the available margin for error that has not been used by the printing process, and is thus available for the reader. For every character of every scan line, a reference threshold is calculated and is a measure of the module width threshold. Each character's widest narrow element and narrowest wide element is compared to this to determine decodability. An element refers to either a bar or space in a barcode. For more information, see Scan Lines.

  • Grade A (4.0) ≥ .62
  • Grade B (3.0) ≥ .50
  • Grade C (2.0) ≥ .37
  • Grade D (1.0) ≥ .20
  • Grade F (0.0) < .20
Note: The Verify checkbox in ReadIDMax must be enabled.
GetDecoded(IDMax,Index) | Returns whether the indexed ID symbol is found; 0.0 for not found, or 1.0 for found.

GetDefect(IDMax,[Index])

Returns the ratio of the maximum element reflectance non-uniformity to the average barcode contrast (except DataBar barcodes). This is a measure of voids in bars or spots in spaces. An element refers to either a bar or space in a barcode.

  • Grade A (4.0) ≤ .15
  • Grade B (3.0) ≤ .20
  • Grade C (2.0) ≤ .25
  • Grade D (1.0) ≤ .30
  • Grade F (0.0) > .30
Note: The Verify checkbox in ReadIDMax must be enabled.

GetECLevel(IDMax,[Index])

Returns the error correction level of a Data Matrix or a PDF 417 code. PDF 417 symbols support 9 error correction levels, with 0 being the least thorough, and 8 being the most thorough.

Note: The Verify checkbox in ReadIDMax must be enabled.

GetECMin(IDMax,[Index])

Returns the minimum edge response between successive elements in a barcode (except DataBar barcodes). Also referred to as the minimum edge contrast, the minimum edge response is a measurement of the minimum contrast of the worst (the least amount of contrast) edge in the code. With maximum reflectance being 100% and no reflectance being 0%, the minimum difference in contrast must be greater than or equal to 15% for a pass, otherwise the code will fail the minimum edge response test.

  • Grade A (4.0) = Pass
  • Grade F (0.0) = Fail
Note: The Verify checkbox in ReadIDMax must be enabled.

GetErrorCode(IDMax,[Index])

Returns an error code for each information string.

Closed See error codes and corresponding strings
Note: Error strings are inserted into the spreadsheet using the GetErrorString function.
Diagnostic Code | Corresponding Information String
00010000 | Vision processing error.
00010001 | Invalid image memory.
00010001 | Input region is too small.
00010002 | Input region exceeds image boundary.
00019000 | IDMax vision processing error.
04010000 | ReadCompositeCode error.
04010001 | Cannot detect 2D component address patterns.
04010002 | Too much invalid 2D component image data.
04010003 | Cannot detect 2D component symbol version.
04010004 | Unable to fill in missing 2D component address patterns.
04010005 | Scan line detected invalid image data.
04010006 | Scan line exceeds image boundary.
04010007 | Cannot detect 1D component finder patterns.
04010008 | Too much invalid 1D component image data.
04010009 | No valid Composite symbols found. Note: For all other symbols, 04020001 is returned.
04010010 | Too many symbol errors to correct.
04010011 | Error correction failed.
04010012 | 1D and 2D are decodable but are not linked.
04010013 | Automatic contrast threshold calculation failed.
04010014 | Contrast sensitivity exceeds allowed range.
04010015 | Scanning parameter exceeds allowed range.
04020000 | ReadIDMax error.
04020001 | No valid symbols found.
04020002 | Could not decode symbol.

GetErrorCount(IDMax,[Index])

Returns the number of erroneous codewords found in a 2D symbol. This value is used to calculate UnusedEC.

GetErrorString(IDMax,[Index])

Returns diagnostic information if symbol decoding fails. For more information, see ID Error Strings.

GetFormat(IDMax,[Index])

Returns the value representing the format of a 2D symbol in the ReadIDMax function. For more information, see GetFormat Values.
GetFound(IDMax,Index) | Returns whether the indexed ID symbol is found; 0.0 for not found, or 1.0 for found.

GetGrade(IDMax)

Returns the overall quality grade for the barcode, based on the lowest grade received from the Contrast, Modulation, Defect and Decodability tests.

  • Grade A = 4.0
  • Grade B = 3.0
  • Grade C = 2.0
  • Grade D = 1.0
  • Grade F = 0.0

GetGridCols(IDMax,[Index])

Returns the number of columns contained in a 2D symbol.

GetGridRows(IDMax,[Index])

Returns the number of rows contained in a 2D symbol.

GetGrowth(IDMax,[Index])

Returns the 2D symbol print growth test result. The horizontal and vertical print growths are calculated independently and the lower score is returned. This test indicates whether the cells in the symbol vary in size. For example, it is not uncommon with some marking methods for cells to increase in size, moving from the left-side of the symbol to the right. A high quality symbol exhibits little or no print growth. The print growth test result is often linked to the non-uniformity test result, because it can lead to symbols with incorrect proportions.

  • Grade A (4.0) ≥ -0.50 and ≤ 0.50
  • Grade B (3.0) ≥ -0.70 and ≤ 0.70
  • Grade C (2.0) ≥ -.85 and ≤ 0.85
  • Grade D (1.0) ≥ -1.00 and ≤ 1.00
  • Grade F (0.0) < -1.00 or > 1.00
Note: The Verify checkbox in ReadIDMax must be enabled.

GetHigh(IDMax,[Index])

Returns the height of the symbol.

Note: The Verify checkbox in ReadIDMax must be enabled.

GetLearned(IDMax,[Index])

Returns '1' if the model of the symbol has been successfully trained and '0' if the model is not trained.

GetLearnedGridCol(IDMax,[Index])

Returns the number of columns in a trained QR Code or Data Matrix symbol.

GetLearnedGridRow(IDMax,[Index])

Returns the number of rows in a trained QR Code or Data Matrix symbol.
GetLearnedSymbology(IDMax) | Returns a string containing the 1D symbology currently learned in ReadIDMax.

GetMirror(IDMax,[Index])

Returns the mirrored status (0 = not mirrored, 1 = mirrored) of a Data Matrix or QR Code symbol.

GetModulation(IDMax,[Index])

Returns the ratio of the Minimum Edge Response (ECMin) to the average contrast of the barcode (except RSS Stacked barcodes). This test measures how consistent the contrast is throughout the barcode.

  • Grade A (4.0) ≥ .70
  • Grade B (3.0) ≥ .60
  • Grade C (2.0) ≥ .50
  • Grade D (1.0) ≥ .40
  • Grade F (0.0) < .40
Note: The Verify checkbox in ReadIDMax must be enabled.

GetModuleSize(IDMax,[Index])

Returns the size of the 2D module.

GetNonUniformity(IDMax,[Index])

Returns the 2D symbol axial non-uniformity test result (except PDF417 symbols). Also referred to as axial non-uniformity, this is a measurement of whether the symbol is correctly proportioned for its grid size. For example, if a symbol having an equal number of rows and columns is not square, then it is considered to be non-uniform.

  • Grade A (4.0) ≥ 0.06
  • Grade B (3.0) ≥ 0.08
  • Grade C (2.0) ≥ 0.10
  • Grade D (1.0) ≥ 0.12
  • Grade F (0.0) > 0.12
Note: The Verify checkbox in ReadIDMax must be enabled.

GetNumResults(IDMax)

Returns the number of found and decoded results.

GetRawStream(IDMax,[Index])

Returns the undecoded data stream from a read symbol of a Code 128 symbol.

GetResolution(IDMax,[Index])

Returns the minimum (narrowest) element width for a Postal barcode. For 2D symbols, the average size, in pixels, of the cells is returned. Although not specifically a quality verification test, resolution measures the average size, in pixels, of an element (or cell) in a symbol. Each type of symbol has a minimum resolution specification:

  • Data Matrix: 4 pixels per element
  • QR Code: 4 pixels per element
  • PDF 417: 3 pixels per element
  • EAN/UCC Composite: 3 pixels per element

GetRow(IDMax, [Index1],[Index2])

Returns the row coordinate (in pixels) of the upper left-hand corner of a Postal symbol and the row (y) coordinate for 2D symbols at the indexed (0 to 3) finder pattern point. For more information, see Finder Pattern Points.The second index identifies the indexed symbol.

Note: The Verify checkbox in ReadIDMax must be enabled.

GetString(IDMax,[Index])

Returns the string from the indexed result, or result 0, if [Index] is not provided.

Note: If the string contains NULL (0x00), the function will automatically swap out the character with “<NUL>”.

GetStringIDMax(IDMax,TranslationMode,[Index])

Returns the string from the indexed result, based on the selected Translation Mode (0 - 3; default = 1), which specifies how the function will process non-printable ASCII characters.

  • When Translation Mode is set to 0, the function will not translate any non-printable ASCII characters (returns the raw string). This mode is useful when outputting multi-bytes character sets such as Unicode or Shift-JIS.
  • When Translation Mode is set to 1, the function will translate all non-printable ASCII characters (0-31, 127-255), using the following table:
0x00 | "<NUL>"
0x01 | "<SOH>"
0x02 | "<STX>"
0x03 | "<ETX>"
0x04 | "<EOT>"
0x05 | "<ENQ>"
0x06 | "<ACK>"
0x07 | "<BEL>"
0x08 | "<BS>"
0x09 | "<HT>"
0x0a | "<LF>"
0x0b | "<VT>"
0x0c | "<FF>"
0x0d | "<CR>"
0x0e | "<SO>"
0x0f | "<SI>"
0x10 | "<DLE>"
0x11 | "<DC1>"
0x12 | "<DC2>"
0x13 | "<DC3>"
0x14 | "<DC4>"
0x15 | "<NAK>"
0x16 | "<SYN>"
0x17 | "<ETB>"
0x18 | "<CAN>"
0x19 | "<EM>"
0x1a | "<SUB>"
0x1b | "<ESC>"
0x1c | "<FS>"
0x1d | "<GS>"
0x1e | "<RS>"
0x1f | "<US>"
0x7f | "<DEL>"
Note: Non-printable ASCII characters that are not listed in the table will be translated as "<X>", where X is the decimal value.
  • When the Translation Mode is set to 2, the function will translate all non-printable ASCII characters except CR (0x0d) and LF (0x0a).
  • When the Translation Mode is set to 3, the function will not translate non-printable ASCII characters (returns the raw string), except the null characters that are replaced with "<NUL>".

GetSymbologyGroup(IDMax)

Returns the symbology group selected for the ReadIDMax tool (0 = Data Matrix, 1 = QR Code, 2 = 1D/Stacked, 3 = Postal).

GetSymbologyIdentifier(IDMax,[Index])

Returns the type of symbol, as a three-character code, based on the ISO 15424 specification.

GetUnusedEC(IDMax,[Index])

Returns the unused error correction test result for a 2D symbol, as a percentage. This test measures the percentage of error correction contained in the symbol that does not have to be used for a successful decode. High quality symbols can be decode without having to use any error correction.

  • Grade A (4.0) ≥ 0.62
  • Grade B (3.0) ≥ 0.50
  • Grade C (2.0) ≥ 0.37
  • Grade D (1.0) ≥ 0.25
  • Grade F (0.0) < 0.25

GetWide(IDMax,[Index])

Returns the width of the symbol.

Note: The Verify checkbox in ReadIDMax must be enabled.
SetSymbolMinStringLength(IDMax,Symbology,MinLength)

Sets the minimum string length of the specified Symbology for the referenced IDMax structure. Only supports Pharmacode(255) and Interleaved 2 of 5 (73).


IDValidate

Note: All returned values are from a referenced IDValid structure which is inserted in the spreadsheet when the ValidateIDData function is created. When the ValidateIDData function references a ReadIDMax function, the optional Index can reference an indexed string from the ReadIDMax function result table. For more information, see ValidateIDData and ReadIDMax.

Function

Description

GetCAGECode(IDValid,[Index])

Returns the CAGE Code in the DoD UID data.

GetCAGECodeID(IDValid,[Index])

Returns the identifier representing CAGE Code in the DoD UID data.

GetDataFormat(IDValid, [Index])

Returns the format used for encoding data.

GetDiagnosticCode(IDValid,[Index])

Returns diagnostic code.

Diagnostic Code | Diagnostic Information Strings
04040000 | Data validated successfully.
04040001 | Invalid symbology identifier.
04040003 | Invalid field identifier.
04040004 | Invalid Application Identifier (AI).
04040005 | Invalid Data Identifier (DI).
04040006 | Invalid Text Element Identifier (TEI).
04040007 | Invalid field data.
04040008 | Invalid field separator.
04040009 | Data is not ISO 15434 compliant.
04040010 | Unsupported format.
04040011 | Invalid format code.
04040012 | ISO 15434 syntax not supported for this code.
04040013 | Field is invalid in this application.
04040014 | Application field is not currently supported.
04040015 | Invalid application data.
04040016 | Multiple formats present.
04040017 | Duplicate fields present.
04040018 | Invalid Construct #1 DoD UID data.
04040019 | Invalid Construct #2 DoD UID data.
04040020 | Invalid DoD UID data.
04040021 | Missing Format Trailer character.
04040022 | Missing Message Trailer character.

GetDiagnosticString(IDValid,[Index])

Returns an applicable diagnostic information string.

Diagnostic Information Strings

Data validated successfully.

Invalid symbology identifier.

Invalid field identifier.

Invalid Application Identifier (AI).

Invalid Data Identifier (DI).

Invalid Text Element Identifier (TEI).

Invalid field data.

Invalid field separator.

Data is not ISO 15434 compliant.

Unsupported format.

Invalid format code.

ISO 15434 syntax not supported for this code.

Field is invalid in this application.

Application field is not currently supported.

Invalid application data.

Multiple formats present.

Duplicate fields present.

Invalid Construct #1 DoD UID data.

Invalid Construct #2 DoD UID data.

Invalid DoD UID data.

Missing Format Trailer character.

Missing Message Trailer character.

GetFieldData(IDValid, Index)

Returns the data encoded in the Indexed field.

GetFieldIdentifier(IDValid, Index)

Returns the Application Identifier (AI) encoded in the Indexed field.

Application Identifier | Application Identifier Description
00 | Serial Shipping Container Code (SSCC)
01 | Global Trade Item Number (GTIN)
02 | GTIN of Contained Trade Items
10 | Batch or Lot Number
11 | Production Date
12 | Due Date
13 | Packaging Date
15 | Best Before Date
16 | Sell By Date (YYMMDD)
17 | Expiration Date
20 | Variant Number
21 | Serial Number
22 | Secondary Data Fields
240 | Additional Item Identification
241 | Customer Part Number
242 | Made-to-Order Variation Number
250 | Secondary Serial Number
251 | Reference to Source Entity
253 | Global Document Type Identifier (GDTI)
254 | GLN Extension Component
255 | Global Coupon Number (GCN)
30 | Count of Items
310 | Net weight, kilograms
311 | Length of first dimension, meters
312 | Width, diameter, or second dimension, meters
313 | Depth, thickness, height, or third dimension, meters
314 | Area, square meters
315 | Net volume, liters
316 | Net volume, cubic meters
320 | Net weight, pounds
321 | Length or first dimension, inches
322 | Length or first dimension, feet
323 | Length or first dimension, yards
324 | Width, diameter, or second dimension, inches
325 | Width, diameter, or second dimension, feet
326 | Width, diameter, or second dimension, yards
327 | Depth, thickness, height, or third dimension, inches
328 | Depth, thickness, height, or third dimension, feet
329 | Depth, thickness, height, or third dimension, yards
330 | Logistic weight, kilograms
331 | Length or first dimension, meters
332 | Width, diameter, or second dimension, meter
333 | Depth, thickness, height, or third dimension, meters
334 | Area, square meters
335 | Logistic volume, liters
336 | Logistic volume, cubic liters
337 | Kilograms per square meter
340 | Logistic weight, pounds
341 | Length or first dimension, inches
342 | Length or first dimension, feet
343 | Length or first dimension, yards
344 | Width, diameter, or second dimension
345 | Width, diameter, or second dimension
346 | Width, diameter, or second dimension
347 | Depth, thickness, height, or third dimension
348 | Depth, thickness, height, or third dimension
349 | Depth, thickness, height, or third dimension
350 | Area, square inches
351 | Area, square feet
352 | Area, square yards
353 | Area, square inches
354 | Area, square feet
355 | Area, square yards
356 | Net weight, troy ounces
357 | Net weight (or volume), ounces
360 | Net volume, quarts
361 | Net volume, gallons U.S.
362 | Logistic volume, quarts
363 | Logistic volume, gallons U.S.
364 | Net volume, cubic inches
365 | Net volume, cubic feet
366 | Net volume, cubic yards
367 | Logistic volume, cubic inches
368 | Logistic volume, cubic feet
369 | Logistic volume, cubic yards
370 | Count of Trade Items
390 | Applicable Amount Payable, local currency
391 | Applicable Amount Payable with ISO Currency Code
392 | Applicable Amount Payable, single monetary area
393 | Applicable Amount Payable with ISO Currency Code
400 | Customer's Purchase Order Number
401 | Consignment Number
402 | Shipment Identification Number
403 | Routing Code
410 | Ship to - Deliver to Global Location Number
411 | Bill to - Invoice to Global Location Number
412 | Purchased from Global Location Number
413 | Ship for - Deliver for - Forward to Global Location Number
414 | Identification of a Physical Location - Global Location Number
415 | Global Location Number of the Invoicing Party
420 | Ship to - Deliver to Postal Code Within a Single Postal Authority
421 | Ship to - Deliver to Postal Code with ISO Country Code
422 | Country of Origin of a Trade Item
423 | Country of Initial Processing
424 | Country of Processing
425 | Country of Disassembly
426 | Country Covering full Process Chain
7001 | NATO Stock Number (NSN)
7002 | UN/ECE Meat Carcasses and Cuts Classification
7030-7039 | Approval Number of Processor with ISO Country Code
710 | National Healthcare Reimbursement Number - Germany IFA
711 | National Healthcare Reimbursement Number - France CIP
712 | National Healthcare Reimbursement Number - Spain National Code
713 | National Healthcare Reimbursement Number - Brazil ANVISA
714 | National Healthcare Reimbursement Number - Portugal INFARMED
8001 | Roll Products (Width, Length, Core diameter, Direction, Splices)
8002 | Cellular Mobile Telephone Identifier
8003 | Global Returnable Asset Identifier (GRAI)
8004 | Global Individual Asset Identifier (GIAI)
8005 | Price Per Unit of Measure
8006 | Identification of the Components of a Trade I
8007 | International Bank Account Number (IBAN)
8008 | Date and Time of Production
8010 | Component / Part Identifier (CPID)
8011 | Component / Part Identifier Serial Number (CPID SERIAL)
8018 | Global Service Relation Number (GSRN)
8020 | Payment Slip Reference Number
8100 | GS1-128 Coupon Extended Code
8101 | GS1-128 Coupon Extended Code
8102 | GS1-128 Coupon Extended Code
90 | Information Mutually Agreed Between Trading Partners
91 to 99 | Company Internal Information
Note:
  • Application Identifiers 16, 255, 710, 711, 712, 713, 8010 and 8011 are supported with:
    • In-Sight Micro 1000 series, 5000 series and 70xx - 74xx series vision systems running In-Sight firmware version 4.10.1 and later, which is compliant with GS1 General Specifications, Version 14.
    • In-Sight 5.4.0 firmware and later, which is compliant with GS1 General Specifications, Version 14.
  • Application Identifier 714 is supported with:
    • In-Sight Micro 1000 series, 5000 series and 70xx - 74xx series vision systems running In-Sight firmware version 4.10.5 PR1 and later.
    • In-Sight 5.7.0 firmware and later.

GetAIDescription(IDCode, Index)

Returns the Application Identifier (AI) description encoded in the Indexed field.

GetGTIN(IDValid,[Index])

Returns the GTIN (CAGE Code + Original Part Number within CAGE Code) in the DoD UID data.

GetGTINID(IDValid,[Index])

Returns the identifier representing GTIN (CAGE Code + Original Part Number within CAGE Code) in the DoD UID data.

GetInvalidDataLength(IDValid,[Index])

Returns the length of the data substring that is in error.

GetInvalidDataPosition(IDValid,[Index])

Returns the start position of the data substring that is in error.

GetNumDataFormats(IDValid,[Index])

Returns the number of formats used to encode data.

GetNumFields(IDValid,[Index])

Returns the number of fields encoded in the data.

GetPartNum(IDValid,[Index])

Returns the Part Number in the DoD UID data.

GetPartNumID(IDValid,[Index])

Returns the identifier representing Part Number in the DoD UID data.

GetSerialNum(IDValid,[Index])

Returns the Serial Number in the DoD UID data.

GetSerialNumID(IDValid,[Index])

Returns the identifier representing Serial Number in the DoD UID data.

GetUID(IDValid,[Index])

Returns the UID in the DoD UID data.

GetUIDID(IDValid,[Index])

Returns the identifier representing UID in the DoD UID data.

GetValid(IDValid,[Index])

Returns whether the referenced data is valid or not (0 = not valid, 1 = valid).


IDVerify

  • General Purpose Vision Data Access Functions
  • ISO 16022/18004 Vision Data Access Functions
  • ISO 15415/AIM-DPM Vision Data Access Functions
  • Cognex Supplemental Vision Data Access Functions
  • IAQG/AS-9132 Vision Data Access Functions
  • Postal Code Vision Data Access Functions
Note:
  • All returned values are from a referenced IDVerify structure, which is inserted in the spreadsheet when the VerifyIDCode function is created.
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • When the VerifyIDCode function references a ReadIDMax function, the optional Index can reference an indexed string from the ReadIDMax function result table. For more information, see VerifyIDCode and ReadIDMax.
  • For the ReadIDMax function, the Verify parameter must be enabled to support the following functions.
  • For the ReadIDCode function, the Algorithm parameter must be enabled in the referenced ReadIDCode function to support the following functions, and the functions are only available for Data Matrix, QR Code or Postal symbols (POSTNET, PLANET, UPU 4-State, Australia Post 4-State, Japan Post 4-State, USPS OneCode4-State). For more information, see ReadIDCode.

General Purpose Vision Data Access Functions

Function Description

GetGrade(IDVerify,[Index])

Returns the overall quality grade of the symbol based on the selected metrics.

Note: If more than one of the metric sets (ISO, IAQG9132 or Cognex) is enabled in the VerifyIDCode function, GetGrade will return the lowest grade of the enabled metrics. For more information, see VerifyIDCode.

GetHigh(IDVerify,[Index])

Returns the height of the symbol.

GetWide(IDVerify,[Index])

Returns the width of the symbol.

GetRow(IDVerify,[Index])

Returns the row coordinate (in pixels) of the upper left-hand corner of a barcode or the column coordinate for 2D symbols at the indexed (0 to 3) finder pattern point. For more information, see Finder Pattern Points.

Note:
  • The Verify checkbox in ReadIDMax must be enabled.
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetCol(IDVerify,[Index])

Returns the column coordinate (in pixels) of the upper left-hand corner of a barcode or the column coordinate for 2D symbols at the indexed (0 to 3) finder pattern point. For more information, see Finder Pattern Points.

Note:
  • The Verify checkbox in ReadIDMax must be enabled.
  • The Verify parameter in the ReadIDCode function must be enabled. For more information, see ReadIDCode.

GetAngle(IDVerify,[Index])

Returns the angle of the symbol.

Get2DModulation(IDVerify,[Index])

Returns the Modulation of the symbol as defined by the selected metric method. Either ISO 15415 or AIM-DPM metrics must be enabled in the VerifyIDCode function. For more information, see VerifyIDCode.

Note: Get2DModulation will return an #ERR for symbols that are not Data Matrix ECC 200 symbols.
  • Grade A = 4.0
  • Grade B = 3.0
  • Grade C = 2.0
  • Grade D = 1.0
  • Grade F = 0.0

GetNoReadString(IDVerify,[Index])

Returns diagnostic strings to provide information regarding ReadIDCode failures. Depending on the code type being verified, the grid size, polarity, resolution, ECC level, and in some cases code type, is also returned.

Closed See diagnostic information strings

Diagnostic Information Strings

Symbol successfully decoded.

Symbol was found but failed to decode.

No symbol found or decoded.

ReadIDCode operation timed out.

Sensor ran out of memory while trying to decode.

ReadIDCode unexpectedly failed.

Invalid ReadIDCode Cell reference in VerifyIDCode.

Invalid Image Cell reference in ReadIDCode.

No-Read diagnostics only supported for Data Matrix or QR Code when Algorithm checkbox is enabled.

Algorithm checkbox is not enabled in ReadIDCode property sheet.

GetNoReadStatus(IDVerify,[Index])

Returns diagnostic codes to provide information regarding ReadIDCode failures.

Closed See diagnostic codes and corresponding information strings

Data Matrix: All metrics are computed during the following situations.

Diagnostic Code | Corresponding Error String
04030000 | Symbol successfully decoded.
04030001 | Symbol was found but failed to decode.

QR Code: All metrics, with the exception of ISO 15415 and IAQG-9132, are computed during the following situations.

Diagnostic Code | Corresponding Error String
04030000 | Symbol successfully decoded.
04030001 | Symbol was found but failed to decode.

No metrics are available for either Data Matrix or QR Code during these situations.

Diagnostic Code | Corresponding Error String
04030002 | No symbol found or decoded.
04030003 | ReadIDCode operation timed out.
04030004 | Sensor ran out of memory while trying to decode.
04030005 | ReadIDCode unexpectedly failed.
04030006 | Invalid ReadIDCode Cell reference in VerifyIDCode.
04030007 | Invalid Image Cell reference in ReadIDCode.
04030008 | No-Read diagnostics only supported for Data Matrix or QR Code when Algorithm checkbox is enabled.
04030009 | Algorithm checkbox is not enabled in ReadIDCode property sheet.

ISO 16022/18004 Vision Data Access Functions

Function Description

GetContrast(IDVerify,[Index])

If ISO 15415 is selected, returns the symbol contrast metric result, which is the percentage difference between the foreground and background grey levels.

  • Grade A (4.0): 0.70 ≤ x < 1.00
  • Grade B (3.0): 0.55 ≤ x < 0.70
  • Grade C (2.0): 0.40 ≤ x < 0.55
  • Grade D (1.0): 0.20 ≤ x < 0.40
  • Grade F (0.0): 0.00 ≤ x < 0.20

If AIM-DPM (Either Process control or Contract Compliance) is selected, returns the symbol contrast metric, which is computed as the difference between the light and dark distribution means as a percentage of the light distribution mean. The AIM-DPM standard requires that the image be acquired such that the light distribution is at 78 percent to within a ± 8% tolerance range.

  • Grade A (4.0): 0.30 ≤ x < 1.00
  • Grade B (3.0): 0.25 ≤ x < 0.30
  • Grade C (2.0): 0.20 ≤ x < 0.25
  • Grade D (1.0): 0.15 ≤ x < 0.20
  • Grade F (0.0): 0.00 ≤ x < 0.15

GetGrowth(IDVerify,[Index])

Returns the 2D symbol The horizontal and vertical print growths are calculated independently and the lower score is returned. print growth metric result.

  • Grade A (4.0): -0.50 ≤ x ≤ 0.50
  • Grade B (3.0): -0.70 ≤ x < -0.50 or 0.50 < x ≤ 0.70
  • Grade C (2.0): -0.85 ≤ x < -0.70 or 0.70 < x ≤ 0.85
  • Grade D (1.0): -1.00 ≤ x < -0.85 or 0.85 < x ≤ 1.00
  • Grade F (0.0): x < -1.00 or x > 1.00

GetGrowthHorizontal(IDVerify,[Index])

Returns the print growth along the horizontal dimension of the 2D symbol.

  • Grade A (4.0): -0.50 ≤ x ≤ 0.50
  • Grade B (3.0): -0.70 ≤ x < -0.50 or 0.50 < x ≤ 0.70
  • Grade C (2.0): -0.85 ≤ x < -0.70 or 0.70 < x ≤ 0.85
  • Grade D (1.0): -1.00 ≤ x < -0.85 or 0.85 < x ≤ 1.00
  • Grade F (0.0): x < -1.00 or x > 1.00

GetGrowthVertical(IDVerify,[Index])

Returns the print growth along the vertical dimension of the 2D symbol.

  • Grade A (4.0): -0.50 ≤ x ≤ 0.50
  • Grade B (3.0): -0.70 ≤ x < -0.50 or 0.50 < x ≤ 0.70
  • Grade C (2.0): -0.85 ≤ x < -0.70 or 0.70 < x ≤ 0.85
  • Grade D (1.0): -1.00 ≤ x < -0.85 or 0.85 < x ≤ 1.00
  • Grade F (0.0): x < -1.00 or x > 1.00

GetNonUniformity(IDVerify,[Index])

Returns the 2D symbol axial non-uniformity metric result.

  • Grade A (4.0): 0.00 ≤ x ≤ 0.06
  • Grade B (3.0): 0.06 < x ≤ 0.08
  • Grade C (2.0): 0.08 < x ≤ 0.10
  • Grade D (1.0): 0.10 < x ≤ 0.12
  • Grade F (0.0): 0.12 < x ≤ 1.00

GetRefDecode(IDVerify,[Index])

Indicates whether the symbol was decoded successfully.

  • Grade A (4.0): 1
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 0

GetUnusedEC(IDVerify,[Index])

Returns the unused error correction metric result for a 2D symbol, as a percentage.

  • Grade A (4.0): 0.62 ≤ x ≤ 1.00
  • Grade B (3.0): 0.50 ≤ x < 0.62
  • Grade C (2.0): 0.37 ≤ x < 0.50
  • Grade D (1.0): 0.25 ≤ x < 0.37
  • Grade F (0.0): 0.00 ≤ x < 0.25

ISO 15415/AIM-DPM Vision Data Access Functions

Function Description

Get2DModulation(IDVerify,[Index])

Returns the Modulation of the symbol as defined by the selected metric method. Either ISO 15415 or AIM-DPM metrics must be enabled in the VerifyIDCode function. For more information, see VerifyIDCode.

Note: Get2DModulation will return an #ERR for symbols that are not Data Matrix ECC 200 symbols.
  • Grade A = 4.0
  • Grade B = 3.0
  • Grade C = 2.0
  • Grade D = 1.0
  • Grade F = 0.0

GetContrast(IDVerify,[Index])

If ISO 15415 is selected, returns the symbol contrast metric result, which is the percentage difference between the foreground and background grey levels.

  • Grade A (4.0): 0.70 ≤ x < 1.00
  • Grade B (3.0): 0.55 ≤ x < 0.70
  • Grade C (2.0): 0.40 ≤ x < 0.55
  • Grade D (1.0): 0.20 ≤ x < 0.40
  • Grade F (0.0): 0.00 ≤ x < 0.20

If AIM-DPM (Either Process control or Contract Compliance) is selected, returns the symbol contrast metric, which is computed as the difference between the light and dark distribution means as a percentage of the light distribution mean. The AIM-DPM standard requires that the image be acquired such that the light distribution is at 78 percent to within a ± 8% tolerance range.

  • Grade A (4.0): 0.30 ≤ x < 1.00
  • Grade B (3.0): 0.25 ≤ x < 0.30
  • Grade C (2.0): 0.20 ≤ x < 0.25
  • Grade D (1.0): 0.15 ≤ x < 0.20
  • Grade F (0.0): 0.00 ≤ x < 0.15

GetExtremeReflectance(IDVerify,[Index])

Returns the ISO 15415 Extreme Reflectance for the symbol. The ISO 15415 metrics must be enabled in the VerifyIDCode function. This metric is not part of the AIM-DPM standard. The function will return #ERR if AIM-DPM is selected.

  • Grade A (4.0): 1
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 0

GetFixedPatternDamage(IDVerify,[Index])

Returns the Fixed Pattern Damage metric of the symbol. Either ISO 15415 or AIM-DPM metrics must be enabled in the VerifyIDCode function. Fixed pattern damage is measured differently between ISO 15415 and AIM-DPM. For more information, see VerifyIDCode.

  • Grade A = 4.0
  • Grade B = 3.0
  • Grade C = 2.0
  • Grade D = 1.0
  • Grade F = 0.0

GetGridNonUniformity(IDVerify,[Index])

Returns the Grid Non-uniformity of the symbol. Either ISO 15415 or AIM-DPM metrics must be enabled in the VerifyIDCode function. For more information, see VerifyIDCode.

  • Grade A (4.0): x ≤ 0.38
  • Grade B (3.0): 0.38 < x ≤ 0.50
  • Grade C (2.0): 0.50 < x ≤ 0.63
  • Grade D (1.0): 0.63 < x ≤ 0.75
  • Grade F (0.0): x > 0.75

GetGrowth(IDVerify,[Index])

Returns the 2D symbol print growth metric result. The horizontal and vertical print growths are calculated independently and the lower score is returned. Both 15415 and AIM-DPM classify print growth as a process control metric; they do not define any grade mapping and do not use it for computing the symbol grade.

Note:
  • Print growth is measured and reported differently from that of 16022/18004 standards. Both ISO-15415 and AIM-DPM measure print growth as average deviation of the measured cell size from the nominal as a percentage of the nominal. Negative values represent print loss.
  • Print growth is measured independently along the horizontal and vertical dimensions of the symbol as returned by the GetGrowthHorizontal and GetGrowthVertical functions. GetGrowth returns the average of horizontal and vertical print growth values.

GetGrowthHorizontal(IDVerify,[Index])

Returns the print growth along the horizontal dimension of the 2D symbol.

  • Grade A (4.0): -0.50 ≤ x ≤ 0.50
  • Grade B (3.0): -0.70 ≤ x < -0.50 or 0.50 < x ≤ 0.70
  • Grade C (2.0): -0.85 ≤ x < -0.70 or 0.70 < x ≤ 0.85
  • Grade D (1.0): -1.00 ≤ x < -0.85 or 0.85 < x ≤ 1.00
  • Grade F (0.0): x < -1.00 or x > 1.00

GetGrowthVertical(IDVerify,[Index])

Returns the print growth along the vertical dimension of the 2D symbol.

  • Grade A (4.0): -0.50 ≤ x ≤ 0.50
  • Grade B (3.0): -0.70 ≤ x < -0.50 or 0.50 < x ≤ 0.70
  • Grade C (2.0): -0.85 ≤ x < -0.70 or 0.70 < x ≤ 0.85
  • Grade D (1.0): -1.00 ≤ x < -0.85 or 0.85 < x ≤ 1.00
  • Grade F (0.0): x < -1.00 or x > 1.00

GetNonUniformity(IDVerify,[Index])

Returns the 2D symbol axial non-uniformity metric result.

  • Grade A (4.0): 0.00 ≤ x ≤ 0.06
  • Grade B (3.0): 0.06 < x ≤ 0.08
  • Grade C (2.0): 0.08 < x ≤ 0.10
  • Grade D (1.0): 0.10 < x ≤ 0.12
  • Grade F (0.0): 0.12 < x ≤ 1.00

GetRefDecode(IDVerify,[Index])

Indicates whether the symbol was decoded successfully.

  • Grade A (4.0): 1
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 0

GetUnusedEC(IDVerify,[Index])

Returns the unused error correction metric result for a 2D symbol, as a percentage.

  • Grade A (4.0): 0.62 ≤ x ≤ 1.00
  • Grade B (3.0): 0.50 ≤ x < 0.62
  • Grade C (2.0): 0.37 ≤ x < 0.50
  • Grade D (1.0): 0.25 ≤ x < 0.37
  • Grade F (0.0): 0.00 ≤ x < 0.25

Cognex Supplemental Vision Data Access Functions

Function Description

GetBkgdUniformity(IDVerify,[Index])

Returns the grayscale background uniformity of a 2D symbol (including the quiet zone). A symbol with a uniform gray level for the quiet zone and the modules that represent binary data bit 0 is considered to be of good quality.

  • Grade A (4.0): 0.9 ≤ x ≤ 1.0
  • Grade B (3.0): 0.8 ≤ x < 0.9
  • Grade C (2.0): 0.7 ≤ x < 0.8
  • Grade D (1.0): 0.6 ≤ x < 0.7
  • Grade F (0.0): 0.0 ≤ x < 0.6

GetCellSeparability(IDVerify,[Index])

Returns the measurement of the bi-modal characteristics of the modules that represent binary data bit 1 or 0. The gray levels of the modules are extracted from the sampling grid defined in the AIM reference decode algorithm.

  • Grade A (4.0): 0.75 ≤ x ≤ 1.00
  • Grade B (3.0): 0.60 ≤ x < 0.75
  • Grade C (2.0): 0.50 ≤ x < 0.60
  • Grade D (1.0): 0.40 ≤ x < 0.50
  • Grade F (0.0): 0.00 ≤ x < 0.40

GetFinderConfCon(IDVerify,[Index])

Returns the value of the extent to which the finder pattern (including timing pattern) of a symbol conforms to the AIM symbology specification. In particular, it measures how well adjacent modules of the same color form solid lines and modules of different color have the same size. A low value of this metric corresponds to low likelihood of the symbol location step of the AIM reference decode algorithm being successful. This function also measures the ratio of the number of modules in the finder pattern (including timing pattern) that represent expected binary data bit 0 or 1.

  • Grade A (4.0): 1.0
  • Grade B (3.0): 0.9 ≤ x < 1.0
  • Grade C (2.0): 0.8 ≤ x < 0.9
  • Grade D (1.0): 0.7 ≤ x < 0.8
  • Grade F (0.0): 0.0 ≤ x < 0.7

GetFinderConfDot(IDVerify,[Index])

Returns the value of how well a dot-peened symbol's finder pattern conforms to the AIM specification.

  • Grade A (4.0): 1.0
  • Grade B (3.0): 0.9 ≤ x < 1.0
  • Grade C (2.0): 0.8 ≤ x < 0.9
  • Grade D (1.0): 0.7 ≤ x < 0.8
  • Grade F (0.0): 0.0 ≤ x < 0.7

GetImageSharpness(IDVerify,[Index])

Returns the value of the sharpness of the edges in the image by comparing the edge magnitude obtained from a 3x3 Sobel edge detector to the image contrast. An image with high sharpness value is considered to be well-focused and of good quality.

  • Grade A (4.0): 0.5 ≤ x ≤ 1.0
  • Grade B (3.0): 0.4 ≤ x < 0.5
  • Grade C (2.0): 0.3 ≤ x < 0.4
  • Grade D (1.0): 0.2 ≤ x < 0.3
  • Grade F (0.0): 0.0 ≤ x < 0.2

GetSymSeparability(IDVerify,[Index])

Indicates whether the symbol is a distinct feature in the entire image. A symbol that can be well segmented from the background by a global threshold midway between the minimum and maximum gray level in the image is considered to be of good quality.

  • Grade A (4.0): 1
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 0

IAQG/AS-9132 Vision Data Access Functions

Function Description

GetIAQGOverallGrade(IDVerify,[Index])

 Returns the overall symbol grade as per IAQG 9132 specification using the minimum successfully extracted grades for GetPercDotOSFailGrade, GetPercDotPositionFailGrade, and GetDistortionAngleGrade.

GetDistortionAngle(IDVerify,[Index])

Returns the deviation, in degrees, from perpendicular of the symbols X and Y-axes.

  • Grade A (4.0): x ≤ 7.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): x > 7.0

GetDistortionAngleGrade(IDVerify,[Index])

Returns the IAQG 9132 grade for angle of distortion.

  • Grade A (4.0): x ≤ 7.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): x > 7.0

GetDotCenter(IDVerify,[Index])

Returns the percentage indicating how well the centers of the cells in the symbol fit their expected positions.

Note: This function is only applicable when verifying dot-peened Data Matrix symbols.
  • Grade A (4.0): 0.0 ≤ x ≤ 10.0
  • Grade B (3.0): 10.0 ≤ x < 20.0
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 20.0 ≤ x < 100.0

GetDotDiameter(IDVerify,[Index])

Returns the average of the cell diameters as a percentage of the expected cell diameter.

Note: This function is only applicable when verifying dot-peened Data Matrix symbols.
  • Grade A (4.0): 60.0 < x < 105.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 0.0 ≤ x ≤ 60.0 and 105.0 ≤ x ≤ 150.0

GetDotOvality(IDVerify,[Index])

Returns the average difference in cell widths and heights as a percentage of the expected cell size.

Note: This function is only applicable when verifying dot-peened Data Matrix symbols.
  • Grade A (4.0): 0.0 ≤ x < 20.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 20.0 ≤ x < 100.0

GetPercDotOSFail(IDVerify,[Index])

Returns the percentage of ON cells in the symbol that are outside either dot size or ovality range.

GetPercDotOSFailGrade(IDVerify,[Index])

Returns the IAQG 9132 grade for percentage of ON cells that are outside dot size or ovality range. If the value is above 2%, this metric is a Fail (0) grade, otherwise it is a Pass (4).

GetPercDotPositionFail(IDVerify,[Index])

Returns the percentage of ON cells in the symbol that exceed position tolerance range.

GetPercDotPositionFailGrade(IDVerify,[Index])

Returns the IAQG 9132 grade for percentage of ON cells that exceed position tolerance range.

  • Grade A (4.0): 1
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 0

GetSDevDotCenter(IDVerify,[Index])

Returns the standard deviation of dot position shift errors.

Note: This function is only applicable when verifying dot-peened Data Matrix symbols.
  • Grade A (4.0): 0.0 ≤ x < 20.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 20.0 ≤ x < 100.0

GetSDevDotDiameter(IDVerify,[Index])

Returns the standard deviation of all the cell diameters.

Note: This function is only applicable when verifying dot-peened Data Matrix symbols.
  • Grade A (4.0): 0.0 ≤ x < 20.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 20.0 ≤ x < 100.0

GetSDevDotOvality(IDVerify,[Index])

Returns the standard deviation between cell widths and heights.

Note: This function is only applicable when verifying dot-peened Data Matrix symbols.
  • Grade A (4.0): 0.0 ≤ x < 20.0
  • Grade B (3.0): N/A
  • Grade C (2.0): N/A
  • Grade D (1.0): N/A
  • Grade F (0.0): 20.0 ≤ x < 100.0

Postal Code Vision Data Access Functions

Function Description

GetBarPitch(IDVerify,[Index])

Returns the average pitch of the bars in the Postal barcode.

GetBarSkew(IDVerify,[Index])

Returns the average skew of the bars in the Postal barcode.

GetBarSpace(IDVerify,[Index])

Returns the average space between bars in the Postal barcode.

GetBarVoid(IDVerify,[Index])

Returns the average void spacing (area without ink) of the bars in the Postal barcode.

GetBarHeight(IDVerify,[Index])

Returns the average height of the specified type of bars in the Postal barcode (Index Input Values: 0 = short/timing, 1 = ascender, 2 = descender, 3 = tall/full).

GetBarWidth(IDVerify,[Index])

Returns the average width of the bars in the Postal barcode.

GetBaselineShift(IDVerify,[Index])

Returns the average shift of the bars from the baseline in the Postal barcode.

GetBGReflectance(IDVerify,[Index])

Returns the average background reflectance.

GetClearanceBottom(IDVerify,[Index])

Returns the clearance (quiet zone) to the bottom of the code.

Note: Only valid if symbol was successfully decoded.

GetClearanceLeft(IDVerify,[Index])

Returns the clearance (quiet zone) to the left of the code.

Note: Only valid if symbol was successfully decoded.

GetClearanceRight(IDVerify,[Index])

Returns the clearance (quiet zone) to the right of the code.

Note: Only valid if symbol was successfully decoded.

GetClearanceTop(IDVerify,[Index])

Returns the clearance (quiet zone) to the top of the code.

Note: Only valid if symbol was successfully decoded.

GetContrast(IDVerify,[Index])

Returns the symbol contrast metric result, which is the percentage difference between the foreground and background grey levels.

GetMaxBarHeight(IDVerify,[Index])

Returns the maximum height of the specified type of bars in the Postal barcode (Index Input Values: 0 = short/timing, 1 = ascender, 2 = descender, 3 = tall/full).

GetMaxBarPitch(IDVerify,[Index])

Returns the maximum pitch of the bars in the Postal barcode.

GetMaxBarSkew(IDVerify,[Index])

Returns the maximum skew of the bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMaxBarSpace(IDVerify,[Index])

Returns the maximum space between bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMaxBarVoid(IDVerify,[Index])

Returns the maximum void spacing (area without ink) of the bars in the Postal barcode.

GetMaxBarWidth(IDVerify,[Index])

Returns the maximum width of the bars in the Postal barcode in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMaxBaselineShift(IDVerify,[Index])

Returns the maximum shift of the bars from the baseline in the Postal barcode.

GetMaxBGReflectance(IDVerify,[Index])

Returns the maximum background reflectance.

GetMaxContrast(IDVerify,[Index])

Returns the maximum contrast between foreground and background (in grey levels).

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMaxOverInkSize(IDVerify,[Index])

Returns the maximum over-ink size of the bars in the Postal barcode.

GetMinBarHeight(IDVerify,[Index])

Returns the minimum height of the specified type of bars in the Postal barcode (Index Input Values: 0 = short/timing, 1 = ascender, 2 = descender, 3 = tall/full).

GetMinBarPitch(IDVerify,[Index])

Returns the minimum pitch of the bars in the Postal barcode.

GetMinBarSpace(IDVerify,[Index])

Returns the minimum space between bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMinBarVoid(IDVerify,[Index])

Returns the minimum void spacing (area without ink) of the bars in the Postal barcode.

GetMinBarWidth(IDVerify,[Index])

Returns the minimum width of the bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMinBarSkew(IDVerify,[Index])

Returns the minimum skew of the bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMinBaselineShift(IDVerify,[Index])

Returns the minimum shift of the bars from the baseline.

GetMinBGReflectance(IDVerify,[Index])

Returns the minimum background reflectance.

GetMinContrast(IDVerify,[Index])

Returns the minimum contrast between foreground and background (in grey levels.)

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetMinOverInkSize(IDVerify,[Index])

Returns the minimum over-ink size of the bars.

GetModulation(IDVerify,[Index])

Returns the ratio of the Minimum Edge Response (ECMin) to the average contrast of the Postal barcode.

GetNBars(IDVerify,[Index])

Returns the number of bars found in a Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetOneBarBaselineShift(IDVerify, [Index])

Returns the baseline shift of the indexed bar in the Postal barcode.

GetOneBarBGReflectance(IDVerify, [Index])

Returns the background reflectance of the indexed bar in the Postal barcode.

GetOneBarCol(IDVerify, [Index])

Returns the column number of the indexed bar in the Postal barcode. For 2-State codes (e.g., POSTNET and PLANET), the bar location is the center of the bottom edge of the bar. For 4-State codes (e.g., UPU 4-State, USPS OneCode 4-State, Japan Post 4-State, Australia Post 4-State), this is the center of the T-element of the bar.

GetOneBarContrast(IDVerify, [Index])

Returns the contrast of the indexed bar in the Postal barcode.

GetOneBarHeight(IDVerify, [Index])

Returns the height of the indexed bar in the Postal barcode.

GetOneBarOverInkSize(IDVerify, [Index])

Returns the over-ink size of the indexed bar in the Postal barcode.

GetOneBarPitch(IDVerify, [Index])

Returns the pitch of the indexed bar in the Postal barcode.

GetOneBarRow(IDVerify, [Index])

Returns the row number of the indexed bar in the Postal barcode. For 2-State codes (e.g., POSTNET and PLANET), the bar location is the center of the bottom edge of the bar. For 4-State codes (e.g., UPU 4-State, USPS OneCode 4-State, Japan Post 4-State, Australia Post 4-State), this is the center of the T-element of the bar.

GetOneBarSkew(IDVerify, [Index])

Returns the skew of the indexed bar in the Postal barcode.

GetOneBarSpace(IDVerify, [Index])

Returns the space of the indexed bar in the Postal barcode.

GetOneBarType(IDVerify, [Index])

Returns the type of the indexed bar in the Postal barcode (Output Values: 0 = short/timing, 1 = ascender, 2 = descender, 3 = tall/full).

Note: The Index value for the parameter references the individual bar in the Postal barcode, and the output value indicates the individual bar type.

GetOneBarVoid(IDVerify, [Index])

Returns the void spacing of the indexed bar in the Postal barcode.

GetOneBarWidth(IDVerify, [Index])

Returns the width of the indexed bar in the Postal barcode.

GetOverInkSize(IDVerify,[Index])

Returns the average over-ink size of the bars in the Postal barcode.

GetSDevBarHeight(IDVerify,[Index])

Returns the standard deviation of the height of the specified type of bars in the Postal barcode (Index Input Values: 0 = short/timing, 1 = ascender, 2 = descender, 3 = tall/full).

GetSDevBarPitch(IDVerify,[Index])

Returns the standard deviation of the pitch of the bars in the Postal barcode.

GetSDevBarSkew(IDVerify,[Index])

Returns the standard deviation of the skew of the bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetSDevBarSpace(IDVerify,[Index])

Returns the standard deviation of the space width between bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetSDevBarVoid(IDVerify,[Index])

Returns the standard deviation of the void spacing (area without ink) of the bars in the Postal barcode.

GetSDevBarWidth(IDVerify,[Index])

Returns the standard deviation of the width of the bars in the Postal barcode.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

GetSDevBaselineShift(IDVerify,[Index])

Returns the standard deviation of the shift of the bars from the baseline.

GetSDevBGReflectance(IDVerify,[Index])

Returns the standard deviation of the background reflectance.

GetSDevOverInkSize(IDVerify,[Index])

Returns the standard deviation of the over-ink size of the bars.

GetVerifyDecoded(IDVerify,[Index])

Returns whether symbol was successfully decoded (Output Values: 0 = unsuccessful, 1 = successful).


Image

Each of the following functions references a Image data structure as the first parameter.

Function

Description

GetArea(Image)

Returns the number of pixels processed in an area. The Image structure must be created by a FindCircleDefects function. For more information, see FindCircleDefects.

GetBrightPixelCount(Image)

Returns the number of pixels above the Threshold. The Image structure must be created by a FindCircleDefects function. For more information, see FindCircleDefects.

GetCol(Image, Index)

Returns the starting column coordinate.

GetDarkPixelCount(Image)

Returns the number of pixels below the threshold. The Image structure must be created by a FindCircleDefects function. For more information, see FindCircleDefects.

GetExposure(Image)

Returns the current Exposure parameter setting (in milliseconds) for the most recent acquisition. The GetExposure function must reference the Image data structure created by the AcquireImage function in cell A0. For more information, see AcquireImage.

Note: If the Automatic Exposure parameter is enabled in the AcquireImage function, the GetExposure function returns the exposure time that is automatically determined by the software.

GetHigh(Image)

Returns the number of rows.

GetPixelValue(Image, Fixture, Point)

Returns the grey value of a pixel at a specified point.

GetRegion(Image)

Returns a Region data structure that contains the region coordinates of the referenced Image function. The output may be used as an External Region parameter reference for Vision Tools that support the External Region parameter. For more information, see Image Functions.

GetRow(Image, Index)

Returns the starting row coordinate.

GetString(Image)

Returns the string sent to an In-Sight slave when it receives a network trigger from an In-Sight master. The default Image data structure in cell A0 on the master system must have a string specified in its Master Data parameter. For more information, see AcquireImage.

GetThresh(Image)

Returns the current binary threshold value. The GetThresh function must reference an Image data structure created by either the Filter function (the Filter Type must be set to Binarize, Greyscale Distance or Sharpen) or the PointFilter function (Binarize must be the specified Operation). For more information, see Filter and PointFilter.

Note:
  • The Filter function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later.
  • The PointFilter function is only available on In-Sight vision systems running In-Sight firmware 4.9.1 and earlier.

GetWide(Image)

Returns the number of columns.


InspectEdge

Each of the following functions references a data structure for the first parameter. Index (zero-based) determines which is being indexed from the structure.

All of the formulas for the InspectEdge functions conform to the following:

  • InspectEdgeForDefect/Position/Width = An Inspect data structure output by the specified function
  • Caliper Index = 0 to N (the total number of Calipers is equal to the number of Calipers output by the InspectEdge function that the InspectEdgeForDefect/Position/Width function is referencing)
  • Edge Pair Index = 0 or 1 (determines which line fit to reference; 0 = the first line fit, and 1 = the second line fit)
  • Edge Index = 0 to N
  • Point Index = 0 to 1
Function | Description
GetCaliperAngle(InspectEdge, Caliper Index) | Returns the angle value of the indexed Caliper.
GetCaliperCol(InspectEdge, Caliper Index) | Returns the column coordinate of the indexed Caliper.
GetCaliperHigh(InspectEdge, Caliper Index) | Returns the Height of the indexed Caliper.
GetCaliperRow(InspectEdge, Caliper Index) | Returns the row coordinate of the indexed Caliper.
GetCaliperWide(InspectEdge, Caliper Index) | Returns the width value of the indexed Caliper.
GetDefectExtremumCaliper(InspectEdgeForDefect, Defect Index, Edge Pair Index, Extremum) | Returns the caliper index within the specified defect that contains the furthest or nearest point from the line fit (Defaults = 0; 0 = the nearest, and 1 = the furthest).
GetDefectFilterCount(InspectEdgeForDefect, Edge Pair Index, Filter Direction) | Returns the number of defects that have been or would be filtered from the resultant data set. Filter Direction. Right = 1 (default), Left = 2.
GetDefectGapBoundsAngle(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the angle of the defect's bounding rectangle. Defect = 0, Gap = 1.
GetDefectGapBoundsCol(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the column coordinate of the defect's bounding rectangle. Defect = 0, Gap = 1.
GetDefectGapBoundsCurve(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the curve of the defect's bounding rectangle. Defect = 0, Gap = 1.
GetDefectGapBoundsHigh(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the height of the defect's bounding rectangle. Defect = 0, Gap = 1.
GetDefectGapBoundsRow(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the row coordinate of the defect's bounding rectangle. Defect = 0, Gap = 1.
GetDefectGapBoundsWide(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the width of the defect's bounding rectangle. Defect = 0, Gap = 1.
GetDefectGapCaliperIndex(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index], [Defect Start/End]) | Returns the Caliper in which the defect starts or ends Defect = 0, Gap = 1; Start = 0, End = 1.
GetDefectGapCount(InspectEdgeForDefect, [Edge Pair Index], [Defect/Gap]) | Returns the number of defects/gaps, depending on which is specified. Defect = 0, Gap = 1.
GetDefectGapExtremumValue(InspectEdgeForDefect/Width, [Defect/Gap/Position], [Edge Pair Index], [Max/Min], [Size/Area/Width]) | Returns the maximum or minimum size, area or width value in the set of defects or gaps (Defects = 0, Gap = 1 and Position = 2; Maximum = 0 and Minimum = 1; Size = 0, Area = 1, Width = 2).
GetDefectGapValue(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap/Position], [Edge Pair Index], [Size/Area/Width]) | Returns the size, area, width or cumulative size/area/width for one or all gap(s) by size, area or width (Defect = 0, Gap = 1 and -1 = the sum of all gaps by size, area or width; Defects = 0, Gap = 1 and Position = 2; Size = 0, Area = 1, Width = 2).
GetEdgeCol(InspectEdgeForDefect, [Caliper Index], [Edge Index], [EdgePair Index]) | Returns the column coordinate of the referenced edge.
GetEdgeContrast(InspectEdgeForDefect, [Caliper Index], [Edge Index], [Edge Pair Index]) | Returns the Contrast value for the indexed Caliper's edge.
GetEdgeCount(InspectEdgeForDefect/Position, [Caliper Index]) | Returns the number of edges found in the indexed Caliper.
GetEdgeFromCenter(InspectEdgeForDefect, [Caliper Index], [Edge Index], [Edge Pair Index]) | Returns the distance from the indexed Caliper's specified edge from the center of the ROI.
GetEdgeFromFit(InspectEdgeForDefect, [Caliper Index], [Edge Pair Index]) | Returns the distance from the referenced Caliper's edge to the line fit. Defect = 0, Gap = 1.
GetEdgeFromRegion(InspectEdgeForDefect, [Caliper Index], [Edge Index], [Edge Pair Index], [Search Region Edge]) | Returns the distance from the search region to the indexed edge of the indexed Caliper.
GetEdgePairCol(InspectEdgeWidth, Caliper Index, Edge Pair Index) | Returns the column coordinate of the specified edge pair within the indexed Caliper.
GetEdgePairCount(InspectEdgeWidth, Caliper Index) | Returns the number of edge pairs within the indexed Caliper.
GetEdgePairRow(InspectEdgeWidth, Caliper Index, Edge Pair Index) | Returns the row coordinate of the specified edge pair within the indexed Caliper.
GetEdgePairWidth(InspectEdgeWidth, Caliper Index, Edge Pair Index) | Returns the width value of the specified edge pair within the indexed Caliper. Specifying an index of 0 for the Edge Pair Index returns only the top scoring edge pair within the indexed Caliper.
GetEdgePosCol(InspectEdgePosition, Caliper Index, Edge Index) | Returns the column coordinate of the specified Caliper's edge position.
GetEdgePosContrast(InspectEdgePosition, Caliper Index, Edge Index) | Returns the contrast of the indexed Caliper's specified edge.
GetEdgePosFromCenter(InspectEdgePosition, Caliper Index, Edge Index) | Returns the distance from the indexed Caliper's specified edge to the center of the ROI.
GetEdgePosFromFit(InspectEdgePosition, Caliper Index) | Returns the distance from the indexed Caliper's edge to the line fit.
GetEdgePosFromRegion(InspectEdgePosition, Caliper Index, Edge Index, Search Region Edge) | Returns the distance from the search region to the indexed edge of the indexed Caliper.
GetEdgePosRow(InspectEdgePosition, Caliper Index, Edge Index) | Returns the row coordinate of the specified Caliper's edge position.
GetEdgePosScore(InspectEdgePosition, Caliper Index, Edge Index) | Returns the score of the indexed Caliper's specified edge.
GetEdgeRow(InspectEdgeForDefect, [Caliper Index], [Edge Index], [Edge Pair Index]) | Returns the row coordinate of the referenced edge.
GetEdgeScore(InspectEdgeForDefect, Caliper Index, Edge Pair Index, Edge Index) | Returns the edge score of each edge detected within the indexed caliper.
GetExtremePoints(InspectEdgeForDefect, [Edge Pair Index], [Near/Far]) | Returns the index of the Caliper whose edge is furthest from the line fit (Near = 0 and Far = 1).
GetExtremePosPoints(InspectEdgePosition, Side) | Returns the index of the Caliper whose edge is furthest from the line fit on either side (Near = 0 and Far = 1), or, if the Line Fit is set to None, returns the points nearest either edge of the Region.
GetExtremeWidth(InspectEdgeWidth, Thinnest/Thickest) | Returns the index of the Caliper which contains the specified extreme width (Thinnest = 0 and Thickest = 1).
GetFitEdgeAngle(InspectEdgeForDefect, [Edge Pair Index]) | Returns the angle value of the specified edge pair within the indexed Caliper.
GetFitEdgeCenterCol(InspectEdgeForDefect, [Edge Pair Index]) | Returns the column coordinate of the center of a Circle Line Fit.
GetFitEdgeCenterRow(InspectEdgeForIndex, Point Index) | Returns the row coordinate of the center of a Circle Line Fit.
GetFitEdgeCol(InspectEdgeForDefect, [Edge Pair Index], [Point Index]) | Returns the column coordinate of the specified point.
GetFitEdgePosAngle(InspectEdgePosition) | Returns the angle value of the of the line fit, calculated from the first point.
GetFitEdgePosCenterCol(InspectEdgePosition, Point Index) | Returns the column coordinate of the center of a Circle Line Fit.
GetFitEdgePosCenterRow(InspectEdgePosition, Point Index) | Returns the row coordinate of the center of a Circle Line Fit.
GetFitEdgePosCol(InspectEdgePosition, Point Index) | Returns the column coordinate of the specified point of the line fit.
GetFitEdgePosRadius(InspectEdgePosition, Point Index) | Returns the distance from the center of a Circle Line Fit.
GetFitEdgePosRow(InspectEdgePosition, Point Index) | Returns the row coordinate of the specified point of the line fit.
GetFitEdgeRadius(InspectEdgeForDefect, [Edge Pair Index]) | Returns the distance from the center of the circle line fit for the selected Edge Pair.
GetFitEdgeRow(InspectEdgeForDefect, [Edge Pair Index], [Point Index]) | Returns the row coordinate of the specified point.
GetIEFitError(InspectEdgeForDefect/Position, [Edge Index]) | Returns the error value for the accuracy of the line or circle fit for the indexed line or circle.
GetNumCalipers(InspectEdge) | Returns the total number of Calipers within the specified InspectEdge function.
GetNumCalipersUsed(InspectEdgeForDefect/Position, [Edge Pair Index]) | Returns the number of Calipers used to construct a line fit or Circle Line Fit. Use the returned value in relation to the value returned by the GetNumCalipers function to determine the percentage of Calipers used to construct the line fit or Circle Line Fit. Optionally, when referencing an InspectEdgeForDefect function with the Find Edge Pairs parameter enabled, specify 0 in the Edge Pair Index to return the number of Calipers used on the first edge, or specify 1 to return the number of Calipers used on the second edge.
GetTotalCount(InspectEdge/ForDefect/Position/Width) | Returns the total number of results for the referenced InspectEdge, InspectEdgeForDefect, InspectEdgePosition or InspectEdgeWidth function.
GetWidth(InspectEdgeWidth, Caliper Index) | Returns the width value of the edge within the indexed Caliper; returns 0 if no edges are found within the indexed Caliper.
GetWidthAverage(InspectEdgeWidth) | Returns the average width value from the referenced InspectEdgeWidth function. If the edge pair has a gap or a defect that is outside of its minimum/maximum range, the width value will not be used in the calculation of the average.
GetWidthCaliperCount(InspectEdgeWidth, Without/With, Actual/Percent) | Returns either the number or percent of Calipers either containing or not containing defects (Without = 0 and With = 1; Actual = 0 and Percent = 1).
GetWidthCaliperExtremum(InspectEdgeWidth, Without/With, Smallest/Largest) | Returns the smallest or largest block of Calipers that either contain or do not contain defects (Without = 0 and With =1; Smallest = 0 and Largest = 1).
GetWidthCount(InspectEdgeWidth, Defects/Gaps) | Returns the total number of specified defects or gaps (Defects = 0, Gaps = 1).
GetWidthStdDev(InspectEdgeWidth) | Returns the standard deviation of the width values from the referenced InspectEdgeWidth function. If the edge pair has a gap or a defect that is outside of its minimum/maximum range, that width value will not be used in the calculation of the standard deviation.
GetWidthThresholdCount(InspectEdgeWidth, Above/Below, Actual/Percent) | Returns the number of defects that are either above or below the Width threshold (Above = 0 and Below = 1; Actual = 0 and Percent = 1).
GetWidthThresholdExtremum(InspectEdgeWidth, Above/Below, Smallest/Largest, Size/Area/Width) | Returns the Size, Area or Width value for the smallest or largest defect that is either above or below the Width threshold (Above = 0 and Below = 1; Smallest = 0 and Largest = 1; Size = 0, Area = 1 and Width = 2).
GetWidthTotalCaliperSize(InspectEdgeWidth, Without/With) | Returns the cumulative size of all the Calipers either with or without defects (Without = 0 and With =1).
GetWidthTotalDefectSize(InspectEdgeWidth, Above/Below) | Returns the cumulative size of all defects either above or below the Width threshold (Above = 0 and Below = 1).


LineFit

Each of the following functions references a LineFit data structure as the first parameter.

Function | Description
GetChi2(LineFit) | Returns the sum of the squares of the distances from the points to the line.
GetCol(LineFit, Index) | Returns the y-coordinate of the indexed point.
GetDistance(LineFit, Index) | Returns the distance between the indexed point and the line.
GetMaxDist(LineFit) | Returns the point that is farthest from the line.
GetMaxDistIndex(LineFit) | Returns the index of the point that is farthest from the line.
GetNPointUsed(LineFit) | Returns the number of points used to compute the line.
GetRow(LineFit, Index) | Returns the x-coordinate of the indexed point.


Line Scan

Note:
  • The Line Scan Vision Data Access functions are only supported on the In-Sight 5604 and In-Sight 9902L line scan vision systems.
  • Unless otherwise noted, the following functions must reference an Event to force the update of the Value.

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • TheImage data structurein cell A0, containing the AcquireImagefunction.For more information, see AcquireImage.
  • Acell containing an Event function.For more information, see Event.
  • Acell containing a Button function.For more information, see Button.
  • A cell containing a numeric value (any non-zero numeric Value will force the update).

Function | Description
GetImageBufferCount(Image) | Returns the number of buffers currently used.
GetImageBufferOverrunCount(Image) | Returns the number of acquisitions lost due to lack of image buffers.This count is reset when the visions system goes Online or Offline or after the LineScanStatReset function is executed.
GetLineScanAcqEncoderSteps(Image) | Returns the number of steps (or microseconds for a software encoder) currently acquired for any partially acquired image, or if no image is in progress returns zero.This statistic is most useful during hardware encoder setup when the system is moving slowly.
GetLineScanAcqLineCount(Image) | Returns the number of lines currently acquired for any partially acquired image; if no image acquisition is in progress, a zero is returned.This statistic is most useful during hardware encoder setup when the system is moving slowly.
GetLineScanAcqStepsPerSec(Image) | Returns the average number of steps-per-second over the last image acquisition period.For a software encoder, returns a fixed 1000000.0.
GetLineScanAcqTime(Image) | Returns the amount of time spent acquiring the last image, in milliseconds.This time is measured from the trigger signal start to the end of the last line.
GetLineScanAcqTimeoutCount(Image) | Returns the number of times the encoder acquisition timeout aborted an image.This count is reset when the sensor goes Online or Offline or after the LineScanStatReset function is executed.
GetLineScanEncoderSteps(Image) | Returns the number of steps (or microseconds for a software encoder) since the last Online or Offline or after the LineScanStatReset function is executed.This value resets over after about 4 billion steps.
GetLineScanExposureConflict(Image) | Returns one (1) if there is a conflict between the current Line Period and the current Exposure settings, otherwise returns zero (0).This applies to the software encoder only.For the hardware encoder this will always return zero.If this function returns one (1), line overrun is likely to occur.
GetLineScanFillLines(Image) | Returns the number of black-filled lines (lines which were clipped or lost to line overrun) in the image. Note: GetLineScanFillLines must reference the AcquireImage function in cell A0.
GetLineScanLineCount(Image) | Returns the number of lines acquired.This count is reset when the vision system goes Online or Offline or after the LineScanStatReset function is executed.
GetLineScanLineOverrunCount(Image) | Returns the number of lines that were missed due to excessive encoder rates.This count is reset when the sensor goes Online or Offline or after the LineScanStatReset function is executed.
LineScanStatReset(Event) | Resets any cumulative line scan statistics.This is automatically executed during an Online or Offline event.


OCRMax

Unless otherwise noted, each of the following functions references a OCRMax data structure for the first parameter. Char_Index (zero-based) determines which character is being indexed from the structure. For more information, see OCRMax.

Function Description

GetAngle(CharacterRegion)

Returns the angle of the character rectangle.

GetAngle(OCRMax, Char_Index)

Returns the angle of the character region.

GetChar(OCRMax, Char_Index0, [Char_Index1])

Returns the indexed character. When an optional Char_Index1 parameter is 1, returns the second highest scoring character.

GetCharConfused(OCRMax, Char_Index*)

* Optional

When the optional Char_Index is specified, returns the indexed character's confusion status; 1.0 if confused, otherwise 0.0. When a Char_Index is not specified, the function returns 1.0 if any of the characters within the string are in a confusion status, otherwise 0.0.

GetCharFailedValidation(OCRMax, Char_Index*)

* Optional

When the optional Char_Index is specified, returns the indexed character's validation status; 1.0 if validation failed, otherwise 0.0. When a Char_Index is not specified, the function returns 1.0 if any of the characters within the string failed validation, otherwise 0.0.

GetCharMisMatch(OCRMax, Char_Index*)

* Optional

When the optional Char_Index is specified, returns a character's mismatch status; 1.0 if characterized as a mismatch, otherwise 0.0. When a Char_Index is not specified, the function returns 1.0 if any of the characters within the string are mismatched, otherwise 0.0.

GetCharacterRegion(OCRMax, Char_Index, Show)

Returns a Region data structure for the indexed character. The region returned will be the smallest possible rectangular region that fully encompasses the character, as displayed in the graphic, below. If the characters being referenced do not undergo any skew (as the characters in the graphic below do), the displayed character region and the character rectangle will be the same.

GetCharsTrained(OCRMax)

Returns the trained characters, as a text string.

GetCol(CharacterRegion)

Returns the upper left-hand corner of the character rectangle.

GetCol(OCRMax, Char_Index, Corner_Index)

Returns the column coordinate of the specified corner of a displayed character region.

Note: If the characters do not exhibit any skew, the character rectangle and the displayed character region will be the same.

GetFontName(OCRMax)

Returns the name of the font in the referenced OCRMax function.

GetHigh(CharacterRegion)

Returns the height of the character rectangle.

Note: The character rectangle height and the character region height are the same.

GetHigh(OCRMax, Char_Index)

Returns the height of the character region.

Note: The character rectangle height and the character region height are the same.

GetIgnoredCharacters(OCRMax)

Returns the number of segmented characters that were ignored during fielding.

GetInternalSettings(OCRMax)

Returns the segmentation parameters from the referenced OCRMax function as a Settings data structure, which can be referenced by other OCRMax functions' External Settings parameter.

However, the Auto-Tune dialog will be disabled, unless the following is done:

To allow the Auto-Tune dialog to remain enabled while using the GetInternalSettings function, at least two OCRMax functions (OCRMax#1 and OCRMax#2) must be used.

  • The first OCRMax function (OCRMax#1) will have the External Settings parameter set to 0, thus allowing the Auto-Tune functionality to remain enabled. Then a GetInternalSettings function will be used, referencing OCRMax#1.
  • The second OCRMax function (OCRMax#2) will have the External Settings parameter reference the GetInternalSettings function. This will allow OCRMax#1 to be auto-tuned, and the results will be utilized by OCRMax#2.

For example:

  • Cell A1: OCRMax#1 with External Settings = 0
  • Cell B1: GetInternalSettings (references A1)
  • Cell C1: OCRMax#2 with External Settings = B1

GetNumCharTrainedInstances(OCRMax, Character)

Returns the number of trained instances of the character, e.g. "a" or "B" or "1".

GetPassed(OCRMax, Char_Index)

Returns the pass/fail status of the indexed character. If no Index parameter is specified, returns the pass/fail status of the entire string. The overall string passes only if all characters in the string pass.

GetScore(OCRMax, Char_Index0, [Char_Index1])

Returns the match score (0 to 100) for the indexed character. If the optional Index1 parameter is 1, returns the score of the second highest scoring character.

GetRow(CharacterRegion)

Returns the upper left corner of the character rectangle.

GetRow(OCRMax, Char_Index, Corner_Index)

Returns the row coordinate of the specified corner of a character region.

GetSize(OCRMax, Char_Index)

Returns the size of the indexed character, in pixels.

GetString(OCRMax)

Returns the text string read by the referenced OCRMax function.

GetWide(CharacterRegion)

Returns the width of the character rectangle.

Note: If skew is present, the width will be the character region plus the additional width required to compensate for the skew.

GetWide(OCRMax, Char_Index)

Returns the width of the character region.


Patterns

Each of the following functions references a Patterns data structure as the first parameter. Index (zero-based) determines which pattern is being indexed from the structure. For more information, see Pattern Match.

Function Description

GetAngle(Patterns, [Index])

Returns the angle value. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, FindPatMaxPatterns, FindPatterns and SortPatterns.

GetClutter(Patterns, [Index])

Returns the clutter score. Clutter is features that are found that are not part of the trained pattern.

This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, and FindPatMaxPatterns.

GetCol(Patterns, [Index])

Returns the column value. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, FindPatMaxPatterns, FindPatterns and SortPatterns.

GetColorScore(Patterns, [Index])

Returns the color score value (0 - 100). This function works only with the FindPatMaxRedLineColor function.

Note:

When the referenced TrainPatMaxRedLineColor's Match Colors parameter is set to No Matching, the GetColorScore function returns 100.000.

Match Colors Parameter Selection | Behavior
0 = All Colors (default) | Returns the computed score, assuming that the tool found a feature match.
1 = Selected Colors
2 = No Matching | Returns 100.000 (the tool does not compute the color match score).

GetContrast(Patterns, [Index])

Returns the contrast value. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, and FindPatMaxPatterns.

  • The contrast value for FindPatMaxRedLineColor and FindPatMaxRedLine are the relative measure of contrast change between features in the trained pattern versus match features in search image, in percentage. Therefore, if feature contrast is similar or high to pattern contrast, reported Contrast will be ~100. If the pattern contrast exceeds the feature contrast, the reported Contrast will be <100.
  • FindPatMaxPatterns contrast is the absolute image contrast of the search ROI, in greyscale level.

GetCoverage(Patterns, [Index])

Returns the coverage percentage. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, and FindPatMaxPatterns.

GetErrorCode(Patterns, [Index])

Returns the error code for a pattern. This function works with the Pattern Match functions (TrainPatMaxRedLineColor, FindPatMaxRedLineColor, TrainPatMaxRedLine, FindPatMaxRedLine, TrainPatMaxPattern, FindPatMaxPatterns, FindPatterns and SortPatterns).

Closed See error codes and corresponding information strings

Error Code | Corresponding Information String
00000008 | Operation timeout was exceeded.

PatMax

Error Code | Corresponding Information String
07010000 | Pattern may contain too few match features.
07010001 | Difficult to automatically set feature granularity; manually set Granularity.
07010100 | Pattern may be less accurate than expected because the training image appears blurry.
07010102 | The pattern results may be unstable because the coarse features have the same direction.
07010200 | Execution time may increase because of numerous fine features; manually set Granularity.
07010101 | Pattern may contain insufficient information to measure Angle or Scale reliably.
07020300 | Result(s) discarded due to low contrast.
07020301 | Result(s) discarded due to proximity to more accurate results.
07020302 | Result(s) discarded due to excess clutter.
07020303 | Trained pattern contains too few features for current parameter settings.
07030000 | No error information.

PatMax RedLine (both Greyscale and Color)

Error Code | Corresponding Information String
07020306 | Greyscale input image not supported.
07020307 | No match color trained.
07010100 | The size of the referenced Color match mask image does not match the size of the input region.
07020308 | Cannot train the input image.
07020309 | Execution time may increase because of numerous fine features; manually set Granularity.
07020310 | Cannot train a color pattern

GetFitError(Patterns, [Index])

Returns the fit error score. This function works only with the FindPatMaxPatterns function.

GetGranCoarse(Patterns)

Returns the coarse granularity value. This function works with the following functions: TrainPatMaxRedLineColor, TrainPatMaxRedLine, and TrainPatMaxPattern.

GetGranFine(Patterns)

Returns the fine granularity value. This function works with the following functions: TrainPatMaxRedLineColor, TrainPatMaxRedLine, and TrainPatMaxPattern.

GetInfoCode(Patterns, [Index])

Returns a diagnostic code for information strings. This function works with the following functions: TrainPatMaxPattern and FindPatMaxPatterns.

Closed See diagnostic codes and corresponding information strings

Note: The tool uses the GetInfoString function to insert information strings are inserted into the spreadsheet.

TrainPatMaxPattern

Diagnostic Code | Corresponding Information String
07010000 | Pattern may contain too few match features.
07010001 | Difficult to automatically set feature granularity; manually set Granularity.
07010100 | Pattern may be less accurate than expected because the training image appears blurry.
07010102 | The pattern results may be unstable because the coarse features have the same direction.
07010200 | Execution time may increase because of numerous fine features; manually set Granularity.
07010101 | Pattern may contain insufficient information to measure Angle or Scale reliably.
07030000 | No error information.

FindPatMaxPatterns

Diagnostic Code | Corresponding Information String
07020300 | [Value] result(s) discarded due to low contrast.
07020301 | [Value] result(s) discarded due proximity to more accurate results.
07020302 | [Value] result(s) discarded due to excess clutter.
07020303 | Trained pattern contains too few features for current parameter settings.

GetInfoString(Patterns, [Index])

Returns the information string. This function works with the following functions: TrainPatMaxPattern and FindPatMaxPatterns.

GetNFound(Patterns)

Returns the number of pattern matches found. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, FindPatMaxPatterns, FindPatterns and SortPatterns.

GetOutsideArea(Patterns, [Index])

Returns the proportion (on a scale of 0 to 1, where 0 equals completely within and 1 equals 100% outside) of the matching pattern's area found outside the search region. This function works only with the FindPatMaxPatterns function.

GetOutsideFeatures(Patterns, [Index])

Returns the proportion (on a scale of 0 to 1, where 0 equals completely within and 1 equals 100% outside) of the matching pattern's features found outside the search region. This function works only with the FindPatMaxPatterns function.

GetRow(Patterns, [Index])

Returns the row value. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, FindPatMaxPatterns, FindPatterns and SortPatterns.

GetScale(Patterns, [Index])

Returns the size of the match (compared to the trained pattern) as a percentage. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, FindPatMaxPatterns, FindPatterns and SortPatterns.

GetScaleX(Patterns, [Index])

Returns the size of the match in the X-direction (compared to the trained pattern) as a percentage. This function works only with the FindPatMaxPatterns function.

GetScaleY(Patterns, [Index])

Returns the size of the match in the Y-direction (compared to the trained pattern) as a percentage. This function works only with the FindPatMaxPatterns function.

GetScore(Patterns, [Index])

Returns the pattern response score value. This function works with the following functions: FindPatMaxRedLineColor, FindPatMaxRedLine, FindPatMaxPatterns, FindPatterns and SortPatterns.

GetTrained(Patterns)

Returns 1 if the tool successfully learned a pattern. Returns 0 if the tool cannot train a pattern from a Patterns structure. This function works with the following functions: TrainPatMaxPattern, TrainPatMaxRedLine, TrainPatMaxRedLineColor and FindPatterns.


Get

Returns the properties of arrays and/or objects output by either a Script function, or another Get function. For more information, see Script.

Note: This function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

Get Overview

The Get function is used to access properties of objects returned by a Script function. It requires a minimum of two arguments: a reference to a Script function, or another Get function that returns an Object or Array; and either a string that denotes the property of an Object, or a dot-separated path to a property of a sub-Object. Optionally, a third argument can be specified to access a zero-based array index, when an array is referenced.

The returned value of the Get function is the value of the property (or indexed array element), and can be any of the following types:

  • A number
  • true (1) or false (0)
  • A string
  • A Binary data structure
  • A Blobs, Edges, Hist, IDMax, or Patterns data structure
  • A shape object. For more information, see Shape Objects.
  • An Object or Array data structure
Note: The Get function does not support returning null or undefined.

Get Example

For this example, a Script function in cell B3 has a run method that returns an object:

Tool.prototype.run = function(n) {
  this.updateStats(n);
  return {
    total: this._total;
    stats: {
      avg: this._avg,
      range: {
        max: this._max,
        min: this._min
      },
      values: this._valueArray
    }
   };
};

The following Get functions would return simple numbers (assuming the returned values are numeric):

  • Get(B3, "total")
  • Get(B3, "stats.avg")
  • Get(B3, "stats.range.max")
  • Get(B3, "stats.range.min")

The following Get function would return the "range" sub-object, which could be passed into another Script or Get function:

  • Get(B3, "stats.range")

The following Get function would return element 37 from the values array:

  • Get(B3, "stats.values", 37)

Get Inputs

Syntax: Get(Script/Get,Object Property and or Array,[Array Index])

Parameter | Description
Script/Get | Specifies a reference to a Script function or another Get function that returns an Object or Array data structure.
Object Property and/or Array | Specifies a reference to a property of an Object data structure, either as a string (the name of the property) or a dot-separated path to a property of a sub-object; or an Array data structure.
[Array Index] | Specifies an optional argument to an index of an array when an Array data structure is referenced.

Get Outputs

Returns

The function will return the value of the property (or indexed array element), and may return any of the following types:

  • A number
  • true (1) or false (0)
  • A string
  • A Binary data structure
  • A Blobs, Edges, Hist, IDMax, or Patterns data structure
  • A shape object
  • An Object or Array data structure
Note: The function will not return the following from a Script function: null, undefined or no return statement (which is treated the same as an empty object).

For more information, see Scripting.


Structures

The Structure argument of the following functions must be a reference to the data structure returned by an Annulus, Circle, Cross, Fixture, Line, Mask, Point or Region function. The valid structures for each function are indicated in the description.

Function | Description
GetAngle(Structure, Index) | Returns the Angle value from the indexed Cross, Fixture or Region data structure.
GetCol(Structure, Index1, Index2) | Returns the Col value from the indexed Annulus, Circle, Cross, Fixture, Line, Point or Region structure.
GetCurve(Structure) | Returns the Curve value from the indexed Region structure.
GetHigh(Structure) | Returns the High value from the indexed Cross or Region structure.
GetRadius(Structure, Index) | Returns the Radius value from the indexed Annulus or Circle structure.
GetRow(Structure, Index1, Index2) | Returns the Row value from the indexed Annulus, Circle, Cross, Fixture, Line, Point or Region structure.
GetSegmentArea(Mask, Index) | Returns the area of the indexed segment from a Mask structure, or segment 0 if no index is specified.
GetSegmentX(Mask, Index) | Returns the X coordinate of the indexed segment from a Mask structure, or segment 0 if no index is specified.
GetSegmentY(Mask, Index) | Returns the Y coordinate of the indexed segment from a Mask structure, or segment 0 if no index is specified.
GetWide(Structure) | Returns the Wide value from the indexed Cross or Region structure.


Text (OCV/OCR)

Unless otherwise noted, each of the following functions references a Text data structure for the first parameter. Index (zero-based) determines which OCV/OCR character is being indexed from the structure.

Note:
  • The TrainFont, ReadText and VerifyText functions are only available on In-Sight vision systems using In-Sight firmware 4.x.x, and are not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the OCRMax function be used instead of the ReadText, TrainFont and VerifyText functions, which are legacy functions. The OCRMax function has enhanced performance capabilities.

Function

Description

GetAngle(Text)

Returns the angle between the text string and the horizontal axis of the Image data structure. GetAngle will ignore an Index parameter.

GetChar(Text, Index0, [Index1])

Returns the indexed character. When an optional Index1 parameter is 1, returns the second highest scoring character. For the VerifyText function, the second highest scoring character will be returned only if the difference in match scores between the two characters is less than 10%. For more information, see VerifyText.

GetCol(Text, Index)

Returns the column coordinate (in pixels) of the indexed character.

GetContrast(Text, Index)

Returns the contrast between the foreground and background (in grey levels, 0 to 255) of the indexed character. If no indexed character is specified, returns the contrast for the first character in the string.

GetErrorCode(Text, Index)

Returns a diagnostic code for each information string.

Closed See diagnostic codes and corresponding information strings

Note: Error strings are inserted into the spreadsheet using the GetErrorString function. For more information, see GetErrorString(IDCode).
Code | Corresponding String
00000011 | Invalid Image Cell reference.
00400000 | Invalid Font Cell reference.
00400002 | Verification String can not be longer than 32 characters.
00400003 | Verification String is blank.
00400004 | Verification String contains untrained characters.

GetErrorString(Text, Index)

Returns an error string.

Closed See error strings

Note: Error codes are inserted into the spreadsheet using the GetErrorCode function. For more information, see GetErrorCode(IDCode).
Code | Corresponding String
00000011 | Invalid Image Cell reference.
00400000 | Invalid Font Cell reference.
00400002 | Verification String can not be longer than 32 characters.
00400003 | Verification String is blank.
00400004 | Verification String contains untrained characters.

GetHigh(Text, Index)

Returns the height (in pixels) of the indexed character.

GetPassed(Text, Index)

Returns the pass/fail status of the indexed character. If no Index parameter is specified, returns the pass/fail status of the entire string. The overall string passes only if all characters in the string pass.

GetRow(Text, Index)

Returns the row coordinate (in pixels) of the indexed character.

GetScore(Text, Index0, [Index1])

Returns the match score (0 to 100) for the indexed character. If the optional Index1 parameter is 1, returns the score of the second highest scoring character. For the VerifyText function, the match score of the second highest scoring character will be returned only if the difference in match scores between the two characters is less than 10%. For more information, see VerifyText.

GetString(Text)

Returns the text string.

GetWide(Text, Index)

Returns the width (in pixels) of the indexed character.


Time/Timer

All returned values are from a referenced function or cell.

Function Description

GetAllTime(Image)

Returns the time, in milliseconds, for the image to be acquired and the job to execute, or #ERR if the input value is invalid.

Note:
  • This argument must reference cell A0, the cell containing the Image data structure returned by the AcquireImage function. For more information, see AcquireImage.
  • The returned GetAllTime value does not include the sensor filmstrip execution time. For more information, see Sensor Filmstrip: EasyBuilder View.
  • The GetAllTime function and the status bar calculate time differently than the Profile Job dialog. The Profile Job dialog also accounts for the construction of result graphics.For more information, see Profile Job Dialog.
  • If this function is used in a formula, different value is returned depending on the cell location. For example, when GetAllTime(A0) is 80, 1*GetAllTime(A0) should also be 80. However, if 1*GetAllTime(A0) is on the top of the job, it returns almost the same value as GetTime(A0), which does not include other tool's execution time. If 1*GetAllTime(A0) is at the end of the job, it will include all job execution time. To return the correct value, create a separate cell just for GetAllTime(A0), and use a cell reference for it in the formula. For example, if you create a GetAllTime(A0) in cell B2, 1*B2 will return the correct value regardless of the cell location.
  • When the HMI Settings dialog's Maximum View Connections setting is set to 2 or more, the GetAllTime value returned by vision systems using In-Sight firmware 5.x.x will be longer than vision systems using In-Sight firmware 4.x.x. In addition to image acquisition and job execution time, the GetAllTime value returned by vision systems running In-Sight firmware 5.x.x adds multiple view update time to the final value, while on vision systems running In-Sight firmware 4.x.x this value is not included. For more information, see HMI Settings Dialog.

GetElapsedTime(Image)

Returns the time, in milliseconds, between two consecutive image acquisitions or #ERR if the input value is invalid.

Note: This argument must reference cell A0, the cell containing the Image data structure returned by the AcquireImage function. For more information, see AcquireImage.

GetExposureTimestamp(Image)

Returns a Time data structure, which can be used to send the exposure timestamp (a record of when an In-Sight vision system begins its exposure when triggered to acquire an image).

Note:
  • This argument must reference cell A0, the cell containing the Image data structure returned by the AcquireImage function. For more information, see AcquireImage.
  • The timestamp value is accurate to 200 microseconds of the actual exposure time on all supported In-Sight vision systems.

GetSystemTimeOffset(Time)

Returns the extracted system time offset value from a Time data structure.

Note: The system time offset is only valid when PTP is enabled. For more information about setting up and configuring In-Sight vision systems for use with PTP, see Configure Time Synchronization.
GetTime(Cell1, [Cell2, ...])

Returns the time, in milliseconds, for a variable-length list of cells to execute or #ERR if the input value is invalid. If multiple cells are selected, the sum of all execution times is returned.

GetTimeValue(Time)

Converts a Time data structure into a time value. The function is used to write a 64-bit representation of the time, in microseconds, to a PLC via the FormatOutputBuffer function. For more information, see FormatOutputBuffer.

Note: This function is only valid when PTP is enabled. For more information about setting up and configuring In-Sight vision systems for use with PTP, see Configure Time Synchronization.


White Balance

Note: The following functions must reference an Event to force the update of the Value.
Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • TheImage data structurein cell A0, containing the AcquireImagefunction.For more information, see AcquireImage.
  • Acell containing an Event function.For more information, see Event.
  • Acell containing a Button function.For more information, see Button.
  • A cell containing a numeric value (any non-zero numeric Value will force the update).

Function | Description
GetBlueWhiteBalance(Event) | Returns the current WhiteBalance offset coefficient (0 to 255) for the Blue component.
GetGreenWhiteBalance(Event) | Returns the current WhiteBalance offset coefficient (0 to 255) for the Green component.
GetRedWhiteBalance(Event) | Returns the current WhiteBalance offset coefficient (0 to 255) for the Red component.
SetBlueWhiteBalance(Event) | Specifies the Value (0 to 255) of the WhiteBalance offset coefficient for the Blue component.
SetGreenWhiteBalance(Event) | Specifies the Value (0 to 255) of the WhiteBalance offset coefficient for the Green component.
SetRedWhiteBalance(Event) | Specifies the Value (0 to 255) of the WhiteBalance offset coefficient for the Red component.


Structures Functions

Structures functions combine values from spreadsheet cells to create graphics, fixtures, masks and regions that can be easily referenced by the input parameters of other functions. Adjusting the position and shape of structures is facilitated through Interactive Graphics Mode and property sheets. For more information, see Interactive Graphics Mode.

Annulus

Circle

Cross

Fixture

Line

Mask

Point

Region


Annulus

Creates a fixtured Annulus structure.

Annulus Inputs

Syntax: Annulus(Fixture.Row,Fixture.Column,Fixture.Theta,Annulus.X,Annulus.Y,Annulus.Inner Radius,Annulus.Outer Radius,Show)

Note: The Fixture and Annulus parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Fixture

Specifies the image coordinate system in which the annulus is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Annulus

Specifies the size and position of the annulus.

X | The x-offset, in fixture coordinates.
Y | The y-offset, in fixture coordinates.
Inner Radius | The inner radius.
Outer Radius | The outer radius.

Show

Specifies the display mode for the annulus graphic overlay on the image.

0 = hide all | The annulus structure graphic will not be displayed unless the cell containing the Annulus function is highlighted in the spreadsheet.
2 = input graphics only | The annulus structure graphic will be displayed at all times.

Annulus Outputs

Returns | An Annulus data structure, or #ERR if any of the input parameters are invalid.
Results | When Annulus is initially inserted into a cell, a result table is created in the spreadsheet.

Annulus Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Annulus) | The row offset of the center of the annulus, in image coordinates.
Col | GetCol(Annulus) | The column offset of the center of the annulus, in image coordinates.
Inner Radius | GetRadius(Annulus, 0) | The inner radius of the indexed annulus.
Outer Radius | GetRadius(Annulus, 1) | The outer radius of the indexed annulus.


Circle

Creates a fixtured Circle structure.

Circle Inputs

Syntax: Circle(Fixture.Row,Fixture.Column,Fixture.Theta,Circle.X,Circle.Y,Circle.Radius,Show)

Note: The Fixture and Circle parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Fixture

Specifies the image coordinate system in which the circle is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Circle

Specifies the size and position of the circle, in fixture coordinates.

X | The x-offset of the circle.
Y | The y-offset of the circle.
Radius | The radius of the circle.

Show

Specifies the display mode for the circle graphical overlay on the image.

0 = hide all (default) | The circle structure will not be displayed unless the cell containing the Circle function is highlighted in the spreadsheet.
2 = input graphics only | The circle structure will be displayed at all times.

Circle Outputs

Returns | A Circle data structure, or #ERR if any of the input parameters are invalid.
Results | When Circle is initially inserted into a cell, a result table is created in the spreadsheet.

Circle Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Circle) | The row offset of the center of the circle, in image coordinates.
Col | GetCol(Circle) | The column offset of the center of the circle, in image coordinates.
Radius | GetRadius(Circle) | The radius of the circle.


Cross

Creates a fixtured Cross structure.

Cross Inputs

Syntax: Cross(Fixture.Row,Fixture.Column,Fixture.Theta,Cross.X,Cross.Y,Cross.Angle,Cross.High,Cross.Wide,Show)

Parameter Description

Fixture

Specifies the image coordinate system in which the cross is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Cross

Specifies the size and position of the cross, in fixture coordinates.

X | The x-offset of the cross.
Y | The y-offset of the cross.
Angle | The orientation of the cross.
High | The dimension of the x-axis of the cross.
Wide | The dimension of the y-axis of the cross.
Note: The Fixture and Cross parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.

Show

Specifies the display mode for the cross graphical overlay on the image.

0 = hide all (default) | The cross structure will not be displayed unless the cell containing the Cross function is highlighted in the spreadsheet.
2 = input graphics only | The cross graphic will be displayed at all times.

Cross Outputs

Returns | A Cross data structure, or #ERR if any of the input parameters are invalid.
Results | When Cross is initially inserted into a cell, a result table is created in the spreadsheet.

Cross Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Cross) | Returns the row offset of the center of the cross, in image coordinates.
Col | GetCol(Cross) | Returns the column offset of the center of the cross, in image coordinates.
Angle | GetAngle(Cross) | Returns the orientation of the cross.
High | GetHigh(Cross) | Returns the dimension of the x-axis.
Wide | GetWide(Cross) | Returns the dimension of the y-axis.


Fixture

Creates a Fixture structure.

Fixture Inputs

Fixture(Fixture.Row,Fixture.Column,Fixture.Theta,Show)

Parameter Description.

Fixture

Specifies the image coordinate system in which the fixture is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Show

Specifies the display mode for the Fixture point graphical overlay on the image.

0 = hide all (default) | The fixture point graphic will not be displayed unless the cell containing the Fixture function is highlighted in the spreadsheet.
2 = input graphics only | The fixture point graphic will be displayed at all times.

Fixture Outputs

Returns | A Fixture data structure, or #ERR if any of the input parameters are invalid.
Results | When Fixture is initially inserted into a cell, a result table is created in the spreadsheet.

Fixture Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Fixture) | Returns the row offset of the fixture, in image coordinates.
Col | GetCol(Fixture) | Returns the column offset of the fixture, in image coordinates.
Angle | GetAngle(Fixture) | Returns the orientation angle, in image coordinates.


Line

Creates a fixtured Line structure.

Line Inputs

Syntax: Line(Fixture.Row,Fixture.Column,Fixture.Theta,Line.X 0,Line.Y 0,Line.X 1,Line.Y 1,Show)

Note: The Fixture and Line parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Fixture

Specifies the image coordinate system in which the line is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Line

Specifies the endpoints of the line.

X 0 | The x-offset of the first endpoint.
Y 0 | The y-offset of the first endpoint.
X 1 | The x-offset of the second endpoint.
Y 1 | The y-offset of the second endpoint.
Show

Specifies the display mode for the Line graphic overlay on the image.

0 = hide all (default) | The line structure will not be displayed unless the cell containing the Line function is highlighted in the spreadsheet.
2 = input graphics only | The line structure will be displayed at all times.

Line Outputs

Returns | A Line data structure, or #ERR if any of the input parameters are invalid.
Results | When Line is initially inserted into a cell, a result table is created in the spreadsheet.

Line Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row0 | GetRow(Line, 0) | The row offset of the first endpoint, in image coordinates.
Col0 | GetCol(Line, 0) | The column offset of the first endpoint, in image coordinates.
Row1 | GetRow(Line, 1) | The row offset of the second endpoint, in image coordinates.
Col1 | GetCol(Line, 1) | The column offset of the second endpoint, in image coordinates.


Mask

The Mask function is used to create an irregularly shaped binary image mask, which is used to highlight certain areas of the image ("care pixels" which are assigned a value of 255), while also excluding other areas from being inspected ("don't care pixels" which are assigned a value of 0). This function can be used as an input with the SurfaceFlaw function, as well as flexed by the FlexFlawModel function of the Flaw Detection functions. For more information, see SurfaceFlaw, FlexFlawModel, or Flaw Detection.

Overview

The image mask is used to remove certain features from the inspection, while highlighting other areas. The mask is created through an internal two-step process. The first step involves edge detection and segmentation, during which the input image is smoothed based on the Smoothing Factor parameter setting. Using the smoothed image, an edge magnitude image is internally constructed.

Note: For color images, the edge magnitude image is computed based on all three color channels (R,G,B).

Next, the image is segmented based upon edge transitions, using blob analysis. This is performed on the edge magnitude image, with dark blobs being extracted into segments, which are indexed and labeled. The Mask Generation parameters, Maximum Small Hole Fill Size, Median Kernel Size and Erode Mask Count, can be used to fill holes, smooth borders and/or remove narrow strips in the image mask, respectively. The Median Kernel Size parameter is particularly useful in helping to smooth edges and remove stripes.

The second step of the process involves selecting the edges or segments that will be used to generate the image mask. By default, edges are used (the Mask Method parameter is set to Edge Mask by default) to generate an image mask based on edge magnitude. With this image mask, only edge pixels are masked, and all other pixels are to be shown. This type of mask is helpful when attempting to exclude things like labels, text or logos.

Segments may also be used, by setting the Mask Method parameter to either Largest Segment or Selected Segments. The background is indexed as 0, and the next largest segment is 1, with the rest of the segments being sorted based on their size (they are color-coded and indexed in the image). This type of mask is helpful when attempting to block out the background, or other larger areas in the image.

When setting up the function, the Display Image parameter can be used to display the segments. The segments will be displayed with a numerical index and color-coded (black pixels are not a part of a segment, and white pixels are part of the largest segment).

Once the mask has been properly configured, it will be trained and retain the mask internally as a model. While the function's property sheet is open, if any parameter is changed, the mask will be retrained to the new parameter settings.

Note:
  • If the part the mask is covering will exhibit motion from image to image, ensure that the mask has a fixture.
  • If any of the following parameters are placed in the spreadsheet as absolute references to allow for external control of the parameters and the parameters are changed, they will automatically cause the mask model to be retrained: Mask Method, Smoothing Factor, Minimum Edge Contrast, Minimum Segment Size, Maximum Small Hole Fill Size, Erode Mask Count, Invert, Median Kernel Size and/or Segment(s). For more information, see Cell References - Relative/Absolute.
  • If the Region parameter has been placed in the spreadsheet as an absolute references to allow for external control of the parameter, and the parameter is changed, the Train Mask button should be pressed to retrain the mask model. If the Region parameter is modified while in the function's property sheet, the mask model will automatically be retrained.

Mask Inputs

Syntax: Mask(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Scale,External Region,Flex Flaw Reference,Segmentation.Smoothing Factor,Segmentation.Minimum Edge Contrast,Segmentation.Minimum Segment Area,Mask Generation.Mask Method,Mask Generation.Segment(s),Mask Generation.Maximum Small Hole Fill Size,Mask Generation.Median Kernel Size,Mask Generation.Erode Mask Count,Mask Generation.Invert,Mask Generation.Train Mask,Timeout,Display Image,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Image

This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is A0, which contains the Image data structure returned by AcquireImage.

Fixture

Defines the Region (ROI) relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a fixture ensures that if the fixture is rotated or translated, the ROI will be rotated or translated in relation to the fixture. For more information, see Fixture or Vision Tools.

Note: The default setting is (0,0,0), the top leftmost corner of the image.
Row | Specifies the row offset, in image coordinates.
Column | Specifies the column offset, in image coordinates.
Theta | Specifies the orientation, in image coordinates.

Region

Also known as the region of interest or ROI, specifies the region of the image that undergoes image processing; creates a rectangular image region that can be transformed and rotated. With this parameter selected, clicking the Maximize Region button will automatically stretch the region to cover the entire image.

Note: If the Region parameter has been placed in the spreadsheet as an absolute reference to allow for external control of the parameter, and the parameter is changed, the Train Mask button should be pressed to retrain the mask model. If the Region parameter is modified while in the function's property sheet, the mask model will automatically be retrained.
X | Specifies the x-offset of the origin, in fixture coordinates.
Y | Specifies the y-offset of the origin, in fixture coordinates.
High | Specifies the dimension along the region's x-axis.
Wide | Specifies the dimension along the region's y-axis.
Angle | Specifies the orientation, in fixture coordinates.
Curve | Specifies the angular deviation between the region's x-axis and the opposing boundary line.

Scale

Specifies the size (80 to 120; default = 100 )of the mask, relative to the trained fixture size, as a percentage.

Note: To view the effect of changing the Scale parameter, drag-and-drop the control to the spreadsheet. This will create an EditInt that is automatically classified as an absolute reference to the Scale parameter. Modifying the value of the Scale parameter while in the function's property sheet will automatically re-train the mask at the new scale value, which obscures the effect of the parameter change. For more information, see EditInt.

External Region

Specifies a reference to a spreadsheet cell that contains a Controls function. When this parameter is used, the Mask function will ignore the Region and Fixture settings and inspects the image area specified by the referenced region. For more information, see Controls Functions.

Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.

Flex Flaw Reference

Specifies a reference to a cell containing a FlexFlawModel data structure containing the Flex algorithm modified model data, output by a FlexFlawModel function. This allows the mask to be flexed by the FlexFlawModel function's Flex algorithms, to account for process variations.

Segmentation

Specifies how the function will perform the segmentation analysis.

Smoothing Factor

Specifies the amount of smoothing (0 to 31; default = 1) to apply before performing edge detection. Smoothing is applied to average the greyscale values and diminish the affect of sharp transitions.

Minimum Edge Contrast

Specifies the minimum contrast (1 to 100; default = 10) used to detect edges.

Note: This parameter is only enabled if the Mask Method parameter is set to Edge Mask.

Minimum Segment Area

Specifies the minimum area (1 to 50000; default = 1000), in pixels, a segment must be in order to be extracted. This parameter is helpful in removing noise from the segments.

Note: This parameter is used when the Mask Method parameter is set to either Largest Segment or Selected Segments.

Mask Generation

Specifies how the function will construct the mask.

Mask Method

Specifies what will be the basis for building the mask: edges or segments.

0 = Largest Segment | Specifies that the largest segment should be used to generate the mask.
1 = Edge Mask (default) | Specifies that edge magnitude should be used to generate the mask. Use the Minimum Edge Contrast to determine which edges are used.
2 = Selected Segments | Specifies that user-selected segments will be used to generate the mask. Use the Segment(s) parameter to specify which segments will be used.

Segment(s)

Specifies which specific segments should be used to generate the mask. Select the specific segments by entering a comma-delimited string (e.g. 1,2,5,7).

Note:
  • The Mask Method parameter must be set to Selected Segments to enable this parameter.
  • When the Display Image parameter is set to Segmented Image, a string containing the number of segments found will be displayed beside the Information icon. The first number displayed in the list is the selected segment, followed by the found and available segments.

Maximum Small Hole Fill Size

Specifies the maximum size (0 to 10000; default = 0) a small hole must be in order to be filled (not counted as a hole).

Note: This parameter should be set to 0 when the Mask Method parameter is set to Edge Mask.

Median Kernel Size

Specifies the median kernel size (0 to 10; default = 0) which will be used to smooth the edges in the mask image. The kernel is constructed based on (2N + 1), such that the kernel will always be constructed from an odd value. Setting the parameter to 0 specifies that the kernel will not be used.

Erode Mask Count

Specifies the number of times (-100 to 100; default = 0) the generated image will be eroded or dilated. This value can be either negative or positive; negative values dilate the image. Setting the parameter to 0 specifies that no erosion or dilation will occur.

Invert

Specifies whether or not to invert the mask, i.e. white for black, black for white.

0 = Off (default) | The mask will not be inverted.
1 = On | The mask will be inverted.

Train Mask

Specifies that the mask will be trained to the currently configured parameter settings.

Note: This parameter may be inserted into the spreadsheet to allow external control of the re-training operation. Placing the parameter in the spreadsheet allows an external device, through the use of a Custom View, to re-train the mask during run-time. For more information, see Custom View Settings Dialog.

Timeout

Specifies the amount of time, in milliseconds (0 to 30000; default = 0), that the function will attempt to calculate the mask before execution is halted and #ERR is returned.

Display Image

Specifies the type of output image the function will generate.

0 = Input Image | The input image will be displayed.
1 = Edge Image | The edge magnitude image will be displayed.
2 = Segmented Image | The color-coded and numerically indexed segment image will be displayed.
3 = Mask Image (default) | The binary mask image, after accounting for the fixture input, which is created after the segmentation and mask generation process. Pixel values of 255 = Care About Pixels; pixel values of 0 = Don't Care About Pixels.

Show

Specifies which graphical overlays are displayed on top of the image.

0 = hide all (default) | The input image region will be hidden, except when the cell containing the Mask function is highlighted in the spreadsheet.
1 = result graphics only | The processed image will be displayed at all times.
2 = input and result graphics only | Both the input image region and the mask will be displayed at all times.

Mask Outputs

Returns

A Mask data structure containing a binary mask, or #ERR if any of the input parameters are invalid.

Note:
  • The image is not saved in the function's data structure.
  • The Mask function may produce an incorrect output mask, and not result in the function returning a #ERR condition, under the following condition: First, the mask has been trained using the Mask Method of Selected Segments, using specific segments. Next, the Region is moved to an area of the image that does not contain the selected segments. Once the function is re-trained, the function will display the new Region location and the formerly trained mask. The function will be in an error state, but it will not return a #ERR. To resolve the issue, re-open the function's property sheet and specify segments that exist in the new region, and re-train the mask.

For more information, see Structures.


Point

Creates a fixtured Point structure.

Point Inputs

Syntax: Point(Fixture.Row,Fixture.Column,Fixture.Theta,Point.X,Point.Y,Show)

Parameter Description

Fixture

Specifies the image coordinate system in which the point is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Point

Specifies the location of the point, in fixture coordinates.

X | The x-offset of the cross.
Y | The y-offset of the cross.
Note: The Fixture and Point parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.

Show

Specifies the display mode for the Point overlay graphic on the image.

0 = hide all (default) | The point structure will be hidden unless the cell containing the Point function is highlighted in the spreadsheet.
2 = input graphics only | The point structure will be displayed at all times.

Point Outputs

Returns | A Point data structure, or #ERR if any of the input parameters are invalid.
Results | When Point is initially inserted into a cell, a result table is created in the spreadsheet.

Point Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Row | GetRow(Point) | The row offset of the point, in image coordinates.
Col | GetCol(Point) | The column offset of the point, in image coordinates.

For more information, see Structures, Interactive Graphics Mode, or Property Sheet.


Region

Creates a fixtured Region structure.

Region Inputs

Region(Fixture.Row,Fixture.Column,Fixture.Theta,Region.X,Region.Y,Region.High,Region.Wide,Region.Angle,Region.Curve,Show)

Note: The Fixture and Region parameters must be defined within the bounds of the image; otherwise, the function will return #ERR.
Parameter Description

Fixture

Specifies the image coordinate system in which the region is defined.

Row | The row offset.
Column | The column offset.
Theta | The orientation.

Region

Specifies the position, size, rotation, and curvature (if an annular sector, shaped like a circle or ring). Regions are always defined within the coordinate system of a Fixture. For more information, see Fixture.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
High | The dimension along the region's x-axis.
Wide | The dimension along the region's y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Show

Specifies the display mode for the Region graphic overlay on the image.

0 = hide all (default) | The region structure graphic will be hidden unless the cell containing the Region function is highlighted in the spreadsheet.
2 = input graphics only | The region structure graphic is displayed at all times.

Region Outputs

Returns | A Region data structure, or #ERR if any of the input parameters are invalid.
Results | When Region is initially inserted into a cell, a result table is created in the spreadsheet.

Region Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Structures.

Row | GetRow(Region) | The row offset of the region's origin, in image coordinates.
Col | GetCol(Region) | The column offset of the region's origin, in image coordinates.
High | GetHigh(Region) | The dimension along the region's x-axis.
Wide | GetWide(Region) | The dimension along the region's y-axis.
Angle | GetAngle(Region) | The orientation, in image coordinates.
Curve | GetCurve(Region) | The angular deviation between the region's x-axis and the opposing boundary line.


Scripting

The In-Sight Script functions are used to create scripts, which store JavaScript source code inside a cell, allowing custom-designed source code to be a part of a job.

  • Script: Create and edit JavaScript code to run user-written source code (created in the Edit Script dialog).
  • Get: Vision Data Access function that accesses the properties of arrays and/or objects returned by a Script function.
  • Script Function JavaScript Source Code and API Reference: Overview of guidelines to follow when writing JavaScript source code for a Script function. For more information, see Script Function JavaScript Source Code and API Reference.
Note:
  • These functions are only available on the In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The Script function requires a knowledge of basic programming principles. The information provided in this overview topic is intended for users already familiar with the basic principles of programming. For more in-depth information about the JavaScript programming language, please consult the following (Internet access is required):
    • Mozilla JavaScript Guide
    • Mozilla JavaScript Language Reference
    • JavaScript: The Definitive Guide by David Flanagan

Scripting Overview

Script

Script Function JavaScript Source Code and API Reference


Scripting Overview

In-Sight scripting utilizes JavaScript, a dynamic computer programming language. Scripting provides the ability to create repetitive processing routines, string parsing and formatting operations, background event processing (scripts that run separate from the inspection), custom graphics, and shared JavaScript modules (stored on the file system).

Provided within this overview are brief sections detailing the important aspects of the JavaScript language for use with In-Sight applications.

Basic Lexical Structure

Comments

Variables

Objects and Arrays

Built-in JavaScript Classes

Functions

Expressions and Operators

Type Conversion

if Statement

Looping

Exceptions

Regular Expressions

In-Sight Explorer JavaScript Samples


Basic Lexical Structure

The implementation of JavaScript within In-Sight Explorer follows version 5 of the open standard approved by the European Computer Manufacturer’s Assocation, also known as ECMAScript 5 (ECMA5). It utilizes the Unicode 3 (or later) character set (UTF-8), and is similar to C, C++, C# and Java syntax in the following ways:

  • The language is case-sensitive, which requires language keywords, variables, function names and other identifiers use a consistent capitalization of letters.
  • Identifiers are used to name variables and functions, and must begin with a letter, an underscore (_) or a dollar sign ($). Digits are not allowed at the beginning.
  • Compound statements are contained within curly braces ({}).
  • Whitespace is ignored, thus allowing cleanly formatted code that is easy to read and understand.
  • Semicolons (;) separate statements, and while these are optional at the end of a line, they are highly recommended to explicitly demarcate the end of a statement. If statements are on separate lines, they can be omitted; however, JavaScript always interprets line breaks as a semicolon, so never insert a line break between return, break or continue and the expression that follows those keywords.


Comments

There are two styles of denoting comments in JavaScript: two forward slashes (//) at the end of a line denote comments, and any characters within /* and */ are also treated as comments (/* JavaScript comments */).

The following illustrates the two styles of denoting comments:

/* JavaScript comments */
var x; // Look like Java, C# and
       // C++ comments
/*
* And they can occupy
* multiple lines.
*/


Variables

Variables are used to define a symbolic name for an object or a value, and allows it to be referred to by its symbolic name. Within JavaScript, there are two types: primitive types and object types. Every variable refers to a primitive value (number, string, true/false, null or undefined) or an object, which is defined as a non-primitive value.

Variables are declared with the var keyword, as shown in the examples below:

var aBc, zz32;
var q = "abc", r = 'def';
var p = true, q = false;

Variables are either scoped globally or functionally. When in a global scope, they are declared outside any function, and are available to all code within the Script cell or module in which they are declared, but not to code in any other Script cell or modules. When in a function scope, they are located anywhere within a function, and are only available inside the function. For more information, see Script.


Objects and Arrays

In JavaScript, any non-primitive value is considered to be an object; a property that has a name and a value, which can either be a primitive value or another object. While an object is essentially an unordered collection of named values, an array is an ordered collection of numbered values.

Object Properties

Property Syntax

Object Literal Syntax

Arrays


Object Properties

Within JavaScript, objects are dynamically typed:

  • Every object is a dictionary of properties.
  • Each property is a name-value pair.
  • Properties are added and removed at run time.

Properties are inherited from a prototype object:

  • As if each new object is a copy of its prototype.
  • The prototype may in turn derive from a prototype of its own.


Property Syntax

JavaScript uses two types of syntax for defining property access. The following syntax should be followed for properties (with either type, the expression before or after the dot or square bracket is evaluated first):

  • Dot notation:
    • a.prop = 123;	// Adds a property
    • b = a.prop;	// 123
    • delete a.prop;	// Removes the property
    • c = a.prop;	// undefined
  • Square brackets with a name/string:
    • a ["break 1"] = 123	// Adds a property
    • b = a["break 1"];	// 123
    • nm = "break 1";		// Can use a variable
    • c = a[nm];		// 123
    • delete a[nm]		// Removes the property


Object Literal Syntax

To create a new object, use a comma-separated list of name:value pairs, as shown below:

var myrectangle = {
    width: 100, height: 50,
    "return": {a:1, b:2, c:3},
    getArea: function() {
       return this.width * this.height;
    }
};


Arrays

Within JavaScript, arrays are just like regular objects, but use numerical property names, as shown below.

Note: The length property is one plus the highest numbered element.
var a = []; 	// Empty
var b = [9.5, "Fred", true];
var c = b[1];	// "Fred"
var d = b["1"]	// "Fred"
var e = b[9]	// undefined
b[4491] = 2;	// adds 1 element
b.newProperty = "hello"


Built-in JavaScript Classes

The following are examples of built-in JavaScript classes.

  • Array: sort, reverse, concat, slice, push, pop, shift, unshift
  • Math: abs, min, max, sqrt, ceil, floor, sin, cos, tan, asin, acos, atan
  • String: indexOf, match, replace, split, substring, toUpper, toLower, trim
  • Date: new Date(), toString, add, subtract

Numbers

String Literals


Numbers

JavaScript represents all numbers using the 64-bit floating-point format defined by the IEEE 754 standard. When a number appears in a JavaScript program, it’s referred to as a numeric literal. The following illustrates how JavaScript represents numbers and numeric literals:

  • Base 10: 1, 47, 3.14, -24e-13
  • Base 16: 0x7fff


String Literals

The following are examples of string literals used in JavaScript:

"Hello I'm Fred"
'I am "Sam", I am'
"Hello\t\ "World\"\x0D\u000A"
"Hello \
big \
world" (EC5)


Functions

A function is a special kind of object, which has executable code associated with it, and can be invoked to run that code and return a value. Functions, like arrays, behave differently than objects, and have a special language syntax for working with them. Most importantly, they are true values, and programs can treat them like regular objects.

Functions are defined using the function keyword, and arguments and return are optional. The following forms are equivalent:

function  sum(x, y) {
            return x + y;
            }
            var sum = function (x, y) {
            return x + y;

Variadic Functions


Variadic Functions

Within JavaScript, any function can take a variable number of arguments; the arguments keyword is an array of the current function’s arguments. The following demonstrates this:

function sum() {
            var i, total = 0;
            for (i=0; i<arguments.length; i++) {
            total += (+arguments[i]);
            }
            return total;
            }
        var z = sum(1,2, "3.14");	// 6.14


Expressions and Operators

The following are the common expressions and operators used in JavaScript:

  • Primary: (x) x.y f(x,y,z) a[x]
  • Unary: +x –x !x ++x –x x++ x-- ~x32
  • Multiplicative: * / %
  • Additive: - + (+ is also used for string concatenation)
  • Shift32: << >> (sign extend) >>> (zero extended)
  • Relational: < > <= >= (alphabetical for strings)
  • Equality: == != === !== (strict equality/inequality)
  • Bitwise32
    • AND: &
    • OR: |
    • XOR: ^
    • Conditional AND: &&
    • Conditional OR: ||
    • Conditional if: ?:
  • Assign: = *= /= %= += -= &= ^= |= <<= >>= >>>=


Type Conversion

Values are converted automatically whenever needed (and if possible), and operators are left-associative. When converting, be aware of weak equality statements, such as the following:

if ("4" == 2 * 2)	// true
        if ("4" === 2 * 2)	// false

“Falsey” values convert to false (undefined, null, 0, -0, NaN, “”), and all other values convert to true (if (“false”) {…} // true).

typeof Operator


typeof Operator

The typeof operator returns a string identifying the type of its operand:

Value | typeof value ==
Null | “null”
Undefined | “undefined”
Any number (NaN) | “number”
A string | “string”
True/False | “boolean”
Any function | “function”
Any object | “object”


if Statement

Within JavaScript, if statements use the same syntax as C:

if (x>0) {
            y = Math.Sqrt(x);
            }
            else if (x == 0) {
            y = 0;
            }
            else
            y = undefined;	// braces optional
        // (but recommended)

switch Statement


switch Statement

Within JavaScript, switch statements are similar to C, but are also able to use strings, as well:

 switch (name) {
            case "Fred":
            processFredReport();
            break;
            case "Sam":
            case "Samantha":
            processSamReport();
            break;
            case 911:	// also matches "911"
            emergencyAlert();
            // Fall through (discouraged)
            default:
            return "Unable to process report!";
        }


Looping

There are several methods to create loops within JavaScript.

  • For
    • for (var x = 0; x < 100; x++) {...}
  • While
    • while (!inputFile.isAtEnd()) {...}
  • Do While
    • do {...} while (foundItem==0);
  • For/in
    • for (var propName in myObject) {...}
      Note: The property order is not guaranteed.
  • Break
    • This is used to exit the enclosing loop:
    • if (foundRecord) break;
  • Continue
    • This is used to begin the next loop iteration:
    • if (skipThisItem) continue;


Exceptions

Exceptions are used to indicate that an exceptional condition or error has occurred. A throw signals that an error occurred, while the try/catch/finally statement is used by JavaScript to handle an exception or error.

Throwing Exceptions

Try/Catch/Finally Block


Throwing Exceptions

The following demonstrates how to throw an exception within JavaScript:

if (area <= 0) {
            throw new Error("area must be positive");
            --or--
            throw 'Invalid argument';
            --or--
            throw radius * 3.14;	// not normally used but legal
        }


Try/Catch/Finally Block

The try clause defines the block of code that contains the exception to be handled, and is followed by either a catch or finally clause. These two are optional, however, the try block must be followed by at least one of them. The following illustrates how to handle an exception or error in JavaScript:

try {
            sendAllOutput(stream);
            }
            catch(ex) {				// optional (but one is required)
            console.log (ex);
            }
            finally {				// optional (but one is required)
            stream.close();
        }


Regular Expressions

The following are examples of regular expressions commonly used in JavaScript.

var x1 = new RegExp("[a-z].*");
var x2 = /[a-z].*/;

The test method returns true on a match:

valid = x1.test(input);

The exec method returns multiple results:

var x3 = /Tool\d*;
            while (r = x3.exec(text))
            {
            console.log("Found" + r[0] +
            "at" + r.index +
            "now at" + x3.lastIndex);
        }


In-Sight Explorer JavaScript Samples

To aid development and implementation of JavaScript within the In-Sight Explorer development environment, sample jobs and snippets have been included, which provide examples that can be used to model desired functionality.

  • The job samples and snippets have been designed to include comments within the code, detailing how and why the code has been structured, as well as explaining the intended functionality contained within the samples.
  • The job samples are included in the following directory: C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Explorer 5.1.0\Sample Jobs\Spreadsheet\Scripting
  • The snippets are included in the Snippets tab of the Palette, in the Scripting folder. For more information, see Palette: Spreadsheet View.


Script

Executes user-defined JavaScript source code, which is created and edited using the Edit Script dialog. For more information, see Edit Script Dialog.

The Script function contains JavaScript source code (which can be saved and stored as a .js file) that defines its behavior, and the source code only defines the behavior for the individual Script function. For example, if there are several Script functions in a job, a variable defined in one Script function will only be defined for that particular Script function, and not for all of the Script functions in the job.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  • The following limits apply to the memory allocated by all Script functions and external script modules used in any given job:

    • The limit for the maximum number of bytes allocated for script memory is 4MB.
    • The limit for the maximum number of bytes allocated for the stack is 64kB.
  • To avoid unnecessary memory allocation, all unused functions should be deleted from the script (such as those in the default example script, if they are not used). For example, a script with an unused sample draw function that generates a string object and plots it, will consume memory and CPU cycles.

  • The functionality of a Script function that has been cell stated to disable its execution differs from other Spreadsheet functions, explicitly upon a job load. For more information, see Cell State Dialog.

    Generally, other Spreadsheet functions will retain the last value recorded after the function executed. Any functions that reference the disabled function will return the last value that was recorded. However, due to the Script function requiring the execution of its internal run method, upon loading a disabled Script function, it will display a Script data structure, but any Get function that references it will return #ERR because the Get function is expecting a specific returned value, which is not being returned since the Script function did not execute. For more information, see Get.

  • The Script function is not supported inside a Dialog function.

Script Inputs

Syntax: Script(Argument 1,...,Argument 100)

Unlike traditional In-Sight spreadsheet functions, the Script function is able to take a variety of different input arguments (from 1 to 100). Each argument must be a cell reference, a literal value, or an expression that yields one of the following value types:

  • A number
  • A string
  • An event
  • A shape object. For more information, see Script Function JavaScript Source Code and API Reference.
  • A Binary data structure
  • A Blobs, Edges, Hist, IDMax, or Patterns data structure
  • An Object or Array data structure (returned from another Script function)
Note:
  • If a cell range is specified as an argument, it will be expanded to the individual cell references contained in the range, and will thus consume an equal number of arguments as contained in the cell range.

  • When an argument to a Script function is a reference to another cell that is returning a Blobs, Edges, Hist, IDMax, or Patterns data structure, the object that is passed into the Script function is only usable until the Run Method returns. For more information, see Run Method.

    The Script function can directly return this object, and it will be usable as the result value of the cell containing the Script function. However, if the script stores this object internally (using it in its Draw Method, for example), after the run method returns, the object will be unusable, and attempting to call any of its methods will result in an error. This also applies if the script returns a result structure such as a property of a script object returned by the run method. For instance, any of these properties will not be usable by a Get function, or by other Script functions, because the underlying objects are no longer valid.

  • While running on an In-Sight 5705 or 5705C vision system, the Script function may return incorrect results if a math operation contains NaN or an undefined value.

  • When writing a script, including code that validates input arguments may help to reduce errors, as shown in the example below:

    function Tool()
{
}
module.exports = Tool;
function isNumber(n) {
  if (n === undefined || n == null || isNaN(parseFloat(n)) || !isFinite(n))
    return false;
  return true;
}
Tool.prototype.run = function(x, y)
{
  if (!isNumber(x) || !isNumber(y)){
    throw new Error("Usage: Requires 2 numeric arguments");
  return +x + +y;
}

Script Outputs

Returns

The function may return a value of any of the following types:

  • A number
  • true (1) or false (0)
  • A string
  • A Binary data structure
  • A Blobs, Edges, Hist, IDMax, or Patterns data structure
  • A shape object. For more information, see Script Function JavaScript Source Code and API Reference.
  • An object
  • null, undefined or no return statement (which is treated the same as an empty object)

The function will return #ERR for any of the following conditions:

  • If the source code does not contain a run method.
  • If any of the argument values is not of a supported type.
  • If the constructor throws an exception.
Note: The GetErrorString function may be used to retrieve the exception message, if one was written into the source code. All exceptions return the same error code (20000005).

Script Vision Data Access Functions

The Get function is used to access properties of objects returned by a Script function. For more information, see Get.


Script Function JavaScript Source Code and API Reference

The following guidelines must be observed when creating JavaScript source code for the Script function. The implementation of JavaScript within In-Sight Explorer follows version 5 of the open standard approved by the European Computer Manufacturer’s Association, also known as ECMAScript 5 (ECMA5). For more information, see Script.

Note: The "Tool" function name in the following examples is arbitrary (and has no effect on the operation of the Script function itself), and is used in all the In-Sight examples and sample scripts. Any other name may be given to the "Tool" function name, but the name must be used consistently throughout the source code in a Script function. Also, within the examples below, the "this" keyword will refer to the Tool object created and initialized using the constructor function.
  • Constructor
  • Run Method
  • Draw Method
  • Save and Load Methods
  • Timeout
  • File Paths
  • Script Modules
  • Data Structure Inputs/Outputs
  • Binary Structures Inputs/Outputs
  • Shape Objects
  • Process Object
  • Console Object
  • File System Module

Constructor

The JavaScript source code must set a "module.exports" equal to a function that represents the constructor of the tool. This function will be invoked, with no arguments, after the script is compiled, which initializes an instance of the Tool object.

Note:
  • The "Tool" function name in the following examples is arbitrary (and has no effect on the operation of the Script function itself), and is used in all the In-Sight examples and sample scripts. Any other name may be given to the "Tool" function name, but the name must be used consistently throughout the source code in a Script function. Also, within the examples below, the "this" keyword will refer to the Tool object created and initialized using the constructor function.
  • Based on the implementation of JavaScript by In-Sight, Script methods (i.e. constructor, run, save, load and/or draw) may be called more than once while editing the Script function or closing the Edit Script Dialog. For example, after a script has been created in the Edit Script dialog, when the script is saved by pressing the OK button, the run method may be run additional times to ensure it compiles correctly, and to return results, so multiple messages may appear in the console.log. For more information, see Edit Script Dialog.

For example:

function Tool() {
  // Initialize the tool statethis._partTotal = 0;
}
module.exports = Tool;

Run Method

The Tool object must define a "run" method, which is called whenever the Script function is executed. Otherwise, the Script function will return #ERR. The Script function's arguments will be passed to the script's run method in the order they are specified.

The following example shows the recommended syntax for defining the run method:

Tool.prototype.run = function(a, b) {
  return "The average is" + (a+b)/2;
};
Note:
  • All JavaScript functions are variadic, so the run method in the script does not need to declare the same number of arguments that are passed to the Script function. The Script function can also access a variable number of arguments, using the "arguments" array.
  • Based on the implementation of JavaScript by In-Sight, Script methods (i.e. constructor, run, save, load and/or draw) may be called more than once while editing the Script function or closing the Edit Script Dialog. For example, after a script has been created in the Edit Script dialog, when the script is saved by pressing the OK button, the run method may be run additional times to ensure it compiles correctly, and to return results, so multiple messages may appear in the console.log. For more information, see Edit Script Dialog.

Run Method Return Values

The run method may return any of the following types of values:

  • A number
  • true (1) or false (0)
  • A string
  • A Binary data structure
  • A Blobs, Edges, Hist, IDMax, or Patterns data structure
  • An Object
  • An Array
  • null, undefined, or no return statement (which is the same as an empty Object)
Note:
  • When a number or string is returned, the Script function will display a number or string as the output result.
  • When an object is returned, the Script function will display an Object data structure.
  • When an array is returned, the Script function will display an Array data structure.

Draw Method

The Script function supports a "draw" method, which allows the function to generate graphics similar to the Image functions. The draw method is given a single argument, which is a graphics context object.

Note:
  • The draw method is optional, and may be omitted if there are no graphics being drawn.
  • If an exception is thrown in the draw, save or load methods, the exception will be logged to the console and the method will exit at that point. However, the Script function will not necessarily return #ERR in that event; it will return the result of the run method, or #ERR if the run method throws an exception or the code cannot be compiled. For more information, see Run Method.
  • Based on the implementation of JavaScript by In-Sight, Script methods (i.e. constructor, run, save, load and/or draw) may be called more than once while editing the Script function or closing the Edit Script Dialog. For example, after a script has been created in the Edit Script dialog, when the script is saved by pressing the OK button, the run method may be run additional times to ensure it compiles correctly, and to return results, so multiple messages may appear in the console.log. For more information, see Edit Script Dialog.
  • The draw method has an individual timeout, with a default setting of 1000ms, that can be set via a Native Mode command, such as EV SetSystemConfig ("Script.DrawTimeout", 1500). This timeout is helpful in scenarios where, for example, the Script Editor is being used repeatedly with a draw method that has an algorithmically challenging runtime order (such as one that accidentally contains an infinite loop). If, for instance, a long timeout of 10000ms was used, it may require the In-Sight vision system to be power-cycled, because of a conflict with the In-Sight Explorer connection timeout, whereas a smaller timeout of 6000ms may enable In-Sight Explorer to continue connectivity.

Use the following methods to generate graphics:

  • plotArc(centerRow, centerColumn, startRow, startColumn, endRow, endColumn, name, color [,show])
  • plotCircle(row, column, radius, name, color [,show])
  • plotCross(row, column, angle, high, wide, name, color [,show])
  • plotLine(row0, column0, row1, column1, name, color [,show] [,startAdornment] [,endAdornment])
  • plotPoint(row, column, name, color [,show])
  • plotRegion(row, column, high, wide, angle, curve, name, color [,show])
Note:
  • The bracketed parameters are optional.

  • The plotRegion method recognizes additional flags that can be ORed with the show parameter values:

    • 0x100: Plot only the region perimeter, with no X/Y axis labels.
    • 0x200: Plot a filled (solid color) region, with no X/Y axis labels.

    For example, passing a show parameter value of 0x101 will plot a region with no axis labels, and it will always be plotted (i.e. regardless of whether or not the cell is the current cell). Similarly, passing a value of 0x201 will plot a solid-color region.

  • The JavaScript parameters have the same meaning as the Image functions' parameters, except for the "color" parameter, which is specified as a 24-bit RGB color value, in the 0xRRGGBB format. For example, the hexadecimal constant 0xFF8020 translates to: red=255, green=128, blue=32. Color values can be found here.

Drawing Shapes

In addition to the above graphics, there is a draw method for creating "shapes," which is the equivalent of the PlotPolygon and PlotCompositeRegion functions, where the "shape" can be any of the supported Shape Objects. For more information, see Shape Objects.

  • plotShape(shape, name, color [,show])
Note: The polygon will not be graphically displayed if its length exceeds approximately 4950 points.

The following example illustrates the correct syntax for defining the draw method:

Tool.prototype.draw = function(gr) {
  gr.plotPoint(this._foundRow, this._foundCol, "Found Feature", 0xFF00FF);
};

Save and Load Methods

The Script function supports "save" and "load" methods, which allow the function to archive its internal state when the job is saved, and to restore the state of the function when the job is loaded. The save method requires no arguments, and returns an Object that contains the state to be saved. The object will be stored in the job file, and when the job is loaded, the object will be provided as the lone argument for the function's load method.

Note:
  • The save and load methods are optional, and may be omitted if the tool does not save a state in the job.
  • If an exception is thrown in the draw, save or load methods, the exception will be logged to the console and the method will exit at that point. However, the Script function will not necessarily return #ERR in that event; it will return the result of the run method, or #ERR if the run method throws an exception or the code cannot be compiled. For more information, see Run Method.
  • Based on the implementation of JavaScript by In-Sight, Script methods (i.e. constructor, run, save, load and/or draw) may be called more than once while editing the Script function or closing the Edit Script Dialog. For example, after a script has been created in the Edit Script dialog, when the script is saved by pressing the OK button, the run method may be run additional times to ensure it compiles correctly, and to return results, so multiple messages may appear in the console.log. For more information, see Edit Script Dialog.

The following example illustrates the recommended syntax for defining the save and load methods:

Tool.prototype.save = function() {
  return {total: this._total, avg: this._average};
};
Tool.prototype.load = function(saved) {
  this._total = saved.total;
  this._average = saved.avg;
};

Timeout

Each of the JavaScript methods that is called by the Script function (i.e. the constructor, run, draw, save and load methods) is subject to a timeout. By default, the default timeout is 10 seconds, with a 1 second default granularity (the timeout is specified in milliseconds, with a minimum value of 1 and a maximum of 60000; the granularity is also specified in milliseconds, with a minimum of 1 and a maximum of 10000). If any of the methods take longer than 10 seconds, the method will be aborted, exhibiting the same effect as though an exception had been thrown, with a message indicating that a timeout has occurred.

Note:
  • The purpose of the timeout is to avoid locking up the In-Sight vision system in the event that an infinite loop is inadvertently created in the script, versus providing a function-specific timeout to limit the length of time a job is allowed to run, like the Timeout parameter of a FindPatMaxPatterns function, for example. For that type of functionality, use the hrtime([time]) method in the script to periodically check the elapsed time to determine whether or not the function should continue. For more information, see Process Object.

  • The Script function's timeout can be modified via a Native Mode command, as in the following example, which sets the timeout to 1 second:

    EV SetSystemConfig("Script.ToolTimeout",1000,1)

  • The Script function's timeout granularity can also be modified via a Native Mode command, as in the following example, which sets the timeout granularity to 5 seconds:

    EV SetSystemConfig("Script.TimeoutGranularity",5000,1)

  • The draw method has an individual timeout, with a default setting of 1000ms, that can be set via a Native Mode command, such as EV SetSystemConfig ("Script.DrawTimeout", 1500). This timeout is helpful in scenarios where, for example, the Script Editor is being used repeatedly with a draw method that has an algorithmically challenging runtime order (such as one that accidentally contains an infinite loop). If, for instance, a long timeout of 10000ms was used, it may require the In-Sight vision system to be power-cycled, because of a conflict with the In-Sight Explorer connection timeout, whereas a smaller timeout of 6000ms may enable In-Sight Explorer to continue connectivity.

File Paths

For the JavaScript functions described in this topic that require a file name or directory path, they can either be a simple name (when referencing files on the local file system) or a URL (using the FTP scheme when referring to files and directories on an FTP server).

When a URL is used, it must follow the FTP URL format, as specified in RFC 1738: ftp://<user>:<password>@<host>:<port>/<url-path>

Note: Some or all of the parts "<user>:<password>@", ":<password>", "<port>" and "/<url-path>" may be excluded.

Script Modules

All In-Sight JavaScript code is loaded as modules that are offered privacy of their top scope; facility for importing singleton objects from other modules; and exporting their own API. This format is used for loading the JavaScript code contained within a Script function, as well as when loading external script modules from files.

Note: While the module system is based on those of CommonJS and NodeJS, Cognex does not guarantee any compatibility with modules designed for those systems.

The following example illustrates how to import source code:

/*
This script returns the roots of a quadratic equation, given the coefficients a,b,c from a standard form equation.
*/function Script() {

}
/*
This is a required statement, and enables the Spreadsheet to call the Script function, which initializes this cell.
*/
module.exports = Script;
  var quad = require('quadratic'); 	// Imports the module
/*
This is where the quadratic module can be put to use.
*/
Script.prototype.run = function() {
    var a = 1, b = 4, c = 2;
    return quad.roots(a,b,c); //Put the module to use
}
Note: If the specified .js file is not readable when the require() function is called, the require () function will return the value "undefined," and will not throw an exception.

Global Scope

The global scope module is unique to that module, meaning that any free variables defined by the module are only visible to that module.

"require" Function

In a module, "require" is a free variable that acts as a function. The "require" function accepts a Module Identifier, and returns the exported API of the imported module. If the requested module cannot be returned, the "require" function will return the value "undefined."

"module" Variable

In a module, there is a free variable, "module," which is an Object. The "module" object has an "exports" property that represents the exported API of the module, and it is initially set as an empty object.

A module may simply add properties to the default-created "module.exports" object in order to export its API. Alternatively, a module may assign a new object to the "module.exports" property in order to export a different object as its API, rather than using the default-created empty exports object.

"exports" Variable

In a module, there is a free variable called "exports," which initializes the value of "module.exports."

Note: This variable is provided as a convenience, allowing scripts to simply add properties to the "exports" object, rather than having to specify "module.exports."

Module Identifier

A module identifier is either the name of file on the local file system of an In-Sight vision system, or the name of a file on an FTP server, as specified under the File Paths section.

Note: If the name is specified without a file extension, the ".js" extension will automatically be appended to the file when attempting to load it.

Data Structure Inputs/Outputs

The Blobs, Edges, Hist, IDMax, or Patterns data structures are supported both as inputs and outputs from a Script function. These data structures are read-only, and cannot be created or modified by JavaScript source code. Each of the data structures exposes methods that correspond to the corresponding Vision Data Access functions supported by the particular data structure. For more information, see Vision Data Access Functions.

For example, a Blobs data structure supports the following methods:

  • blobs.getNFound() – Returns the number of blobs found.
  • blobs.getAngle(index) – Returns the angle of an indexed blob's center of mass.
  • blobs.getArea(index) – Returns the area (in pixels) of an indexed blob.

Binary Structures Inputs/Outputs

The Binary data structure returned by a BStringf or ReadDevice function, and the UserData data structure returned by the GetBufferData function are supported as inputs to a Script function. When these structures are passed into JavaScript, the binary data is copied into a JavaScript DataView object, which can be used to read/write individual bytes, or to create a different typed array view, such as an Int32Array or a Uint8Array. Because the Script function is given a copy of the data, the function can save or modify the contents of the DataView object without affecting the original source data.

When a JavaScript DataView, ArrayBuffer or other typed array object is returned by a JavaScript function, the data will be copied into a Binary data structure, which can be used by other In-Sight functions (such as a WriteDevice function) that accept a Binary data structure as an input argument.

Note: The Int32Array and Uint8Array are standard JavaScript classes. Please consult the links (Internet access is required) for more information.

The following example takes a Binary data structure as an input argument, views the data structure as an array of 32-bit floating point values, and then returns a new Binary data structure, which contains 64-bit floating point values, in the opposite order.

 Tool.exports.run = function(data) {
  var input = new Float32Array(data.buffer);
  var output = new Float64Array(input.length);
  for (var i=0; i<output.length; ++i)
    output[output.length - i] = input[i];
  return output;
}

The next example illustrates a function that formats and returns a hypothetical 14-byte binary message to be sent to a PLC. The function does not need to write padding fields because they are automatically initialized to zero. The returned value will be a 14-byte Binary data structure in the spreadsheet.

// Message Format:
// Byte padding[2]; /* Fill with zeroes */
// uint32 count; 	/* 32-bit unsigned integer, big-endian order */
// double delay;	/* 64-byte double, little-endian order */
//
Tool.exports.run = function(count, delay) {
  var data = new DataView(new ArrayBuffer(14));
  data.setUint32(2, count);			 // big-endian by default
  data.setFloat64(6, delay, true);		// little-endianreturn data;
}

FormatOutputBuffer Function

The FormatOutputBuffer function will accept a Binary data structure input, using the "String" data type. This allows a copy of the Binary data structure to be returned from a Script function into a Buffer data structure. The binary bytes are copied directly, and are not interpreted as a null-terminated character string. For more information, see FormatOutputBuffer.

Shape Objects

A shape object can be input to a Script function as an argument (for example, using a reference to an EditRegion function), and can be output as a return value. Shape objects are created by using constructor functions that are provided as members of the 'cognex' module.

The following illustrates how shape objects can be created:

function Example()
{
}
var cognex = require('cognex');
module.exports = Example;

Example.prototype.run = function(x, y)
{
  var annulus = new cognex.Annulus(150, 250, 25, 45);
  var circle = new cognex.Circle(50, 250, 30);
  var fixture = new cognex.Fixture(230, 300, 45);
  var line = new cognex.Line(270, 530, 290, 50);
  var point = new cognex.Point(330, 500);
  var polygon = new cognex.Polygon();
  polygon.add(340,230);
  polygon.add(390,210);
  polygon.add(370,230);
  polygon.add(390,250);
  var region = new cognex.Region(440, 300, 40, 50, 30, 45);
  this.shapes = [annulus,circle,fixture,line,point,polygon,region];
  return this.shapes;
}

Example.prototype.draw = function(gr)
{
  this.shapes.forEach(function(shape) {gr.plotShape(shape, JSON.stringify(shape), 0xc0ffee*Math.random());});
}

Annulus

The Annulus constructor function requires the following arguments, and the object provides read/write properties with the same names:

  • row or x: The x-offset.
  • col or y: The y-offset.
  • innerRadius: Defines the inner radius.
  • outerRadius: Defines the outer radius.

Circle

The Circle constructor function requires the following arguments, and the object provides read/write properties with the same names:

  • row or x: The x-offset.
  • col or y: The y-offset.
  • radius: Defines the radius.

Fixture

The Fixture constructor function requires the following arguments, and the object provides read/write properties with the same names:

  • row: The row offset.
  • column: The column offset.
  • theta: The angular orientation.

Line

The Line constructor function requires the following arguments, and the object provides read/write properties with the same names:

  • row0 or x0: The x-offset of the first endpoint.
  • col0 or y0: The y-offset of the first endpoint.
  • row1 or x1: The x-offset of the last endpoint.
  • col1 or y1: The y-offset of the last endpoint.

Point

The Point constructor function requires the following arguments, and the object provides read/write properties with the same names:

  • row or x: The x-offset.
  • col or y: The y-offset.

Polygon

The Polygon constructor function requires no arguments, and returns an empty polygon. The polygon object provides the following properties and methods. In cases where an index (n) is specified, the first point has an index of zero.

  • length: Returns the number of points in the polygon.
  • add(x,y): Appends a new point to the polygon.
  • clear(): Removes all points from the polygon.
  • remove(n): Removes the specified point (n) from the polygon.
  • set(n,x,y): Sets the coordinates of a point (n) of the polygon.
  • row(n) or x(n): Returns the row/x-coordinate of point (n) of the polygon.
  • col(n) or y(n): Returns the column/y-coordinate of point (n) of the polygon.

Region

The Region constructor function requires the following arguments, and the object provides read/write properties with the same names:

  • row or x: The x-offset of the origin.
  • col or y: The y-offset of the origin.
  • high: The x-axis dimension of the region.
  • wide: The y-axis dimension of the region.
  • angle: The angular orientation, in degrees.
  • curve: The angular deviation between the region's x-axis and the opposing boundary line.

Process Object

Within any module, a free variable, "process," provides an object with the following methods.

uptime()

This method returns the number of seconds, as a floating-point value, with sub-microsecond precision, since the system powered up.

Note: The accuracy depends on the accuracy of the system clock crystal and additional factors, so no specific accuracy is guaranteed.

The following illustrates how the method may be used:

var start = process.uptime();
someTimeConsumingFunction();
var elapsedSeconds = process.uptime() - start;

hrtime([time])

This method returns the current time in a high-resolution tuple Array (seconds, nanoseconds), where the first element is an integer number representing seconds, and the second element is an integer number representing nanoseconds since the start of the current second. The primary use of this method is for measuring time between intervals.

Note: The accuracy depends on the accuracy of the system clock crystal and additional factors, so no specific accuracy is guaranteed.

If this method is called without an argument, the returned time is relative to when the In-Sight vision system powered up. If the method is called with the result of a previous call to hrtime(), the returned time is the time difference, relative to the previous time.

The following illustrates how the method may be used:

var start = process.hrtime();
someTimeConsumingFunction();
var diff = process.hrtime(start);
var elapsedSeconds = diff[0] + diff[1] / 1e+9

sleep(ms)

This method specifies that the Script function should sleep for the specified number of milliseconds.

Note: The sleep period will be aborted if a Timeout elapses before the sleep period has finished. For more information, see Timeout.

memoryUsage()

This method returns an object with two properties:

  • heapTotal: Indicates the total size of heap memory.
  • heapUsed: Indicates the amount of heap memory currently in use.
Note: When a Script function is being run on an In-Sight Emulator, these methods return unusable heap information.

Console Object

Within any module, a free variable, "console," provides an object with the following methods. The Console Output pane is a dockable component of the Edit Script dialog, and is also available as a dockable window in the Spreadsheet View (select the Script Console Output option from the View menu). For more information, see Edit Script Dialog.

console.log(message)

This method prints a message, as normal text, to the Console Output pane of the Edit Script dialog.

console.warn(message)

This method prints a message, with black text on a yellow background, to the Console Output pane of the Edit Script dialog.

console.error(message)

This method prints a message, with black text on a red background, to the Console Output pane of the Edit Script dialog.

File System Module

The "fs" module provides access to files on the local file system of an In-Sight vision system or Emulator, as well as those on remote FTP servers.

Note: All of the methods in the file system module end in "Sync" to denote that they are "synchronous," which means that the execution of the script within the Script function will block until the file operation is completed.

This module is obtained using the require function:

 var fs = require("fs");

The file system object provides the following methods.

Note:
  • The same file type visibility support exists between the source code written in a Script function and the file types supported on In-Sight vision systems and Emulators (e.g. .txt, .htm, .xml, .js, .css, .rtf and .json). However, if accessing a third party FTP server, authorized users can read/write other file types.
  • Due to the multitude of possible FTP server configurations, Cognex recommends that before using the File System Module methods (especially appendFileSync, as it relies upon existsSync, readFileSync and writeFileSync), the intended FTP server and file paths are tested to verify their compatibility and suitability before implementation. For example, in some "blind drop" FTP server configurations, the existsFileSync method may return false for an existing file, or the readFileSync method may fail, leading to data loss.
  • Access to the following system files is prohibited:
    • proc.set
    • image.bmp
    • image2.bmp (only applicable to greyscale vision systems)
    • image4.bmp (only applicable to greyscale vision systems)
    • image.jpg
    • screen.bmp (only applicable to the emulator)
    • screen.jpg (only applicable to the emulator)
    • hosts.net
    • graphics.svg

appendFileSync(file name, data)

This method appends the given data to a file, if it exists, or writes the data to a new file if the file does not already exist. If the data parameter is a JavaScript typed array, such as a Uint8Array or a DataView, it will be written to the file as binary data, otherwise, it will be converted to a string, and written to the file as a UTF-8 string.

existsSync(file name)

This method returns true if the specified file exists.

readFileSync(file name [,"binary"])

This method reads and returns the entire contents of the file. The contents of the file are read as UTF-8 text, and returned as a string. If the optional "binary" argument is used, the contents of the file will be returned as binary data in a DataView. For example:

var binaryData = fs.readFileSync('ftp://server/xyz.dat', "binary");
Note: This method will throw an exception if an attempt is made to read a system file.

readdirSync(path)

This method reads the contents of a directory, and returns an array of file names. To read only the contents of an In-Sight vision system or Emulator's directory, specify an empty string or "."; to read the contents of a directory of an FTP server, specify the FTP URL, only.

Note: This method is consistent with the In-Sight Explorer and In-Sight Files pane, and with the vision system's FTP server, regarding which files are shown and/or hidden. An authorized user can read, write and FTP files that are hidden due to their file extension.

statSync(path)

This method receives the status of a file or directory, and returns an object with the following property:

  • size: The size, in bytes, of the file.
Note: If the file does not exist, this function will return an object with size=0, instead of throwing an exception.

unlinkSync(file name)

This method is used to delete the file. However, if the file does not exist, the method will do nothing.

writeFileSync(file name, data)

This method writes the entire contents of the file, and will overwrite an existing file (if the file does not exist, the file will be created). If the data parameter is a JavaScript typed array, such as a Uint8Array or a DataView, it will be written to the file as binary data; otherwise it will be converted to a string (if it is not already a string), and written to the file as a UTF-8 string.

Note: This method will throw an exception if an attempt is made to write to a system file.


Focus Functions

The Focus functions provide methods to automatically or manually adjust the lens of supported In-Sight 7000 series vision systems. The Focus functions include:

  • EditFocusPosition: Controls the focus position of the lens.
  • GetCurrentFocusPosition: Returns the current focus position of the lens.

EditFocusPosition

GetCurrentFocusPosition


EditFocusPosition

The EditFocusPosition function is used to control the focus position of the lens on supported In-Sight 7000 series vision systems, by either automatically focusing the lens or moving the lens to a specific focus position.

Note:
  • For the In-Sight 70xx - 74xx series vision systems, the EditFocusPosition function is only available for vision systems with an M12 lens configuration.
  • For In-Sight 7000 Gen2 series vision systems, the EditFocusPosition function is only available for vision systems with the autofocus accessory installed.
  • The 7905 vision system does not support the autofocus module or any accessories that require S-Mount/M12 lenses. The EditFocusPosition function is not supported for this model.
  • The EditFocusPosition function only works when the vision system is Offline.
  • Autofocus and Save Focus buttons can be accessed from Live Video mode in both Spreadsheet View and EasyBuilder View.

EditFocusPosition Inputs

Syntax: EditFocusPosition(Minimum Focus Position,Maximum Focus Position,Image,Autofocus Region.X,Autofocus Region.Y,Autofocus Region.Height,Autofocus Region.Width,AutofocusRegion.Angle,Autofocus Region.Curve,Autofocus Event,Autofocus Offset, Set Focus Position Value,Set Focus Position Event,Save Focus Position with Job,Run Autofocus on Job Load)

Parameter Description
Minimum Focus Position

Specifies the minimum focus position value (0 to 100; default = 0).

Note: This parameter is not supported for the In-Sight 7000 Gen2 series vision system.
Maximum Focus Position

Specifies the maximum focus position value (0 to 100; default = 100).

Note: This parameter is not supported for the In-Sight 7000 Gen2 series vision system.
Image

Specifies a reference to the A0 cell, which contains the Image data structure returned by AcquireImage. For more information, see AcquireImage.

Note: This parameter can reference other Image data structures, however, the function is only designed to use the AcquireImage Image data structure.
Autofocus Region

Specifies the size and position of the region used to calculate the lens focus.

X | The x-offset of the origin, in fixture coordinates.
Y | The y-offset of the origin, in fixture coordinates.
Height | The height of the focus region.
Width | The width of the focus region.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.
Autofocus Event

Specifies the spreadsheet event that triggers autofocus. This parameter must be a reference to one of the following:

  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Autofocus Offset

Specifies an offset (0 -100 to 100; default = 0) to be applied to the position of the lens after autofocus is completed.

Note: This parameter is not supported for the In-Sight 7000 Gen2 series vision system.

Set Focus Position Value

Specifies a value or cell reference to use as the focus position.

  • In-Sight 70xx - 74xx series: 0 - 100; default = 0.
  • In-Sight 7000 Gen2 series: 0 - 250; default = 0.

Set Focus Position Event

Specifies the spreadsheet event that moves the lens to the specified focus position value. This parameter must be a reference to one of the following:

  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Save Focus Position with Job

Specifies whether or not the focus position data is saved with the job and applied to the lens when the job is reloaded. When the check box is selected, the lens will move to the last saved focus position.

Note: Note: The Save Focus Position with Job checkbox and the Run Autofocus on Job Load checkbox are mutually exclusive, therefore both checkboxes cannot be checked at the same time.
0 = OFF | The lens will not move and the cell will display the current focus position.
1 = ON (default) | The lens will move to the last saved focus position.
Run Autofocus on Job Load

Specifies whether or not to automatically focus the lens when the job is loaded.

Note: The Save Focus Position with Job checkbox and the Run Autofocus on Job Load checkbox are mutually exclusive, therefore both checkboxes cannot be checked at the same time.
0 = OFF (default) | The lens will not be automatically focused when the job is loaded.
1 = ON | The lens will be automatically focused when the job is loaded.

EditFocusPosition Outputs

Returns | The value of the current Set Focus Position Value, or #ERR if any of the input parameters are invalid.
Results | Acquires a new image and updates the displayed image with the newly acquired image.

Autofocus the Lens

  1. Insert the EditFocusPosition function into a Spreadsheet cell.

  2. In the EditFocusPosition property sheet, click OK. Two cells are automatically inserted in the spreadsheet: an EditInt function for adjusting the focus position value and a Button function for triggering autofocus.

  3. Click the Autofocus button.
  4. Wait for the image to update. The focus position value is displayed in the cell to the left of the Autofocus button.
Note: Autofocus can also be accessed from Live Video in both Spreadsheet View and EasyBuilder View.

Adjust the Autofocus Position (In-Sight 70xx - 74xx Series Only)

  1. After autofocus has been completed, open the EditFocusPosition property sheet.
  2. Adjust the Autofocus Offset parameter value and click OK.
  3. Determine if the image is in focus (i.e., features are optimized while shadows are minimized). If not in focus, readjust the value until the optimal position is reached.
Note: The Autofocus Offset value and original autofocus position are saved with the job and reapplied to the lens when the job is reloaded.

Set the Lens to a Specific Position

  1. Insert the EditFocusPosition function into the Spreadsheet.
  2. In the Set Focus Position Event parameter, specify a cell reference that contains either an Event function or a Button function.
  3. In the Set Focus Position Value parameter, specify a value or cell reference to use as the focus position and click OK.
  4. When the event occurs, the lens is moved to the specified position and the focus position value is displayed in the cell adjacent to the Autofocus button.

Autofocus the Lens in Live Video

  1. Place the vision system Offline.

  2. Click the Live Video [image] button on the Job Display toolbar to enter Live Video mode.

    Tip: If connected to an In-Sight 7000 Gen2 series vision system while in Live Video mode, you can also launch the Light Settings dialog to make adjustments to the illumination settings.

  3. Press the Autofocus button or manually adjust the Focus Position slider until the details of the features to be inspected are clear and highly contrasted, and the Focus Metric score is acceptable. After pressing the Autofocus button, the Focus Position slider, the Save Focus button and Reset Focus button are disabled until Autofocus is complete. Once complete, the focus position value is updated and a new image displayed.

    • Optionally, click the Save button to save the current focus position as the default focus position and automatically move the lens to this position the next time the vision system is power cycled and a new job loaded.
    • Optionally, click the Reset button to reset the default focus position.
  4. Click the Live Video [image] button again to exit Live Video mode.


GetCurrentFocusPosition

Returns the current focus position of the lens.

Note:
  • For the In-Sight 70xx - 74xx series vision systems, the GetCurrentFocusPosition function is only available for vision systems with an M12 lens configuration.
  • For In-Sight 7000 Gen2 series vision systems, the GetCurrentFocusPosition function is only available for vision systems with the autofocus accessory installed.
  • The 7905 vision system does not support the autofocus module or any accessories that require S-Mount/M12 lenses. The GetCurrentFocusPosition is not supported for this model.

GetCurrentFocusPosition Inputs

Syntax: GetCurrentFocusPosition(Event)

Parameter Description

Event

Specifies the spreadsheet event on which to read data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

GetCurrentFocusPosition Outputs

Returns The current focus position value when the event is triggered; if the current position cannot be determined, the return value is -1.


In-Sight Communications

In-Sight vision systems are able to communicate with external devices over Ethernet networks or serial port connections using various protocols. The following table illustrates the various protocols supported by In-Sight vision systems and presents links to relevant topics:

Note: The ability to communicate over protocols and connections depends on the type of In-Sight vision system and the In-Sight firmware version. For a complete list of models and supported firmware versions, see Firmware Versions.

Ethernet Protocols

Protocol Related Topics

TCP/IP
  • TCPDevice and QueryDevice
  • ReadDevice and WriteDevice
  • AcquireImage, WriteResult, and ReadResult

TCP/IP Modbus
  • Modbus TCP Communications
  • TCPDevice, ReadDevice, WriteDevice and QueryDevice
  • Binary Text Functions
  • Anybus X-gateway
  • Communicate with a Siemens PLC on a PROFIBUS Network
  • Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an Anybus X-gateway
File Transfer Protocol (FTP)
  • FTP Settings Dialog
  • Log On/Off Dialog
  • Save & Open Dialogs
  • WriteFTP, WriteImageFTP and WriteImageSFTP
SMTP
  • WriteSMTP
EtherNet/IP (EIP)
  • ReadEIP and WriteEIP
  • ReadEIPBuffer and WriteEIPBuffer
  • ReadLatchedUserDataBuffer, ReadUserDataBuffer and WriteResultsBuffer
  • EtherNet/IP Communications
  • EtherNet/IP Object Model and Input/Output Assembly Objects
  • EtherNet/IP Object Model and Input/Output Assembly Objects
  • Communicate with a Rockwell ControlLogix PLC
  • Communicate with a Rockwell SLC 5/05 PLC

MELSEC
  • Configuring In-Sight Vision Systems for SLMP Communications
  • SLMP Scanner Factory Interface
  • Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic
  • FormatInputBuffer and FormatOutputBuffer
  • ReadUserDataBuffer, ReadLatchedUserDataBuffer and WriteResultsBuffer
  • Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an Anybus X-gateway
  • Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an In-Sight CIO-MICRO-CC I/O Module
  • ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, WriteCCLinkBitBuffer and WriteCCLinkWordBuffer

PROFINET
  • ReadProfinetBuffer and WriteProfinetBuffer
  • ReadUserDataBuffer, ReadLatchedUserDataBuffer and WriteResultsBuffer
  • PROFINET Communications
  • PROFINET IO Module Reference
  • PROFINET IO Module Reference Table - In-Sight 5.x.x Firmware
  • PROFINET IO Module Reference Table - In-Sight 4.x.x Firmware
  • PROFINET Communications with an In-Sight Vision System
  • Transferring Data With an In-Sight Vision System via PROFINET - In-Sight 5.x.x Firmware
  • Transferring Data With an In-Sight Vision System via PROFINET - In-Sight 4.x.x Firmware
  • PROFINET - Using Records with Siemens PLCs

POWERLINK
  • POWERLINK Communications
  • POWERLINK Factory Interface
  • FormatInputBuffer and FormatOutputBuffer
  • ReadUserDataBuffer, ReadLatchedUserDataBuffer and WriteResultsBuffer

Native Mode
  • Motoman Communications
  • Native Mode Commands

DataChannel Communications
  • DataChannel Communications
  • SetWatch

Serial Protocols

Protocol Related Topics
Text mode
  • Serial Port Settings Dialog
  • ReadSerial and WriteSerial
Native mode
  • Serial Port Settings Dialog
  • Motoman Communications
  • Native Mode Commands
  • ReadSerial and WriteSerial
DeviceNet
  • Serial Port Settings Dialog
  • ReadDeviceNet and WriteDeviceNet
Motoman mode
  • Motoman Communications
  • Motoman Commands
  • Serial Port Settings Dialog
Kuka mode
  • Robot Communications - KUKA Robot Controllers

Anybus X-gateway

DataChannel Communications

EtherNet/IP Communications

FTP Communications

Mitsubishi MELSEC Communication Protocols

Motoman Mode Communications

Native Mode Communications

Modbus TCP Communications

POWERLINK Communications

PROFINET Communications


Anybus X-gateway

The Anybus® X-gateway™ facilitates communication between two different industrial network protocols, allowing them to communicate and exchange data. The Anybus X-gateway utilizes an Ethernet interface as a multi-purpose communication solution, offering industrial network protocol support, as well as Web and email capabilities.

Under this model, In-Sight sensors, using TCP/IP Modbus Communications, are able to communicate to, and exchange data with PLCs on a different network (PROFIBUS or CCLink for example). The Anybus X-gateway Ethernet interface exchanges data between the In-Sight sensor(s) and a PLC using the Input and Output Buffers. These buffers are accessed via industrial network protocols as shown in the following diagram , connecting a TCP/IP Modbus network and a PROFIBUS network.

  • Input Buffer: The Input Buffer stores data sent from the PLC, on the PROFIBUS network. This data will be sent to an In-Sight sensor, on the TCP/IP Modbus network.
  • Output Buffer: The Output Buffer stores data sent from the In-Sight sensor, on the TCP/IP Modbus network. This data will be sent to the PLC on the PROFIBUS network.

Communicate with a Mitsubishi Automation Controller on a CC-Link Network

Communicate with a Siemens PLC on a PROFIBUS Network


Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an Anybus X-gateway

Note: CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

Overview

An In-Sight vision system can communicate with devices on a CC-Link network using an Anybus X-gateway and TCP/IP Modbus protocol. For more information, see Anybus X-gateway.

This topic explains how to install and configure the gateway, how to configure the Automation Controller programming software (Mitsubishi GX Developer), and how to set up In-Sight Explorer to communicate with a Mitsubishi Automation Controller on a CC-Link network.

The examples in this topic were written assuming that you are using the following components:

  • Anybus X-gateway and HMS Anybus IPconfig software
  • In-Sight vision system running firmware version 3.41.00 or higher
  • A Mitsubishi Automation Controller that supports CC-Link
  • Mitsubishi GX Developer programming software

Installing and Configuring an Anybus X-gateway

The steps contained in this section explain how to install and configure the Ethernet portion of the Anybus X-gateway. The procedure assumes that you are using the following components:

Note: Please refer to the HMS Anybus-X documentation (Anybus-X Generic Gateway User Manual, Anybus-X Ethernet Network Interface Addendum and X-gateway Interface Addendum - CC-Link Slave Interface), for more information. These documents are available on the support page of the HMS website (hms-networks.com).

To install and configure an Anybus X-gateway:

  1. Download and install the HMS Software utility Anybus IPconfig; this utility uses the HMS IP Configuration Protocol (HICP), which provides a simple way to configure Anybus based Ethernet interfaces.
  2. Using a PC with Ethernet connectivity, run the Anybus IPconfig. A window will display all Anybus-based Ethernet interfaces, and their IP addresses, discovered on the network.
  3. Using the CC-Link station address switches on the Anybus X-gateway, set the CC-Link station address. Please refer to the X-gateway Interface Addendum - CC-Link Slave Interface for more information.
  4. Set the baud rate switch on the Anybus X-gateway to match the baud rate of the Automation Controller that you intend to communicate with.
  5. Physically mount and connect the Anybus X-gateway hardware; please refer to the Anybus X-gateway manual for more information.
  6. After the Anybus X-gateway hardware has been properly mounted and all cable connections have been made, provide power to the Anybus X-gateway hardware and wait 30 to 60 seconds for the device to power up. Once the Anybus-X Gateway hardware has power, the Ethernet LED status indicators should be either green or flashing green.
  7. From the Anybus IPconfig utility, click the Scan button to refresh the window that displays all Anybus-based Ethernet interfaces. The newly added Anybus X-gateway hardware should appear in the list, with a default IP address of 192.168.0.1.
  8. If the settings for the Anybus X-gateway need to be altered, double-click on the Anybus X-gateway in the list; this will display a dialog to assign IP addresses using DHCP or through a static IP address, subnet mask, default gateway and DNS server. Once the settings have been finalized, click on the Set button to continue.
  9. Finally, from the Anybus IPconfig utility, click the Scan button to refresh the window that displays all Anybus-based Ethernet interfaces. The Anybus X-gateway hardware should appear in the list, with the new IP address, if it was altered.

Connecting an Anybus X-gateway to a Mitsubishi Automation Controller on a CC-Link Network

The Anybus X-gateway exchanges CC-Link data with the TCP/IP Modbus network and allows an In-Sight vision system's inputs and outputs to be sent to the processor’s memory in the Mitsubishi Automation Controller. Once these values are established, they are synchronized at an interval defined by the update rate of the CC-Link network.

Connecting an Anybus X-gateway to an In-Sight Vision System via TCP/IP Modbus, describes how the actual data is transferred. Additionally, a snippet is included detailing a sample configuration.

Note: Refer to the Anybus-X Generic Gateway User Manual and the Anybus-X CC-Link Slave Network Interface Addendum for more information as needed. These can be downloaded from the HMS website (hms-networks.com).

In addition to the Anybus X-gateway, an Anybus Communicator can be used as a CC-Link master or slave. The following example uses an Anybus X-gateway.

Setting Up CC-Link Communications

To setup a CC-Link connection between an Anybus X-gateway and a Mitsubishi controller, the Anybus X-gateway must first be configured to the same Baud rate as the Automation Controller and given a station number different from the controller. The switches can be found next to the power connector. See the Anybus user manual for further instructions. The next step is to configure the Automation Controller using the Mitsubishi GX Developer software.

  1. Open GX Developer, and load the Automation Controller's project.

  2. Verify the Automation Controller Module setup. Double click on Parameter, then PLC Parameter and select the I/O Assignment tab.

    In this example we have one Q02(H), one Intelli, one Input and one Output device. For more information regarding the type and the number of points refer to the Mitsubishi manual.

  3. Configure the CC-Link network. Double-click Network Parameter under Parameter and choose CC-Link.

    • The PLC is selected as the Master Station under Type.
    • Remote net (Ver.1 mode) refers to CC-Link version 1.0 which is used with the Anybus X-gateway. Version 2.0 is selected when using the Anybus Communicator.
    • Since our Anybus X-gateway is the only connected station All connect count is set to 1.

  4. Configure the occupied stations. Double-click on Station information and the following screen appears.

    Automation Controller Handshaking can now be configured. This is an optional procedure where the X-Gateway or Communicator requires a response from the Automation Controller. For more information see How to set up an Anybus Product with CC-Link and a Mitsubishi Automation Controller from the HMS website.

  5. Configure the X-Gateway to interact with the Automation Controller. Connect a serial cable between the PC and the config port of the Gateway and open Windows Hyperterminal (Start < Accessories < Communications< Hyperterminal).
  6. In the File Menu, click Properties.

  7. Click the Connect To tab, and select the appropriate COM port in the Connect using field, and click Configure. Use the settings in the following image.

    Connect and press ESC to see the menu options.

    Press 6 and enter the configuration information below. It must match the information entered in the Automation Controller configuration screens.

    Reboot the device. The system is now fully configured.

Connecting an Anybus X-gateway to an In-Sight Vision System via TCP/IP Modbus

This section describes connecting an Anybus X-gateway to an In-Sight vision system, using TCP/IP Modbus communications. For more information, see Modbus TCP Communications.

Note: Please refer to the Open Modbus/TCP Specification (External link; requires Internet access. Published by Modicon.) and the InSightModbus.doc (available from the Cognex Support Website) for more information.

Setting Up TCP/IP Modbus Communications in In-Sight Explorer

TCP/IP Modbus client functionality is enabled on In-Sight vision systems, but this server functionality is not needed in this model, because the Anybus X-gateway acts as the TCP/IP Modbus server (slave).

  1. In In-Sight Explorer, select the In-Sight vision system or emulator that is to be configured from the In-Sight Network pane.
  2. From the File menu, select New Job to load a new job on to a vision system or emulator.
  3. From the Palette, select the Snippets tab and expand the Communications folder. Load the CCLinkGateway.cxd file to cell A2 in the In-Sight Explorer spreadsheet by either first selecting A2 and double-clicking on the CCLinkGateway.cxd or drag-and-drop the file into cell A2.
  4. Save the new job to the vision system or emulator as CCLinkGateway.job.
  5. Double-click cell A5 and enter the IP Address of the Anybus X-gateway (if necessary, run the HMS Anybus IPconfig software utility to return the Anybus X-gateway's IP address).
  6. TCP/IP Modbus communications require that an In-Sight client (master) has the following functions present in the job: TCPDevice and QueryDevice. The TCPDevice function is used to create the network connection between the remote device, in this case, the Anybus X-gateway, and an In-Sight vision system. The QueryDevice function is used to construct the Modbus Function Code command of the TCP/IP Modbus packet. The CCLinkGateway.cxd file contains a TCPDevice function at cell C5, and two QueryDevice functions: one in cell B15 for Read requests, and the other in cell B28, for Write requests. For more information, see TCPDevice and QueryDevice.

  7. The Anybus X-gateway supports the following Modbus Function Codes in the QueryDevice function:

    Function Code Function Name

    3

    Read multiple registers

    4

    Read input registers

    6

    Write single register

    7

    Read exception status

    8

    Diagnostics

    16

    Force multiple registers

    22

    Mask write register

    23

    Read/Write registers

  8. Double-click the QueryDevice function, located in cell B15, and ensure that it has the following parameter settings:

    Note: Please refer to the Modbus Implementation Guide for more information on the Modbus packet structure.
    Parameter Input Number Parameter Input Name Parameter Input Value Description

    1

    Event

    $A$15

    A cell reference to an Event button. For more information, see Event.

    2

    Device

    $C$5

    A cell reference to the TCPDevice function in cell C5.

    3

    Data

    0

    Modbus header, Transaction Identifier, upper byte = 0.

    4

    Data

    0

    Modbus header, Transaction Identifier, lower byte = 0.

    5

    Data

    0

    Modbus header, Protocol Identifier, upper byte = 0.

    6

    Data

    0

    Modbus header, Protocol Identifier, lower byte = 0.

    7

    Data

    0

    Field Length, upper byte = 0.

    8

    Data

    6

    Field Length, lower byte = 6 (bytes to follow).

    9

    Data

    0

    Unit ID, byte not used = 0.

    10

    Data

    $C$12+3

    Modbus Function Code byte; in this example, this input will equal 3 or 4.

    Note: When the Modbus Function Code byte is set to 3, In-Sight reads the holding registers (the data written via TCP/IP Modbus); when the Modbus Function Code byte is set to 4, In-Sight reads the input registers (data written via CC-Link)

    11

    Data

    0

    Modbus reference address, upper byte = 0.

    Note: Input registers may be read using Read multiple registers (Function Code 3) from address 1000, or using Read input registers (Function Code 4) from address 0.

    12

    Data

    $E$19

    Modbus reference address, lower byte = 4. The first 4 bytes are used to specify the “Bit Area” size. In this case the first 4 bytes cannot be used for data exchange and are reserved due to the number of occupied stations.

    Note: Input registers may be read using Read multiple registers (Function Code 3) from address 1000, or using Read input registers (Function Code 4) from address 0.
    Note: For more information see Data Exchange basics (chapter 2-1) in the X-gateway Interface Addendum - CC-Link Slave Interface available on the support page of the HMS website (hms-networks.com).

    13

    Data

    0

    Word (register) count, upper byte = 0.

    14

    Data

    $B$8

    Word (register) count, lower byte.

    In this example, this input will equal 1, 2, 3, 4, 6 or 8.” .

  9. The TCP/IP Modbus response packet from the Anybus X-gateway is stored in the binary structure of the QueryDevice function; these return values are read in In-Sight Explorer by the BGetInt function. For more information, see Binary Text Functions. This function returns integer values from a specific byte from a binary structure, and the response is formatted as follows:

    Byte Number Modbus Response Description

    Byte 7

    Modbus Function Code

    In this example, 3 or 4. If the command fails, 128 is added to the Function Code (the value returned would then be 131 or 132, see cell E15).

    Byte 8

    Byte Count

    In this example, 2 registers (words) = 4 bytes. See cell E15.

    Byte 9/10

    Value in Register 0

    These values are in the two-byte format. In the CCLinkGateway.cxd file, the BGetInt function in cell D18 reads the binary value at Byte 9 (the lower byte of the word read).

    Byte 11/12

    Value in Register 1

    These values are in the two-byte format. In the CCLinkGateway.cxd file, the BGetInt function in cell D19 reads the binary value at Byte 11 (the lower byte of the word read).

    Byte 13/14

    Value in Register 2

    These values are in the two-byte format. In the CCLinkGateway.cxd file, the BGetInt function in cell D20 reads the binary value at Byte 13 (the lower byte of the word read).

    Byte 15/16

    Value in Register 3

    These values are in the two-byte format. In the CCLinkGateway.cxd file, the BGetInt function in cell D21 reads the binary value at Byte 15 (the lower byte of the word read).

    Byte 17/18/19/20

    Value in Registers 3 and 4 that store a floating-point number

    These values are in the floating-point format. In the CCLinkGateway.cxd file, the BGetInt function in cell D22 reads the binary value at Byte 17 (the lower byte of the word read).

    Byte 21/22/23/24

    Value in Registers 5, 6 and 7 that store a string (in byte array)

    These values are in the string format. In the CCLinkGateway.cxd file, the BGetInt function in cell D23 reads the binary value at Byte 21 (the lower byte of the word read).
  10. The QueryDevice function, in cell B28, for the Write request, is formatted in the same manner as the Request and Response packets.

Reading Data to an In-Sight Vision System from a Automation Controller Via CC-Link

Following the example provided by this model, the Input Buffer of the Anybus X-gateway is the data source being read; this buffer holds the data requested by the In-Sight vision system (on the TCP/IP Modbus network) from the Automation Controller (on the CC-Link network).

  1. Continue using the In-Sight Explorer job created in the Setting Up TCP/IP Modbus Communications in In-Sight Explorer section.
  2. Open CC-Link Configurator (GX Configurator-CC). If necessary, download the project to the Mitsubishi Automation Controller using GX Developer. In addition, GX Developer may be used for more complex data manipulation.

  3. Select QCPU-Q as the Automation Controller series.

  4. From the Online menu, select Remote station monitor/test.

  5. Configure the Remote station monitor/test dialog as shown below.

  6. Click on Batch monitor, then on Start monitor.

  7. Enter hexadecimal or decimal equivalent of the values to be read by clicking Present value change(RWw). Note that the values are displayed in big endian notation even though they are being transferred by In-Sight Explorer in little endian notation.

  8. In cell A8 of the CCLinkGateway.cxd file, select 8 for the number of registers (16 bytes).

  9. In cell C12, select Input Registers from the drop-down list for the Read Registers.

  10. Click on the Read Button in cell A15 to update the results. The values in cells D18-D23 should change to reflect the values that were entered in the CC-Link Configurator. For more information, see Button.

Writing Data From an In-Sight vision system To a Automation Controller Via CC-Link

Following the example provided by this model, the Output Buffer of the Anybus X-gateway is the data source being written to; this buffer holds the data written by the In-Sight vision system (on the TCP/IP Modbus network) to the Automation Controller (on the CC-Linknetwork).

  1. In cell A8 of the CCLinkGateway.cxd file, select 8 for the number of registers (16 bytes).
  2. In cell C12, select Holding Registers from the drop-down list for the Read Registers; this will read data from the same registers that are being written from within the In-Sight job.

  3. Next, adjust the values in cells D31-D36 so that they are valid data types for the application. Enter values into the EditInt cells for the four integers in cells D31-D34 (the minimum value is -32768 and the maximum is 32767, so the value must be a valid integer between that range); the floating-point value in cell D35 (the minimum value is ±1.175495e-38 and the maximum value is ±3.402823e+38, so the value must be a valid floating-point value between that range); and the 4 byte string in cell D36 (the string can be no longer than 4 characters/bytes). For more information, see EditInt.

  4. Click the Write Button in cell A28 to write the results from the In-Sight Explorer spreadsheet to the Automation Controller.

  5. Click the Read Button in cell A15; the values in cells D18-D23 should change to reflect the values that were entered in cells D31-36.
  6. Open CC-Link Configurator (GX Configurator-CC). If necessary, download the project to the Mitsubishi Automation Controller using GX Developer. In addition, GX Developer may be used for more complex data manipulation.

  7. Select QCPU-Q as the Automation Controller series.

  8. From the Online menu, select Remote station monitor/test.

  9. Configure the Remote station monitor/test dialog as shown below.

  10. Click on Batch monitor, then on Start monitor. The values under RWr monitor should change to reflect hexadecimal or decimal equivalent of the values that were entered in the In-Sight Explorer spreadsheet. Note that the values are displayed in big endian notation even though they are being transferred by In-Sight Explorer in little endian notation.


Communicate with a Siemens PLC on a PROFIBUS Network

An In-Sight vision system can communicate with devices on a PROFIBUS network using an Anybus X-gateway and TCP/IP Modbus protocol. This topic explains how to install and configure the gateway, how to configure the PLC programming software (Siemens Step 7), and how to set up In-Sight Explorer to communicate with a Siemens PLC on a PROFIBUS network.

The examples in this topic were written assuming that you are using the following components:

  • Anybus X-gateway and HMS Anybus IPconfig software
  • In-Sight vision system running firmware version 3.41.00 or higher
  • Siemens S7-300 or S7-400 series PLC with PROFIBUS option
  • Siemens Step 7 programming software

Install and Configure an Anybus X-gateway

The steps contained in this section explain how to install and configure the Ethernet portion of the Anybus X-gateway.

Note: Please refer to the HMS Anybus-X documentation (Anybus-X Generic Gateway User Manual, Anybus-X Ethernet Network Interface Addendum and Anybus-X PROFIBUS Slave Network Interface Addendum), for more information. These documents are available for download from the Anybus Website (https://www.anybus.com/products/gateway-index/anybus-xgateway).

To install and configure an Anybus X-gateway:

  1. Download and install the HMS Software utility Anybus IPconfig. This utility uses the HMS IP Configuration Protocol (HICP), which provides a simple way to configure Anybus based Ethernet interfaces.
  2. Using a PC with Ethernet connectivity, run the Anybus IPconfig. A window will display all Anybus-based Ethernet interfaces, and their IP addresses, discovered on the network.
  3. Using the rotary PROFIBUS node address switches on the Anybus X-gateway, set the PROFIBUS node address. Please refer to the Anybus-X PROFIBUS Slave Network Interface Addendum for more information.
  4. Physically mount and connect the Anybus X-gateway hardware. Please refer to the Anybus X-gateway manual for more information.
  5. After the Anybus X-gateway hardware has been properly mounted and all cable connections have been made, provide power to the Anybus X-gateway hardware and wait 30 to 60 seconds for the device to power up. Once the Anybus-X Gateway hardware has power, the Ethernet LED status indicators should be either green or flashing green.
  6. From the Anybus IPconfig utility, click the Scan button to refresh the window that displays all Anybus-based Ethernet interfaces. The newly added Anybus X-gateway hardware should appear in the list, with a default IP address of 192.168.0.1.
  7. If the settings for the Anybus X-gateway need to be altered, double-click on the Anybus X-gateway in the list. This will display a dialog to assign IP addresses using DHCP or through a static IP address, subnet mask, default gateway and DNS server. Once the settings have been finalized, click on the Set button to continue.
  8. Finally, from the Anybus IPconfig utility, click the Scan button to refresh the window that displays all Anybus-based Ethernet interfaces. The Anybus X-gateway hardware should appear in the list, with the new IP address, if it was altered.

Connect an Anybus X-gateway to a Siemens PLC on a PROFIBUS Network

This section provides steps for connecting, and verifying, PROFIBUS communications between a Siemens PLC and an Anybus X-gateway.

The Anybus X-gateway exchanges data between a PROFIBUS network and a TCP/IP Modbus network; this allows for an In-Sight vision system's inputs and outputs to be sent to the processor's memory in the Siemens PLC. Once these values are established, they are synchronized at an interval defined by the update rate of the PROFIBUS network.

Note: Refer to the HMS Anybus-X documentation (Anybus-X Generic Gateway User Manual, Anybus-X Ethernet Network Interface Addendum and Anybus-X PROFIBUS Slave Network Interface Addendum), for more information. These documents are available for download from the Anybus Website (AnyBus-X gateway).

Set Up the PROFIBUS Communications with the Anybus X-gateway

To set up the PROFIBUS connection between a Siemens controller and an Anybus X-gateway, the Anybus X-gateway must first be added to the controller's hardware configuration, using the Siemen's HW Config tool:

  1. Open the SIMATIC manager and load the PLC's project.

  2. Select the SIMATIC 300 or SIMATIC 400 node and then double-click the Hardware node from the object list.

  3. The Siemen's HW Config tool will now appear. In order to add PROFIBUS nodes to the Controller, a PROFIBUS system must be present in the hardware configuration diagram. If there is not a PROFIBUS:DP master system in the hardware configuration diagram, follow these steps to add one:
    1. Under the Controller's slot in the rack configuration, find the DP or MPI/DP module, and then double-click on the module.
    2. From the Properties dialog, in the Operating Mode tab, ensure that the DP Master radio button is selected. In the General tab, ensure that the Interface type is set to PROFIBUS.
    3. If the device's addresses need to be changed, click on the Properties... button.
    4. From the listview, select the PROFIBUS subnet and click the Properties... button. If necessary, rename the network and change the Transmission Rate and Highest PROFIBUS Address.
    5. Click the OK button to accept any changes made to the dialogs.

    6. A PROFIBUS:DP master system should now appear in the diagram.

  4. If this is the first time that an Anybus X-gateway has been added to the PROFIBUS network, the HMS Industrial Networks AB Anybus-X Gateway GSD file must be installed. The latest version of this file can either be downloaded from the HMS Website, or by contacting HMS directly. Perform the following steps to install the Anybus-X Gateway GSD file:
    1. From the HW Config tool, select Options > Install GSD Files from the menu.
    2. Press the Browse button and select the GSD folder that contains the HMS_1013.GSD file.
    3. Press the Select All button, then click the Install button to install the hardware description for the Anybus X-gateway.

  5. To add an Anybus X-gateway device to the PROFIBUS network, browse to the Anybus-S PROFIBUS DP-V1 node in the Hardware Catalog (it can be found in the PROFINET DP > Additional Field Devices > General node in the tree). Drag the instance of the Anybus-S PROFIBUS DP-V1 device on to the PROFIBUS DP master system in the hardware configuration.

  6. Set the PROFIBUS node address to the address of the Anybus X-gateway device that will be connected to (the Anybus X-gateway PROFIBUS node address is set using the rotary PROFIBUS node address switches on the Anybus X-gateway).
  7. The Anybus X-gateway device should now appear, at the specified address, in the PROFIBUS:DP master system.

  8. To change the name of the device, double-click on the node in the configuration and change the "Designation" field to the new name.

  9. Next, the Input/Output byte settings need to be set for PROFIBUS network. The Anybus X-gateway's default setting for input and outputs on each network is 20 bytes (10 words). To configure the PLC to access all 20 I/O bytes over the PROFIBUS network, first, expand the Anybus-S PROFIBUS DP-V1 node in the Hardware Catalog. From the Anybus-S PROFIBUS DP-V1 node, select the "IN/OUT:8 words" module and drag-and-drop the selected module onto the grid in Slot 1. Next, select the "IN/OUT:2 words" module and drag-and-drop it onto the grid in Slot 2. This will map 10 words in the PLC for use with the Anybus X-gateway.

    Note: For more information on changing the default setting of the 20 I/O bytes, please see Chapter 5 of the Anybus-X Generic Gateway User Manual.
  10. After the Anybus X-gateway has been added to the PROFIBUS system, using the HW Config Utility, the project can be saved and compiled, and then downloaded to the PLC.
  11. Once the project has been successfully downloaded to the PLC, on the Anybus X-gateway, the Gateway Status LED and PROFIBUS Online Status LED should both appear green, indicating successful communications with the PROFIBUS PLC.

Verify PROFIBUS Communications

Following the above steps, the Anybus X-gateway has now been added as an Input/Output device in a Siemens project. After the project is downloaded to the controller, cyclic data transfers will be initiated.

To verify a proper I/O connection between the PLC and Anybus X-gateway, perform the following steps:

  1. Set the Siemens controller's Operating Mode to Run.

  2. Open the HW Config tool in Online mode. The Anybus X-gateway should be displayed, with no errors (an error is signified by a red line through the Anybus X-gateway's network icon); this will signify that the PROFIBUS connection has been completed correctly.

    Connection Established

    Connection Error
  3. Double-click the Anybus X-gateway box in the PROFIBUS(1): DP master sytem (1) network. In the General tab, the status should display either "OK" or "Module available and o.k."

  4. In the HW Config Utility, with the Anybus X-gateway selected, right-click the IN/OUT:8 words module, and select Monitor/Modify from the menu.

  5. Check the Monitor checkbox from the Run conditionally subsection of the Monitor/Modify dialog. In the lower right-corner of the dialog, the word RUNNING should be displayed; in the Status value column, a status code should be returned for each of the PIW input word addresses listed in the Address column.
Note: For more information, please refer to Chapter 3 of the Anybus-X PROFIBUS Slave Network Interface Addendum.

Connect an Anybus X-gateway To an In-Sight Vision System via TCP/IP Modbus

This section describes connecting an Anybus X-gateway to an In-Sight vision system, using TCP/IP Modbus communications. For more information, see Modbus TCP Communications.

Note:
  • Please refer to the Open Modbus/TCP Specification (External link; requires Internet access. Published by Modicon.) and the InSightModbus.doc (available from the Cognex Support Website) for more information.
  • The following samples assume that the default Modbus/TCP Modbus Address Mode setting in the Anybus X-gateway is Enabled, which is the default setting. If the setting is changed to Modbus Address Mode Disabled, then the Read Holding Registers and Write Multiple Registers QueryDevice functions in the ProfibusGateway.cxd need to be updated to reflect the new register address of 1024 address instead of 0. Refer to the X-Gateway Interface Addendum Ethernet Slave Interface, Chapter 5 pages 5-1 through 5-4.

Set Up TCP/IP Modbus Communications In In-Sight Explorer

TCP/IP Modbus client functionality is enabled on In-Sight vision systems, but this server functionality is not needed in this model, because the Anybus X-gateway acts as the TCP/IP Modbus server (slave).

  1. In In-Sight Explorer, select the In-Sight vision system or emulator that is to be configured from the In-Sight Network pane.
  2. From the File menu, select New Job to load a new job on to a vision system or emulator.
  3. From the Palette, select the Snippets tab and expand the Communications folder. Load the ProfibusGateway.cxd file to cell A2 in the In-Sight Explorer spreadsheet by either first selecting A2 and double-clicking on the ProfibusGateway.cxd or drag-and-drop the file into cell A2.
  4. Save the new job to the vision system or emulator as ProfibusGateway.job.
  5. Double-click cell A5 and enter the IP Address of the Anybus X-gateway (if necessary, run the HMS Anybus IPconfig software utility to return the Anybus X-gateway's IP address).
  6. TCP/IP Modbus communications require that an In-Sight client (master) has the following functions present in the job: TCPDevice and QueryDevice. The TCPDevice function is used to create the network connection between the remote device, in this case, the Anybus X-gateway, and an In-Sight vision system. The QueryDevice function is used to construct the Modbus Function Code command of the TCP/IP Modbus packet. The ProfibusGateway.cxd file contains a TCPDevice function in cell C5, and two QueryDevice functions: one in cell B15 for Read requests, and the other in cell B27, for Write requests. For more information about TCPDevice, see TCPDevice and for more information about QueryDevice, see QueryDevice.

  7. The Anybus X-gateway supports the following Modbus Function Codes in the QueryDevice function:

    Function Code Function Name

    3

    Read multiple registers

    4

    Read input registers

    6

    Write single register

    7

    Read exception status

    8

    Diagnostics

    16

    Force multiple registers

    22

    Mask write register

    23

    Read/Write registers

  8. Double-click the QueryDevice function, located in cell B15, and ensure that it has the following parameter settings:

    Parameter Input Number Parameter Input Name Parameter Input Value Description

    1

    Event

    $A$15

    A cell reference to an Event button.

    2

    Device

    $C$5

    A cell reference to the TCPDevice function in cell C5.

    3

    Data

    0

    Modbus header, Transaction Identifier, upper byte = 0.

    4

    Data

    0

    Modbus header, Transaction Identifier, lower byte = 0.

    5

    Data

    0

    Modbus header, Protocol Identifier, upper byte = 0.

    6

    Data

    0

    Modbus header, Protocol Identifier, lower byte = 0.

    7

    Data

    0

    Field Length, upper byte = 0.

    8

    Data

    6

    Field Length, lower byte = 6 (bytes to follow).

    9

    Data

    0

    Unit ID, byte not used = 0.

    10

    Data

    $C$12+3

    Modbus Function Code byte; in this example, this input will equal 3 or 4.

    Note: When the Modbus Function Code byte is set to 3, In-Sight reads the holding registers (the data written via TCP/IP Modbus); when the Modbus Function Code byte is set to 4, In-Sight reads the input registers (data written via PROFIBUS).

    11

    Data

    0

    Modbus reference address, upper byte = 0.

    Note: Input registers may be read using Read multiple registers (Function Code 3) from address 1024, or using Read input registers (Function Code 4) from address 0.

    12

    Data

    0

    Modbus reference address, lower byte = 0.

    Note: Input registers may be read using Read multiple registers (Function Code 3) from address 1024, or using Read input registers (Function Code 4) from address 0.

    13

    Data

    0

    Word (register) count, upper byte = 0.

    14

    Data

    $B$8

    Word (register) count, lower byte; in this example, this input will equal 1, 2, 3, 5 or 8.

  9. The TCP/IP Modbus response packet from the Anybus X-gateway is stored in the binary structure of the QueryDevice function; these return values are read in In-Sight Explorer by the BGetInt function. This function returns integer values from a specific byte from a binary structure, and the response is formatted as follows:

    Byte Number Modbus Response Description

    Byte 7

    Modbus Function Code

    In this example, 3 or 4. If the command fails, 128 is added to the Function Code (the value returned would then be 131 or 132, see cell E15).

    Byte 8

    Byte Count

    In this example, 2 registers (words) = 4 bytes. See cell E15.

    Byte 9/10

    Value in Register 0

    These values are in the two-byte format. In the ProfibusGateway.cxd file, the BGetInt function in cell D18 reads the binary value at Byte 9 (the lower byte of the word read).

    Byte 11/12

    Value in Register 1

    These values are in the two-byte format. In the ProfibusGateway.cxd file, the BGetInt function in cell D19 reads the binary value at Byte 11 (the lower byte of the word read).

    Byte 13/14

    Value in Register 2

    These values are in the two-byte format. In the ProfibusGateway.cxd file, the BGetInt function in cell D20 reads the binary value at Byte 13 (the lower byte of the word read).

    Byte 15/16/17/18

    Value in Registers 3 and 4 that store a floating-point number

    These values are in the floating-point format. In the ProfibusGateway.cxd file, the BGetInt function in cell D21 reads the binary value at Byte 15 (the lower byte of the word read).

    Byte 19/20/21/22/23/24

    Value in Registers 5, 6 and 7 that store a string (in byte array)

    These values are in the string format. In the ProfibusGateway.cxd file, the BGetInt function in cell D22 reads the binary value at Byte 19 (the lower byte of the word read).
  10. The QueryDevice function, in cell B27, for the Write request, is formatted in the same manner as the Request and Response packets.

Read Data to an In-Sight Vision System from a PLC Via PROFIBUS

Following the example provided by this model, the Input Buffer of the Anybus X-gateway is the data source being read; this buffer holds the data requested by the In-Sight vision system (on the TCP/IP Modbus network) from the PLC (on the PROFIBUS network).

  1. Continue using the In-Sight Explorer job created in the Setting Up TCP/IP Modbus Communications in In-Sight Explorer section.
  2. Open the SIMATIC manager and load the PLC's project. If necessary, download the project to the Siemens controller and set the Operating Mode to Run.
  3. In the SIMATIC manager, create a new Variable Table by right-clicking on the PLC and selecting Insert New Object from the Variable Table menu. Name and then open the new table.

  4. Add five items to the table, as in the table below.

    Offset Address Display Format

    0

    PQW 385

    DEC

    +2

    PQW 387

    DEC

    +4

    PQW 389

    DEC

    +6

    PQD 391

    FLOATING_POINT

    +10

    PQD 395

    CHARACTER

    +14

    PQD 399

    CHARACTER
    Note: The addresses are predicated on the "IN/OUT:8 words" module being at the Output Address of PQW 385. If the "IN/OUT:8 words" module is using a different Output Address, apply the specified offset to the Output Address to return the correct Output Address.
  5. In the SIMATIC Manager, open Configured CPU from the PLC > Connect To menu. The system will now be Online and monitoring the addresses entered in the Variable Table.

  6. Enter values for the five items added to the Variable Table, and then select Activate Modify Values from the Variable menu.

  7. Set the vision system Online.
  8. In cell A8 of the ProfibusGateway.cxd file, select 8 for the number of registers (16 bytes).

  9. In cell C12, select Input Registers from the drop-down list for the Read Registers.

  10. Click on the Read Button in cell A15 to update the results. The values in cells D18-D22 should change to reflect the values that were entered in the Variable Table.

Write Data From an In-Sight Vision System To a PLC Via PROFIBUS

Following the example provided by this model, the Output Buffer of the Anybus X-gateway is the data source being written to; this buffer holds the data written by the In-Sight vision system (on the TCP/IP Modbus network) to the PLC (on the PROFIBUS network).

  1. In cell A8 of the ProfibusGateway.cxd file, select 8 for the number of registers (16 bytes).
  2. In cell C12, select Holding Registers from the drop-down list for the Read Registers; this will read data from the same registers that are being written from within the In-Sight job.
  3. Next, adjust the values in cells D30-D34 so that they are valid data types for the application. Enter values into the EditInt cells for:
    • The three integers in cells D30-D32. The minimum value is -32768 and the maximum is 32767, so the value must be a valid integer between that range.
    • The floating-point value in cell D33. The minimum value is ±1.175495e-38 and the maximum value is ±3.402823e+38, so the value must be a valid floating-point value between that range.

    • The 6 byte string in cell D34. The string can be no longer than 6 characters/bytes.

  4. Click the Write Button in cell A27 to write the results from the In-Sight Explorer spreadsheet to the PLC.

  5. Click the Read Button in cell A15. Yhe values in cells D18-D22 should change to reflect the values that were entered in cells D30-34.
  6. Open the SIMATIC manager and load the PLC's project. If necessary, download the project to the Siemens controller and set the Operating Mode to Run.
  7. In the SIMATIC manager, create a new Variable Table by right-clicking on the PLC and selecting Insert New Object from the Variable Table menu. Name and then open the new table.

  8. Add five items to the table, as in the table below.

    Offset Address Display Format

    0

    PIW 325

    DEC

    +2

    PIW 327

    DEC

    +4

    PIW 329

    DEC

    +6

    PID 331

    FLOATING_POINT

    +10

    PID 335

    CHARACTER

    +14

    PIW 339

    CHARACTER
    Note: The addresses are predicated on the "IN/OUT:8 words" module being at the Input Address of PIW 325. If the "IN/OUT:8 words" module is using a different Input Address, apply the specified offset to the Input Address to return the correct Input Address.

  9. In the SIMATIC Manager, open Configured CPU from the PLC > Connect To menu. The system will now be Online and monitoring the addresses entered in the Variable Table. The values in the Variable Table should change to reflect the values that were entered in the In-Sight Explorer spreadsheet.

    Note: A Siemens S7 PLC can read out one, two or four bytes consistent from the I/O-image directly by accessing the data as a Byte, a Word or a DoubleWord. However, if you want to read out more than 4 bytes in a data string, it is necessary to use the System Function Blocks SFC14 and SFC15. For more information refer to Section 5.2.2 of the HMS document How to Configure an Anybus PROFIBUS Slave Module with a Siemens Step7 PLC available on the support page of the Anybus website (Anybus-X gateway).


DataChannel Communications

The In-Sight DataChannel integrates alphanumeric data and images into a developer's customized Graphical User Interface (GUI) application. Using DataChannel, the In-Sight vision system acts as a TCP/IP Server, while the GUI application acts as a TCP/IP Client. This configuration provides a fast and efficient mechanism for transferring images and data from an In-Sight vision system to a PC.

Establish a Connection to the DataChannel

To use the DataChannel in a custom GUI application, follow the steps below.

  1. Open a TCP connection to the In-Sight vision system.

    Note: 50000 is the default TCP/IP port number for the DataChannel. If you need to specify a different port number, use the Put Portnum Native Mode command.
  2. Connect to the port from the Client.
  3. After the connection is established, the Client must log in using a valid user name and password. The default login user name is "admin" with a null string password. The In-Sight vision system will not prompt for the login. A Carriage Return/Line Feed (CRLF) must be sent after both the user name and the password.

    • If either the user name or password is not sent to the In-Sight vision system within 5 seconds or if either is invalid, the following message is sent, and the connection is terminated:

      "<Prompt><Accept>Invalid Password</Accept></Prompt>" + CRLF

    • If the username and password are valid, the following greeting message is sent:

      "<Prompt><Accept>ok</Accept><DataSession>0</DataSession><OpcSession>0</OpcSession><ImageSession>0</ImageSession>
      <SystemType>22</SystemType><Screen><High>480</High><Wide>640</Wide><Color>0</Color></Screen>
      <ToolEnabledBits>FEF6FFFF300000000000000000000000</ToolEnabledBits></Prompt>"
 + CRLF
      Note:
      • The OpcSession is for internal use only.
      • The SystemType indicates the In-Sight vision system's hardware type.
      • The ToolEnabledBits is for internal use only.

    • If the username and password are not valid, In-Sight will send the following message and close the connection:

      "<Prompt><Accept>Invalid
 Password</Accept></Prompt>" + CRLF

    • If there are no other active network connections to the In-Sight vision system, up to six DataChannel connections can be established at a time. If there are six active network connections, the In-Sight vision system sends the following message:

      "<Prompt><Accept>Too many
 connections</Accept></Prompt>" + CRLF

  4. After a successful login, the Client needs to specify the type of information that is to be received over the DataChannel. The Client must send "IMG"+CRLF to receive image information or "DAT"+CRLF to receive data. Whenever the spreadsheet is updated, the image or data is sent through the DataChannel. Like the login, if either command is not sent to the In-Sight vision system within 5 seconds, the following message is displayed, and the connection is terminated:

    "<Prompt><Accept>Connection
 Closed</Accept></Prompt>" + CRLF

  5. If the connection is configured to send data, specify the output cells using the Put Watch Native Mode command.

    Note:
    • If any changes are made to the In-Sight spreadsheet, the Put Watch command must be sent again.
    • The DataChannel can monitor any cell containing numeric or string data. The Data Output is sent in XML format. Data is only sent from a monitored cell when that cell is evaluated, calculated or the value within the cell has changed. A constant value is evaluated only once after it is inserted into the spreadsheet because it does not depend on any other cells (changing the values of other cells will not change the value of a constant cell). For more information on cell evaluation and dependency, see Spreadsheet Cell Execution and Editing Reference.
    • Instead of sending the Put Watch command, the SetWatch function can be inserted in the In-Sight spreadsheet to automatically send information to the DataChannel.
    • The value for the AcqSeqNum can be used to match the data output with the corresponding image output. When the spreadsheet is updated by an Event or a Manual Trigger, two cycles occur. Any other acquisition trigger outputs only one cycle. When two cycles occur, the second cycle should be used to match the data output with the corresponding image output.

Test DataChannel Using a Telnet Client

  1. Open a command prompt. From the command prompt, log on to the vision system using a telnet client. When logging on, specify the host name or IP address and port number 23, which is the reserved Native Mode command port. For example: telnet is8402_010203 23.

  2. From the telnet client, type the following command: EV B0 1 Count($A$0,9999999,0,0). A Count function, using the default parameters, is inserted in cell B0.

  3. From the telnet client, type the following command: Put Watch B000 1 .

  4. From the command prompt, start a second telnet session and log on to the In-Sight vision system. When logging on, specify the host name or IP address and port number 50000, which is the default DataChannel port. For example: telnet telnet is8402_010203 50000.

  5. From the second telnet session, type "admin" and press Enter. Press Enter again to accept the null password.

  6. From the second telnet session, type "DAT" and press Enter.

  7. Acquire once on your In-Sight vision system. You should see data streaming to the second telnet program.

Data Output Format

The data output is sent in XML format. The following is example output from a telnet session using the example described above; the In-Sight vision system was manually triggered twice.

Note: When the spreadsheet is updated by an Event or a Manual Trigger, two cycles occur. Any other acquisition trigger outputs only one cycle.
Admin
******
<Prompt><Accept>ok</Accept><DataSession>0</DataSession><OpcSession>0</OpcSession><ImageSession>0</ImageSession>
<SystemType>22</SystemType><Screen><High>480</High><Wide>640</Wide><Color>0</Color></Screen>
<ToolEnabledBits>FEF6FFFF300000000000000000000000</ToolEnabledBits></Prompt>
dat
<Cycle AcqSeqNum="1">
</Cycle>
<Cycle AcqSeqNum="2">
<Cell Id="B0">
  <Float>1</Float>
</Cell>
</Cycle>
<Cycle AcqSeqNum="2">
</Cycle>
<Cycle AcqSeqNum="3">
<Cell Id="B0">
  <Float>2</Float>
</Cell>
</Cycle>

DataChannel SystemType

In-Sight Model | SystemType Output
In-Sight 5100 | 16, 17, 19, 22, 36, 44, 48, 52, 102
In-Sight 5100C | 24, 61, 109, 111
In-Sight 5110 | 20, 26, 42, 49
In-Sight 5400 | 14, 40, 41,
In-Sight 5400C | 33, 109, 111
In-Sight 5403 | 38
In-Sight 5410 | 21, 37, 47
In-Sight 5413 | 43
In-Sight 5600 | 53, 118
In-Sight 5603 | 60, 120
In-Sight 5604 | 88, 114
In-Sight 5605 | 100
In-Sight 5610 | 67
In-Sight 5613 | 66
In-Sight 5614 | 98
In-Sight 5615 | 101
In-Sight 5705 | 139
In-Sight 5715 | 139
In-Sight 5705C | 137
In-Sight Micro 1020 | 79
In-Sight Micro 1050 | 80
In-Sight Micro 1100 | 76
In-Sight Micro 1100C | 87
In-Sight Micro 1110 | 81
In-Sight Micro 1400 | 77
In-Sight Micro 1400C | 86, 125
In-Sight Micro 1402 | 127
In-Sight Micro 1403 | 78, 124
In-Sight Micro 1403C | 89, 126
In-Sight Micro 1410 | 82
In-Sight Micro 1412 | 127
In-Sight Micro 1413 | 83
In-Sight Micro 1500 | 135
In-Sight 7010 | 129
In-Sight 7010C | 133
In-Sight 7020 | 129
In-Sight 7050 | 129
In-Sight 7200 | 129
In-Sight 7200C | 133
In-Sight 7210 | 129
In-Sight 7230 | 129
In-Sight 7400 | 129
In-Sight 7400C | 133
In-Sight 7410 | 129
In-Sight 7430 | 129
In-Sight 7402 | 129
In-Sight 7402C | 133
In-Sight 7412 | 129
In-Sight 7432 | 129
In-Sight 7500 | 144
In-Sight 7501 | 144
In-Sight 7600 | 144
In-Sight 7600C | 144
In-Sight 7800 | 144
In-Sight 7800C | 144
In-Sight 7801 | 144
In-Sight 7801C | 144
In-Sight 7802 | 144
In-Sight 7802C | 144
In-Sight 7900 | 144
In-Sight 7900C | 144
In-Sight 7901 | 144
In-Sight 7901C | 144
In-Sight 7902 | 144
In-Sight 7902C | 144
In-Sight 7905 | 144
In-Sight 7905C | 144
In-Sight 8200 | 141
In-Sight 8200C | 141
In-Sight 8400 | 141
In-Sight 8400C | 141
In-Sight 8401 | 141
In-Sight 8401C | 141
In-Sight 8402 | 141
In-Sight 8402C | 141
In-Sight 8405 | 138
In-Sight 9902L | 149
In-Sight 9912 | 144
In-Sight 9912C | 144

Image Output Format

The image output consists of 2 parts: Header and Body. The image output is always binary in Big Endian format (PCs are little endian; applications need to convert endianness). In-Sight sends the default image from cell A0, and always send a full image. After the Header, the Body follows, which is raw pixel data starting from row0. To access the pixel data, the application should use the 'Offset' value in the Header. Image data consists of column-row ordered pixels starting from pixel 0,0. For greyscale vision systems, pixels are 8-bit greyscale value. Color vision systems may be programmed to output one of three types of images: 0 = greyscale image; 1 = Bayer image and 4 = 24-bit color image.

Note: 24-bit color images are transmitted beginning at pixel 0,0, proceeding row-by-row. Each pixel is represented by three bytes (24 bits), with the first bit being Blue, the second bit being Green and the third bit is Red.

Header Format

Data Type | Property Name | Description
unsigned integer 32 bits | Length; | // length of packet including raw img // data, excluding 'Length' itself.
unsigned integer 16 bits | Offset; | // offset from 'Ver' field to the raw image pixel data.
unsigned integer 16 bits | Ver; | // version = 0.
unsigned integer 16 bits | ImgHigh,ImgWide; | // original high x wide in pixels.
unsigned integer 16 bits | Row,Col; | // row & col of upper-left corner for // this page, in original image scale.
unsigned integer 16 bits | High,Wide; | // high & wide of this page in pixel.
unsigned integer 16 bits | Rsub, Csub; | // image sub-sampling rate.
unsigned integer 16 bits | CellRow,CellCol; | // cell-coordinates for the image. 0.0 for cell A0.
unsigned integer 16 bits | RowIdx,ColIdx; | // interleaved index = 0.0 (for future use).
unsigned integer 32 bits | Color; | // RGB bits - should be 0 for greyscale, 1 for Bayer or 4 for 24-bit color.
unsigned integer 32 bits | AcqSeqNum; | // Acquisition Sequence Number
unsigned integer 32 bits | Rsrvd[1]; | // reserved.
signed character 8 bits | Tag[16]; | // optional tag string - null // terminated (for future use).

SetWatch


SetWatch

Sends the values of a specified range of cells to the DataChannel when the spreadsheet is updated. For more information, see DataChannel Communications.

Note: The SetWatch function does not appear in the list of functions within the Insert Function dialog; it must be typed in manually.

Inputs

Syntax: SetWatch(Upper-Left-Cell,Lower-Right-Cell,Mode)

Parameter Description

Upper-Left-Cell

Specifies upper left-most cell within the range of cells.

Lower-Right-Cell

Specifies lower right-most cell within the range of cells.

Mode

Specifies when data is sent to the DataChannel after the spreadsheet is updated.

0 = disable | Disable the function.
1 = if changed | Send data only when the spreadsheet has been modified.
2 = always | Always send data.

Outputs

Returns the value of the selected Mode.


EtherNet/IP Communications

EtherNet/IP is an application level protocol used by Rockwell ControlLogix and CompactLogix PLCs, and is implemented on top of the Ethernet TCP/IP and UDP/IP layers. It shares its object model with ControlNet and DeviceNet through the common Control and Information Protocol (CIP). This protocol allows the transfer of data and I/O signals over Ethernet.

Implicit vs. Explicit Messages

There are two ways of communicating using EtherNet IP: implicit messages and explicit messages. In-Sight vision systems support explicit or implicit messages from a single I/O client (a PLC device communicating with a host vision system) at any given time.

Implicit Messages Explicit Messages
  • Transmit time-critical application specific I/O data, and can be point-to-point or multicast.
  • Uses the UDP/IP protocol layer.
  • Data is pre-defined at the time of connection, which in turn minimizes the processing time of the node during run-time.
  • The data field contains only real-time data.
  • Short, occupying low-overhead, which allows for the time-critical performance.
  • Receiving measurement data from a tool in a vision inspection is an example of an operation suited to implicit messages.
  • Require a response from the receiving device and is point-to-point.
  • Uses the TCP/IP protocol layer.
  • Messages in which the data field carries both protocol information and instructions for service performance
  • Nodes must interpret each message, execute the requested task and generate responses. These types of messages are typically used to transmit configuration, diagnostic and event data.
  • Better suited for operations that occur less frequently.

  • An instruction to change an In-Sight Explorer job is an example of an operation suited to explicit messages.

In-Sight Object Model and Input/Output Assembly Objects

The In-Sight Object Model and Input/Output Assembly Object layout and configuration is dependent on the In-Sight firmware:

  • EtherNet/IP Object Model and Input/Output Assembly Objects
  • EtherNet/IP Object Model and Input/Output Assembly Objects

Requested Packet Intervals (RPI)

The Requested Packet Interval (RPI) determines how fast the cyclic data packets are exchanged between controller and I/O module, and are typically entered in milliseconds (ms). Sensors accept RPI values in 1 to 15 ms intervals for the first 15 ms. For RPI values greater than 15, sensors will accept values in 5 ms increments. For values between 16 and 20, data will be exchanged in 20 ms increments. For values between 21 and 25, data will be exchanged in 25 ms increments.

This applies to 4.x and 5.x firmware versions.

Install the EDS Files

Communicate with a Rockwell ControlLogix PLC

Communicate with a Rockwell SLC 5/05 PLC


Install the EDS Files

Electronic Data Sheets (EDS) are text files used by various network configuration tools, such as Rockwell Software's RSLinx™, to identify In-Sight vision systems on a network. These EDS files are then imported into the appropriate software.

This example will walk through integrating Cognex EDS files with Rockwell Software's RSLinx. To correctly identify In-Sight sensors within RSLinx, perform the following:

  1. Click Start > All Programs > Rockwell Software > RSLinx > Tools > EDS Hardware Installation Tool.

  2. Click Add.

  3. Select Register a directory of EDS files. Next, click the Browse button to navigate to the EDS subdirectory of the In-Sight Software installation directory. The default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Factory Protocol Description\EDS. Click Next.

  4. Click Next.

  5. Click Next.

  6. Click Next.

  7. Click Finish.

  8. Click Exit to terminate the Hardware Installation Tool.


Communicate with a Rockwell ControlLogix PLC

This section describes how to transfer data between an In-Sight vision system and a ControlLogix or CompactLogix PLC on an EtherNet/IP network, using Rockwell RSLogix 5000 software. For more information, see EtherNet/IP Communications.

Integration with RSLogix 5000

The steps to configure an implicit connection and transfer of data depend on the In-Sight firmware version installed to the vision system, and the version of RSLogix 5000 software.

RSLogix 5000, Version 15+, Using Add-On Profile (AOP) Version 1.28

Note: To use Add-On Profile (AOP) version 1.28 of the profile, you must first install the RSLogix 5000 version 15 or later. This version provides AOP support to the next generation models: In-Sight 2000 series vision sensors, In-Sight 57xx, In-Sight 8000 and In-Sight 7000 Gen2 series vision systems, as well as the legacy In-Sight models.

RSLogix 5000, Version 15-19

RSLogix 5000, Version 20+, Using Generic or EDS Generated Profile:

EDS Generated Profile or Add-On Profile (AOP)

EDS Generated Profile

Electronic Data Sheets (EDS) are text files used by various network configuration tools to identify In-Sight vision systems on a network. You can use EDS files with any EtherNet/IP device. In-Sight EDS files are installed with In-Sight Explorer software in the Factory Protocol Files folder:

These EDS files are then imported into the appropriate software. For more information using the EDS or Generic Module, refer to Establish the Connection Using the EDS Generated Profile or Establish the Connection Using a Generic ETHERNET-MODULE.

For EDS installation information, see Install the EDS Files.

Add-On Profile (AOP)

RSLogix 5000 software supports using Add-On Profile (AOP) which allows configuration of EtherNet/IP enabled devices to communicate with Rockwell ControlLogix and CompactLogix PLCs. The user interface for Add-On Profile (AOP) provides enumerated access to the configuration and status data with full range checking. Data entered is validated to ensure that selections made are correct and consistent with the desired setup. The Add-On Profile (AOP) understands the structure of I/O and configuration data and creates tags using names assigned to the device in RSLogix 5000. There is a complete enumeration of the tag to differentiate the data visibly, and all data is available using the tag name.

The In-Sight Add-On Profile (AOP) installer is available from the In-Sight support site. The current version 1.28 supports all In-Sight vision systems including the new next-generation models (In-Sight 2000 series vision sensors, In-Sight 8000 and In-Sight 7000 Gen2 series vision systems). For more information, see Install the Add-On Profile.

Note:
  • The Add-On Profile (AOP) installs Major Revision 11 for In-Sight 2000 series vision sensors, In-Sight 57xx, In-Sight 7000 Gen2 series, and In-Sight 8000 series vision systems, and Major Revision 12 for all legacy models (In-Sight 1000, In-Sight 5000 and In-Sight 70xx-74xx series vision systems).
  • The Add-On Profile (AOP) version 1.28 with Major Revision 12 supports TestRun bits on the legacy models.
  • If the Add-On Profile (AOP) is installed, the In-Sight vision systems will hide the EDS generated profile.
  • While the latest In-Sight Add-On Profile (AOP) contains all the contents from previous revisions and does not break compatibility with existing applications, whether or not the connection will be established is tied to the Major Revision field in the Add-On Profile (AOP).


EtherNet/IP Object Model and Input/Output Assembly Objects

This topic covers the In-Sight Object Model for In-Sight vision systems running In-Sight 4.x.x and earlier firmware. For a complete list of models and supported firmware versions, see Firmware Versions.

In-Sight Object Model

In EtherNet/IP networks, In-Sight vision systems act as servers, with support for both explicit and implicit I/O messaging. Data from inspections, for instance, can be transferred to clients via explicit messages or through implicit connections. Implicit connections can also be used to control acquisitions, triggers and spreadsheet events.

The Identity Object, Ethernet Link Object, TCP/IP Object and the Other Internal Objects are required by the EtherNet/IP specification. The different instances of the Assembly Object are used to exchange application data with EtherNet/IP clients. The Vision Object is defined by the In-Sight System to provide information specific to In-Sight vision systems. The details for how this occurs are provided in the Vision Object Attributes and Services section. The current object model provided by In-Sight vision systems is illustrated in the following figure:

  • Assembly Object: The Assembly Object binds attributes of multiple objects, which allows data to and from each object to be sent or received over a single connection. Assembly Objects can be used to bind input data or output data. The terms "input" and "output" are defined from the network's point of view. An "input" will produce data on the network and an "output" will consume data from the network.
  • Identity Object: This object provides identification of, and general information about, the device.
  • Ethernet Link Object: The Ethernet Link Object maintains link-specific counters and status information for an Ethernet 802.3 communications interface.
  • TCP/IP Object: The TCP/IP Object provides a mechanism to query and possibly configure a device's TCP/IP network interface configuration. Examples of items of interest include a device's IP Address, Network Mask and Gateway Address.
  • Vision Object: The Vision Object contains all of the services and attributes specific to In-Sight vision systems. This includes acquisition, inspection, job change-over and communications with the In-Sight Explorer spreadsheet.

Input and Output Assembly Objects

The I/O Assembly data attribute for the input and output data has the following formats:

Firmware Version | Input Assembly Instance | Output Assembly Instance
4.1.0 - 4.7.4 | 11 | 21
4.8.0 - 4.9.x | 12 | 21
4.10.x | 12 | 21
Note:
  • If using the Input Assembly Instance 12 that contains the Job Pass, Exposure Complete and Current Job ID (16-bit integer) blocks, the In-Sight Add-On Profile (AOP), with Major Revision 10 must be installed on the PC with RSLogix. For more information, see Establish the Connection Using the Add-On Profile
  • If using an EDS generated profile, although the maximum size of the Input Assembly is 500 bytes, the EDS generated profile will only allow a connection of up to 496 bytes.
  • When using Rockwell RSLogix Studio 5000, version 21 through 25, the In-Sight EDS generated profile’s default Input and Output Assembly sizes (496 bytes for each) cannot be edited and will default to the largest Input and Output Assembly sizes.
  • The Acquisition ID will increment at the end of acquisition and moves along with the image to inspection subsystem. It can be updated in the PLC depending on the RPI before the inspection is completed. The Inspection ID increments when the Inspection Completed bit toggles (at which time the Results Valid is set high and the Inspecting bit goes low).
  • For differences in the Input and Output Assembly tables when upgrading In-Sight firmware from In-Sight 4.9.x to 4.10.x, see Input/Output Assembly Changes
Closed I/O Assembly Data Attribute Format - In-Sight Firmware Version 4.10.x

Input Assemblies - Instance 12

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
12 | 0 | Online | Offline Reason |  |  | Missed Acq | Acquiring | Trigger Ack | Trigger Ready
 | 1 | Reserved | Command Failed | Command Completed | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | Inspecting
 | 2 | Reserved
 | 3 | Reserved |  | Test Run Ready | Job Pass | Exposure Complete | Reserved
 | 4 | Current Job ID (16-bit integer)
 | 5
 | 6 | Acquisition ID (16-bit integer)
 | 7
 | 8 | Inspection ID (16-bit integer)
 | 9
 | 10 | Inspection Result Code (16-bit integer)
 | 11
 | 12 | Inspection Results 0
 | ... |
 | 499 | Inspection Results 487

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6 - 4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 | Missed Acq | Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
2 | Acquiring | Set when the In-Sight vision system is currently acquiring an image; either by setting the Trigger bit or by an external hardware trigger.
1 | Trigger Ack | Indicates when the In-Sight vision system has been triggered by setting the Trigger bit; this bit will stay set until the Trigger bit is cleared.
0 Trigger Ready

Indicates when the In-Sight vision system can accept a new trigger. This bit is high when the vision system is Online, the Trigger Enable bit is set and the vision system is not currently acquiring an image.

The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

Byte 1

Bit | Name | Description
7 | Reserved | Unused.
6 | Command Failed (4.10.x) | This bit is set to 1 to indicate that the TestRun execution or Job Load has failed to run to completion. It is cleared when a new TestRun sequence is executed or a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change.
5 | Command Completed (4.10.x) | This bit is toggled to indicate that the TestRun execution or Job Load has completed. Note: An attempt to execute TestRun on a Job without a TestRun configuration will result in the CommandCompleted being toggled and the CommandFailed being set. TestRun should not be executed if TestRunReady is not set.
4 | Command Executing (4.10.x) | This bit is set to 1 when a TestRun or Job Load is started. Cleared when TestRun execution completes. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.
3 | Results Valid | Set when the Inspection ID, Inspection Result and Inspection Results fields are valid. Note: This bit indicates that inspection results are ready to be read.
2 | Results Buffer Overrun | This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. Note: This bit indicates that results are ready to read when Buffer Results Enable bit is not enabled/set.
0 | Inspecting | This bit is set when the In-Sight vision system is executing spreadsheet functions.

Byte 2

Name | Description
Reserved | Unused.

Byte 3

Bit | Name | Description
7 - 6 | Reserved | Unused.
5 TestRun Ready (4.10.x)

This bit is set to 1 when the Vision System has a valid TestRun configuration. This signal is cleared while TestRun executes (regardless of the TestRun initiator) and returns to 1 after execution completes.

Note:

  • This bit is signaled regardless of whether the vision system is online or offline.

  • Initiating TestRun by an external device is NOT supported on vision systems running In-Sight firmware 5.1.0 to 5.5.x.
4 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.
Note: To use this bit, use Major Revision 10 or higher.
3 Exposure Complete This bit is set upon the completion of the In-Sight vision system's exposure period, and is cleared when an acquisition is triggered. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.
Note: To use this bit, use Major Revision 10 or higher.
2 ‑ 0 | Reserved | Unused.

Byte 4-5

Name | Description
Current Job ID (16-bit Integer) | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Byte 6-7

Name | Description
Acquisition ID (16-bit Integer) | This ID increments on the completion of every acquisition regardless of the trigger source, and can be used to synchronize an Acquisition with its Inspection Results.

Byte 8-9

Name | Description
Inspection ID (16-bit Integer) | The acquisition ID associated with this set of results. This value increments once each inspection cycle at the arrival of new results.

Byte 10-11

Name Description
Inspection Result Code (16-bit integer) (4.10.x)

Indicates the result of the latest TestRun execution. If all tests pass, the bit 0 will be set. If one or more tests do not pass, or if there is a problem with the Setup or Cleanup during the TestRun, the bit 0 will be cleared.

  • This field is only valid following a successful TestRun.
  • The results in this field can become invalidated if a Job without a TestRun is loaded, another TestRun job is executed, a TestRun is in progress, TestRun or job load has failed or a TestRun is aborted.
  • If the vision system is currently set to Online, the content of this field is driven by the spreadsheet and does not have any TestRun meaning.

Byte 12-499

Name Description
Inspection Results (0 - 487)

This is the data that is written from In-Sight Explorer, via the WriteEIPBuffer function in the Spreadsheet View, or the Format Output Data tab in the Communications Step of the EasyBuilder GUI. For more information, see WriteEIPBuffer.

The data sent will be written exactly as it appears in the In-Sight Explorer GUI, i.e. the bits appear in the same order as they are defined in the FormatOutputBuffer function (Spreadsheet) or the Format Output Data tab (EasyBuilder).

Note: When the Inspection Results data array is received, RSLogix 5000 will assign a single data type to the entire array, regardless if the data that was sent contained multiple data types (i.e. the formatted data contained integers, floating point and/or bits). Therefore, if the data being sent contains different data types, copy the particular result (starting with the byte offset in the Inspection Results array, and the length, in bytes), into a User-Defined Data Type in RSLogix, based on the expected data type being sent. For more information, see EXAMPLE: Getting Floating Point Value Data from an In-Sight Vision System.

Output Assemblies - Instance 21

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
21 | 0 | Force Offline | Reserved |  | Execute Command | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
 | 2 | Command
 | 3
 | 4 | User Data 0
 | ... |
 | 495 | User Data 491

Byte 0

Bit | Name | Description
7 Force Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6 - 5 | Reserved | Unused.
4 | Execute Command (4.10.x) | When set, the vision system loads the job ID specified in the Command field. When using TestRun, the rising edge of this signal will execute command to start TestRun. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (prior to Command Complete) is interpreted as an abort request.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the Inspection ID, Inspection Result and Inspection Results data.
2 | Buffer Results Enable | Set this bit to hold the Inspection ID, Inspection Result and Inspection Results fields constant while the ResultsValid bit is set. Set the Inspection Results Ack bit to acknowledge them. The In-Sight vision system responds to the acknowledgement by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared, Results Valid remains cleared until new results are sent to the PLC.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.

  • The AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet. For more information, see AcquireImage.

    Note: The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this field to disable the EtherNet/IP triggering mechanism. This bit only affects triggering done via Ethernet/IP, and does not affect any other triggering mode.

Byte 1

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Byte 2-3

Byte | Name | Description
2 - 3 | Command (4.10.x) | This value indicates the TestRun sequence to execute or the ID number (1-999) of the job to load when the Execute Command bit is set by the PLC. 0x1007 = Execute TestRun 0x0000 – 0x03E7 = Job IDs

Byte 4-495

Byte | Name | Description
4 -495 | User Data (0 - 491) | This data is sent to the In-Sight Explorer spreadsheet via the ReadEIPBuffer function. The buffer is written exactly as it appears in the PLC, with the bits appearing in the same order as they are defined in RSLogix 5000.
Closed I/O Assembly Data Attribute Format - In-Sight Firmware Version 4.8.0 - 4.9.x

Input Assemblies - Instance 12

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
12 | 0 | Online | Offline Reason |  |  | Missed Acq | Acquiring | Trigger Ack | Trigger Ready
 | 1 | Reserved | Job Load Failed | Job Load Completed | Job Loading | Results Valid | Results Buffer Overrun | Inspection Completed | Inspecting
 | 2 | Reserved
 | 3 | Reserved |  |  | Job Pass | Exposure Complete | Reserved
 | 4 | Current Job ID (16-bit integer)
 | 5
 | 6 | Acquisition ID (16-bit integer)
 | 7
 | 8 | Inspection ID (16-bit integer)
 | 9
 | 10 | Inspection Result (16-bit integer)
 | 11
 | 12 | Inspection Results 0
 | ... |
 | 499 | Inspection Results 487

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6 - 4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 | Missed Acq | Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
2 | Acquiring | Set when the In-Sight vision system is currently acquiring an image; either by setting the Trigger bit or by an external hardware trigger.
1 | Trigger Ack | Indicates when the In-Sight vision system has been triggered by setting the Trigger bit; this bit will stay set until the Trigger bit is cleared.
0 | Trigger Ready | Indicates when the In-Sight vision system can accept a new trigger. This bit is high when the vision system is Online, the Trigger Enable bit is set and the vision system is not currently acquiring an image.

Byte 1

Bit | Name | Description
7 | Reserved | Unused.
6 | Job Load Failed | This bit is set when the last job load attempt failed. It is cleared the next time a job is successfully loaded. Note: This bit only functions when the job load was initiated by the PLC using EtherNet/IP.
5 | Job Load Completed | This bit is toggled upon the completion of a job load operation. Note: This bit only functions when the job load was initiated by the PLC using EtherNet/IP.
4 | Job Loading | This bit is set when loading a new job. Note: This bit only functions when the job load was initiated by the PLC using EtherNet/IP.
3 | Results Valid | Set when the Inspection ID, Inspection Result and Inspection Results fields are valid. Note: This bit indicates that inspection results are ready to be read.
2 | Results Buffer Overrun | This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. Note: This bit indicates that results are ready to read when Buffer Results Enable bit is not enabled/set.
0 | Inspecting | This bit is set when the In-Sight vision system is executing spreadsheet functions.

Byte 2

Name | Description
Reserved | Unused.

Byte 3

Bit | Name | Description
7 - 6 | Reserved | Unused.
5 | Reserved | Unused.
4 | Job Pass | This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass. Note: To use this bit, use Major Revision 10 or higher.
3 | Exposure Complete | This bit is set upon the completion of the In-Sight vision system's exposure period, and is cleared when an acquisition is triggered. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High. Note: To use this bit, use Major Revision 10 or higher.
2 - 0 | Reserved | Unused.

Byte 4-5

Name | Description
Current Job ID (16-bit Integer) | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Byte 6-7

Name | Description
Acquisition ID (16-bit Integer) | This ID increments on the completion of every acquisition regardless of the trigger source, and can be used to synchronize an Acquisition with its Inspection Results.

Byte 8-9

Name | Description
Inspection ID (16-bit Integer) | The acquisition ID associated with this set of results. This value increments once each inspection cycle at the arrival of new results.

Byte 10-11

Name | Description
Inspection Result (16-bit Integer) | The pass/fail code that is associated with this set of results. This value cannot be set and is always 0.

Byte 12-499

Name Description
Inspection Results (0 - 487)

This is the data that is written from In-Sight Explorer, via the WriteEIPBuffer function in the Spreadsheet View, or the Format Output Data tab in the Communications Step of the EasyBuilder GUI. For more information, see WriteEIPBuffer.

The data sent will be written exactly as it appears in the In-Sight Explorer GUI, i.e. the bits appear in the same order as they are defined in the FormatOutputBuffer function (Spreadsheet) or the Format Output Data tab (EasyBuilder).

Note: When the Inspection Results data array is received, RSLogix 5000 will assign a single data type to the entire array, regardless if the data that was sent contained multiple data types (i.e. the formatted data contained integers, floating point and/or bits). Therefore, if the data being sent contains different data types, copy the particular result (starting with the byte offset in the Inspection Results array, and the length, in bytes), into a User-Defined Data Type in RSLogix, based on the expected data type being sent. For more information, see EXAMPLE: Getting Floating Point Value Data from an In-Sight Vision System.

Output Assemblies - Instance 21

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
21 | 0 | Force Offline | Reserved | Reserved | Initiate Job Load | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
 | 2 | Job Load ID
 | 3
 | 4 | User Data 0
 | ... |
 | 495 | User Data 491

Byte 0

Bit | Name | Description
7 Force Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6 - 5 | Reserved | Unused.
4 Initiate
Job
Load (4.9.x and earlier) 		When set, the vision system loads the job ID specified in the Job Load ID field.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the Inspection ID, Inspection Result and Inspection Results data.
2 | Buffer Results Enable | Set this bit to hold the Inspection ID, Inspection Result and Inspection Results fields constant while the ResultsValid bit is set. Set the Inspection Results Ack bit to acknowledge them. The In-Sight vision system responds to the acknowledgement by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared, Results Valid remains cleared until new results are sent to the PLC.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet. For more information, see AcquireImage.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this field to disable the EtherNet/IP triggering mechanism. This bit only affects triggering done via Ethernet/IP, and does not affect any other triggering mode.

Byte 1

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Byte 2-3

Byte | Name | Description
2-3 | Job Load ID (4.9.x and earlier) | The ID number (1-999) of the job to load when the Initiate Job Load bit is set by the PLC.

Byte 4-495

Byte | Name | Description
4 -495 | User Data (0 - 491) | This data is sent to the In-Sight Explorer spreadsheet via the ReadEIPBuffer function. The buffer is written exactly as it appears in the PLC, with the bits appearing in the same order as they are defined in RSLogix 5000.
Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.
Closed I/O Assembly Data Attribute Format - In-Sight Firmware Version 4.1.0 - 4.7.4

Input Assemblies - Instance 11

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
11 | 0 | Online | Offline Reason |  |  | Missed Acq | Acquiring | Trigger Ack | Trigger Ready
 | 1 | Reserved | Job Load Failed | Job Load Completed | Job Loading | Results Valid | Results Buffer Overrun | Inspection Completed | Inspecting
 | 2 | Acquisition ID (16-bit integer)
 | 3
 | 4 | Inspection ID (16-bit integer)
 | 5
 | 6 | Inspection Result (16-bit integer)
 | 7
 | 8 | Inspection Results 0
 | ... |
 | 499 | Inspection Results 491

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6 - 4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 | Missed Acq | Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
2 | Acquiring | Set when the In-Sight vision system is currently acquiring an image; either by setting the Trigger bit or by an external hardware trigger.
1 | Trigger Ack | Indicates when the In-Sight vision system has been triggered by setting the Trigger bit; this bit will stay set until the Trigger bit is cleared.
0 | Trigger Ready | Indicates when the In-Sight vision system can accept a new trigger. This bit is high when the vision system is Online, the Trigger Enable bit is set and the vision system is not currently acquiring an image.

Byte 1

Bit | Name | Description
7 | Reserved | Unused.
6 | Job Load Failed | This bit is set when the last job load attempt failed. It is cleared the next time a job is successfully loaded. Note: This bit only functions when the job load was initiated by the PLC using EtherNet/IP.
5 | Job Load Completed | This bit is toggled upon the completion of a job load operation. Note: This bit only functions when the job load was initiated by the PLC using EtherNet/IP.
4 | Job Loading | This bit is set when loading a new job. Note: This bit only functions when the job load was initiated by the PLC using EtherNet/IP.
3 | Results Valid | Set when the Inspection ID, Inspection Result and Inspection Results fields are valid. Note: Use this bit to indicate that inspection results are ready to be read.
2 | Results Buffer Overrun | This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit.
1 | Inspection Completed | This bit is toggled on the completion of an inspection. Note: Use this bit to indicate that results are ready to read. Use ResultsValid to determine when to read data.
0 | Inspecting | This bit is set when the In-Sight vision system is executing spreadsheet functions.

Byte 2-3

Name | Description
Acquisition ID (16-bit Integer) | This ID increments on the completion of every acquisition regardless of the trigger source, and can be used to synchronize an Acquisition with its Inspection Results.

Byte 4-5

Name | Description
Inspection ID (16-bit Integer) | The acquisition ID associated with this set of results. This value increments once each inspection cycle at the arrival of new results.

Byte 6-7

Name | Description
Inspection Result (16-bit Integer) | The pass/fail code that is associated with this set of results. This value cannot be set and is always 0.

Byte 8-499

Name | Description
Inspection Results (0 - 491) | The inspection results set by the WriteEIPBuffer function in the In-Sight Explorer spreadsheet or Ethernet/IP Communications tab in EasyBuilder. The buffer is written exactly as it appears in the In-Sight spreadsheet, with the bits appearing in the same order as they are defined in the FormatOutputBuffer function (Spreadsheet) or Format Outputs tab (EasyBuilder).

Output Assemblies - Instance 21

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
21 | 0 | Force Offline | Reserved | Reserved | Initiate Job Load | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
 | 2 | Job Load ID
 | 3
 | 4 | User Data 0
 | ... |
 | 495 | User Data 491

Byte 0

Bit | Name | Description
7 Force Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6 - 5 | Reserved | Unused.
4 Initiate
Job
Load (4.9.x and earlier) 		When set, the vision system loads the job ID specified in the Job Load ID field.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the Inspection ID, Inspection Result and Inspection Results data.
2 | Buffer Results Enable | Set this bit to hold the Inspection ID, Inspection Result and Inspection Results fields constant while the ResultsValid bit is set. Set the Inspection Results Ack bit to acknowledge them. The In-Sight vision system responds to the acknowledgement by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared, Results Valid remains cleared until new results are sent to the PLC.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet. For more information, see AcquireImage.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this field to disable the EtherNet/IP triggering mechanism. This bit only affects triggering done via Ethernet/IP, and does not affect any other triggering mode.

Byte 1

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Byte 2-3

Byte | Name | Description
2-3 | Job Load ID (4.9.x and earlier) | The ID number (1-999) of the job to load when the Initiate Job Load bit is set by the PLC.

Byte 4-495

Byte | Name | Description
4 -495 | User Data (0 - 491) | This data is sent to the In-Sight Explorer spreadsheet via the ReadEIPBuffer function. The buffer is written exactly as it appears in the PLC, with the bits appearing in the same order as they are defined in RSLogix 5000.
Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Mapping of I/O Assembly Data Attribute Components

The following table indicates the I/O Assembly Data attribute mapping for In-Sight vision systems:

Data Component Name | Class |  | Instance Number | Attribute
 | Name | Number |  | Name | Number
Set Offline | Vision | 78 Hex | 1 | ForceOffline | 8
Trigger Enable | Vision | 78 Hex | 1 | AcqTriggerEnable | 9
Trigger | Vision | 78 Hex | 1 | AcqTrigger | 10
BufferResultsEnable | Vision | 78 Hex | 1 | BufferResultsEnable | 13
Soft Event N | Vision | 78 Hex | 1 | SoftTrigger bit N | 18
Online | Vision | 78 Hex | 1 | Online | 6
OfflineReason | Vision | 78 Hex | 1 | OfflineReason | 7
Trigger Ready Trigger Ack Exposure Complete Missed Acquisition | Vision | 78 Hex | 1 | AcqStatusRegister | 11
User Data | Vision | 78 Hex | 1 | User Data | 12
System Busy Inspection Completed Results Buffer Overrun Results Valid | Vision | 78 Hex | 1 | InspectionStatusRegister | 14
Inspection ID Inspection Data | Vision | 78 Hex | 1 | InspectionResults | 16

Vision Object Attributes

This section describes the various attributes and services that exist in the EtherNet/IP Vision Object.

Note: Class Code: 78 Hex - This object models all operations available to the In-Sight vision system running In-Sight 4.x.x and earlier firmware.

Instance Attributes

Attribute ID | Access Rule | Name | Data Type | Description of Attribute
6 | Get | Online | BOOL | 0 = Offline 1 = Online
7 | Get | OfflineReason | BYTE | 0 = Online 1 = Programming 2 = Discrete Offline 3 = Comm. Offline 4-255 = Reserved
8 | Set | ForceOffline | BOOL | 1 = Force the In-Sight vision system Offline.
9 | Set | AcqTriggerEnable | BOOL | 0 = Acquisition Trigger is disabled. Trigger Ack is reset to 0. 1 = Acquisition Trigger is enabled.
10 | Set | AcqTrigger | BOOL | When AcqTriggerEnable is True, the In-Sight vision system will acquire an image when AcqTrigger changes from 0 to 1.
11 | Get | AcqStatusRegister | BYTE | Bit 0: Trigger Ready Bit 1: Trigger Ack Bit 2: Acquiring Bit 3: Missed Acquisition Bit 4-7: Reserved
12 | Set | UserData | ARRAY of BYTE | User defined data that may be used as an input to the inspection. Note: For In-Sight vision systems running In-Sight firmware 4.x.x, data written to the UserData attribute appears when written.
13 | Set | BufferResultsEnable | BOOL | When BufferResultsEnable is True, it enables buffering of inspection results until the ResultsAck attribute is set to True.
14 | Get | InspectionStatusRegister | BYTE | Bit 0: Inspecting Bit 1: Inspection Completed Bit 2: Results Buffer Overrun Bit 3: Results Valid Bit 4: Job Loading Bit 5: Job Load Completed Bit 6: Job Load Failed Bit 7: Reserved
15 | Set | InspectionResultsAck | BOOL | Acknowledges that the client received the inspection results.
16 | Get | InspectionResults | STRUCT of | The last inspection results.
 |  | InspectionID | UINT | Inspection counter.
 |  | Reserved | UINT | Reserved field.
 |  | InspectionResults | ARRAY of BYTE | Results from the last inspection.
18 | Set | SoftTrigger | BYTE | Bit 0: Soft Trigger 0 Bit 1: Soft Trigger 1 Bit 2: Soft Trigger 2 Bit 3: Soft Trigger 3 Bit 4: Soft Trigger 4 Bit 5: Soft Trigger 5 Bit 6: Soft Trigger 6 Bit 7: Soft Trigger 7
19 | Set | JobID | INT | The ID number of the currently loaded job, or -1 if the current job does not have an ID. Setting this value (between 0 and 999) will load the job with that associated ID.
20 | Set | JobName | STRING | The file name of the currently loaded job, or an empty string if the file name is unknown. Setting this value will load the job with that associated file name.

Online Attributes

The Online Attributes indicate whether or not an In-Sight vision system is in an Online or Offline state. When the In-Sight vision system is Offline, the OfflineReason attribute can be used to determine the reason as to why the In-Sight vision system is Offline.

OfflineReason Attribute Values

Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.

The ForceOffline attribute can be used to force the In-Sight vision system into an Offline state. When the ForceOffline attribute is set to True, the OfflineReason attribute will be set to Comm. Offline, if the In-Sight vision system is being held Offline for no other reason.

Acquisition Attributes

Note: If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

The Vision Object can be triggered to acquire images by using the Acquisition Attributes. In order to reset the Acquisition Attributes in the Vision Object, the AcqTriggerEnable attribute must be set to False, until the AcqStatusRegister is 0. Then, the AcqTriggerEnable attribute can be set to True to enable acquisition via the Vision Object. When the Acquisition Trigger is ready to accept triggers, the Trigger Ready bit in the AcqStatusRegister will be set.

While the AcqTriggerEnable attribute is set to True, each time the Vision Object sees the AcqTrigger attribute change from 0 to 1, it will initiate an image acquisition. When setting this via implicit messaging, to guarantee that the change is seen by the Vision Object, the attribute should be held in the changed state until that same value is seen by the Trigger Ack bit of the AcqStatusRegister.

Note: This is not necessary when using explicit messaging, because the change will always be seen.

During an acquisition, the Trigger Ready bit in the AcqStatusRegister will be cleared and the Acquiring bit will be set. When the acquisition is completed, the Acquiring bit will be cleared; and once the acquisition system is ready to begin a new image acquisition, the Trigger Ready bit will again be set.

If other methods of acquisition triggering are employed, the Exposure Complete and Missed Acquisition bits of the AcqStatusRegister will still be active.

Inspection Results Attributes

When an image is acquired as a result of an acquisition trigger, it is placed in a queue for inspection. As the inspection is running on the image, the Inspecting bit of the InspectionStatusRegister is set. Once the inspection is completed, the Inspecting bit is cleared and the Inspection Completed bit is toggled.

The BufferResultsEnable attribute determines how inspection results are handled in the Vision Object. If the BufferResultsEnable attribute is set to False, then the inspection results are immediately placed into the InspectionResults attribute.

If the BufferResultsEnable attribute is set to True, then the previous inspection results remain in the InspectionResults attribute until they are acknowledged by setting the InspectionResultsAck attribute to True. Once the Results Valid bit is cleared, the InspectionResultsAck attribute should be set to False to allow new results to be placed in to the InspectionResults attribute. This can be used to establish a handshake to obtain results between the Vision Object and the client.

Behavior of InspectionStatusRegister

Inspection Status Register Bit | Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
0 | Inspecting | Set when inspecting an image. | Set when inspecting an image.
1 | Inspection Completed | Toggled on completion of an inspection. | Toggled on completion of an inspection.
2 | Results Buffer Overrun | Always cleared. | Set when inspection results could not be queued because the client has failed to acknowledge a previous result. Cleared when the inspection result is successfully queued.
3 | Results Valid | Cleared when an inspection begins; set when an inspection is completed. | Set when new results are placed in the InspectionResults attribute. Stays set until the results are acknowledged by setting the InspectionResultsAck attribute to True.
4 | Job Pass* | Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. Note: The Job Pass bit will be valid prior to toggling the Inspection Completed bit. | Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared. Note: The Job Pass bit will be valid prior to the Results Valid bit being set.
*Job Pass bit is only included in Major Revision 10 and later.

Job Attributes

The Vision Object can load jobs stored in the non-volatile flash memory of an In-Sight vision system by setting the JobID and JobName attributes. If the load fails, the set operation will also fail.

Vision Object Services

Common Services

The Vision Object provides the following Common Services:

Service Code | Service Name | Description of Service
05 Hex | Reset | Resets the Vision Object
0E Hex | Get_Attribute_Single | Returns the contents of the specified attribute.
10 Hex | Set_Attribute_Single | Modifies an attribute value.

Reset Service

The Reset Service will reset and disable the acquisition triggering system in the Vision Object. It will also disable and clear the inspection results buffering system in the Vision Object.

Object Specific Services

The Vision Object provides the following Object Specific Services:

Service Code | Service Name | Description of Service
32 Hex | Acquire | Triggers a single acquisition.
33 Hex | Reserved | Deprecated.
34 Hex | SendNativeCmd | Sends a Native Mode command to the In-Sight vision system.
35 Hex | GetInspectionResults | Gets the InspectionResults attribute.
36 Hex | Transfer User Data | Transfers data into a portion of the User Data Holding Buffer. For more information, see User Data Holding Buffer.
37 Hex | Set User Data | Indicates to the vision system that it should latch the User Data Holding Buffer into the User Data field to give the In-Sight access to the user data.

Acquire Service

The Acquire Service of the Vision Object will cause an acquisition to be triggered, if the acquisition system is ready to acquire an image. If the acquisition could not be triggered, then the Missed Acquisition bit of the AcqStatusRegister will be set until the next successful acquisition.

If the command fails, the Acquire Service will return the vendor specific error code 1F.

SendNativeCmd Service

The SendNativeCmd Service sends any documented Native Mode command string to the In-Sight vision system. The request data for the SendNativeCmd should include the Native Mode command string that is to be sent to the In-Sight vision system; the reply data will contain the string result of the Native Mode command. For more information, see Native Mode Communications.

SendNativeCmd Request Data Format

Name | Type | Description
Command | STRING | The Native Mode command to process.

SendNativeCmd Response Data Format

Name | Type | Description
Result | STRING | The string result of the Native Mode command.

If the command fails, the service will return one of the following vendor specific error codes:

Error Code | Description | Native Mode Return Code
1 | Bad Command | -
4 | No Answer - The system is too busy. |
100 | Command Failed | 0
101 | Command Cannot Be Executed | -1
102 |  | -2
103 |  | -3
104 |  | -4
105 |  | -5
106 |  | -6

GetInspectionResults Service

The GetInspectionResults Service (code 0x35) reads data from the InspectionResults attribute of the Vision Object.

GetInspectionResults Request Data Format

Name | Type | Description
Size | UINT | The number of bytes of the InspectionResults attribute to read.
Offset | UINT | The offset into the InspectionResults attribute. This specifies the first byte of the InspectionResults attribute to read.

GetInspectionResults Response Data Format

Name | Type | Description
Data | Array of BYTE | The InspectionResults attribute data.

Transfer User Data Command

This command is used to transfer data into a portion of the User Data Holding Buffer. The User Data Holding Buffer will be latched to the User Data field when the Set User Data command is issued.

Request Format

Name | Type | Description
Size | UINT | The number of bytes of the User Data field to write.
Offset | UINT | The offset into the User Data field.
Data | Array of BYTE | User Data to write into the User Data field.

Set User Data Command

This command is used by the PLC to indicate to the vision system that it should latch the User Data Holding Buffer into the User Data field to give the In-Sight access to the user data.

EtherNet/IP Functions

These functions are used to send and receive data between the In-Sight Explorer spreadsheet and the EtherNet/IP stack for In-Sight vision systems running In-Sight 4.x.x and earlier firmware:

  • ReadEIP
  • ReadEIPBuffer
  • WriteEIP
  • WriteEIPBuffer

EtherNet/IP Communications

These topics provide information and steps for configuring and utilizing EtherNet/IP and In-Sight vision systems:

  • Rockwell ControlLogix PLC - In-Sight 4.x.x Firmware
  • Communicate with a Rockwell SLC 5/05 PLC


EtherNet/IP Object Model and Input/Output Assembly Objects

This topic covers the In-Sight Object Model for In-Sight vision systems running In-Sight firmware 5.1.0 and later.

Note: For a complete list of models and supported firmware versions, see Firmware Versions.

In-Sight Object Model

In EtherNet/IP networks, In-Sight vision systems act as servers, with support for both explicit and implicit I/O messaging. Data from inspections, for instance, can be transferred to clients via explicit messages or through implicit connections. Implicit connections can also be used to control acquisitions, triggers and spreadsheet events.

The Identity Object, Ethernet Link Object, TCP/IP Object and the Other Internal Objects are required by the EtherNet/IP specification. The different instances of the Assembly Object are used to exchange application data with EtherNet/IP clients. The Vision Object is defined by the In-Sight System to provide information specific to In-Sight vision systems. The details for how this occurs are provided in the Vision Object Attributes and Services section. The current object model provided by In-Sight vision systems is illustrated in the following figure:

  • Assembly Object: The Assembly Object binds attributes of multiple objects, which allows data to and from each object to be sent or received over a single connection. Assembly Objects can be used to bind input data or output data. The terms "input" and "output" are defined from the network's point of view. An "input" will produce data on the network and an "output" will consume data from the network.
  • Identity Object: This object provides identification of, and general information about, the device.
  • Ethernet Link Object: The Ethernet Link Object maintains link-specific counters and status information for an Ethernet 802.3 communications interface.
  • TCP/IP Object: The TCP/IP Object provides a mechanism to query and possibly configure a device's TCP/IP network interface configuration. Examples of items of interest include a device's IP Address, Network Mask and Gateway Address.
  • Vision Object: The Vision Object contains all of the services and attributes specific to In-Sight vision systems. This includes acquisition, inspection, job change-over and communications with the In-Sight Explorer spreadsheet.

Input and Output Assembly Objects

The I/O Assembly data attribute for the input and output data has the following formats:

Firmware Version | Input Assembly | Output Assembly
 | Instance | Instance
5.1.0 and higher | 13 Note: For more information, see Input Assemblies - Instance 13. | 22 Note: For more information, see I/O Assembly Data Attribute Format - Output Assemblies - Instance 22.
Note:
  • If using an EDS generated profile, although the maximum size of the Input Assembly is 500 bytes, the EDS generated profile will only allow a connection of up to 496 bytes.
  • When using Rockwell RSLogix Studio 5000, version 21 through 25, the In-Sight EDS generated profile’s default Input and Output Assembly sizes (496 bytes for each) cannot be edited and will default to the largest Input and Output Assembly sizes.
  • The Acquisition ID will increment at the beginning of acquisition, when the Trigger Ack is generated and sent to the PLC. The Inspection ID increments when the Inspection Completed bit toggles (at which time the Results Valid is set high and the Inspecting bit goes low).
  • For differences in the Input and Output Assembly tables when migrating from In-Sight vision systems running In-Sight 4.x.x firmware to vision systems running 5.x.x firmware, see Input/Output Assembly Changes.

Input Assemblies - Instance 13

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
13 | 0 | Online | Offline Reason |  |  | Missed Acq | Reserved | Trigger Ack | Trigger Ready
 | 1 | Error | Command Failed | Command Completed | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | System Busy
 | 2 | Reserved | Reserved | Reserved (5.1.0 - 5.5.x) | Job Pass | Exposure Complete | Reserved | Reserved | Set User Data Ack
 |  |  |  | TestRun Ready (5.6.0 and later)
 | 3 | Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0
 | 4 | Error Code (16-bit integer)
 | 5
 | 6 | Reserved (16-bit integer)
 | 7
 | 8 | Current Job ID (16-bit integer)
 | 9
 | 10 | Acquisition ID (16-bit integer)
 | 11
 | 12 | Inspection ID (16-bit integer)
 | 13
 | 14 | Inspection Result Code (16-bit integer)
 | 15
 | 16 | Inspection Results 0
 | ... |
 | 499 | Inspection Results 483

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6-4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 | Missed Acq | Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
2 | Reserved | Unused.
1 | Trigger Ack | Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.
0 Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet, and the vision system is not currently acquiring an image.

The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

Byte 1

Bit | Name | Description
7 | Error | This bit is set when an error has occurred, which is defined in the Error Code field.
6 | Command Failed (5.1.0 - 5.5.x) | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
Command Failed (5.6.0 and later) | This bit is set to 1 to indicate that a TestRun execution or Job Load has failed. It is cleared when a new TestRun sequence is executed, or a new job is loaded by the PLC/HMI. If you change the job in In-Sight Explorer, this bit does not change.
5 Command Completed (5.1.0 - 5.5.x) This bit is set to indicate that Job Load has completed. When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.
Note: The camera clears the Command Completed bit when the Execute Command bit goes low.
Command Completed (5.6.0 and later)

This bit is set to indicate that a TestRun execution or Job Load has completed.

Note: If you attempt to execute TestRun on a Job without a TestRun configuration, both the Command Completed and the Command Failed bit will be set. You must wait for the TestRun Ready bit to be set before executing TestRun.
4 Command Executing (5.1.0 - 5.5.x) This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.
Note: The Command Executing will be on for a maximum of 2 seconds.
Command Executing (5.6.0 and later) | This bit is set to 1 when a TestRun execution or Job Load is started. When a TestRun execution has completed, this bit is cleared. The Command Completed bit and Command Failed bit will be set prior to the falling edge of this bit.
3 Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.
2 | Results Buffer Overrun | This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer. The ninth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.
1 Inspection Completed

This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.

Note: Use this bit to indicate that results are ready to read. Use ResultsValid to determine when to read data.
0 | System Busy | Set when the vision system is running a job, loading a job or responding to user input.

Byte 2

Bit | Name | Description
7-6 | Reserved | Unused.
5 | Reserved (5.1.0 - 5.5.x) | Unused.
TestRun Ready (5.6.0 and later)

This bit is set to 1 when the vision system has a valid TestRun configuration. This signal is cleared when TestRun executes (regardless of the TestRun initiator) and returns to 1 after TestRun execution completes.

Note:

  • This bit is signaled regardless of whether the vision system is Online or Offline.

  • Initiating TestRun by an external device is NOT supported on vision systems running In-Sight firmware 5.1.0 to 5.5.x.
4 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
3 | Exposure Complete | This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.
2-1 | Reserved | Unused.
0 | Set User Data Ack | This bit is set to acknowledge completion of the Set User Data command.

Byte 3

Bit | Name | Description
7 | Soft Event Ack 7 | These bits are used to indicate that the Soft Event command was received.
6 | Soft Event Ack 6
5 | Soft Event Ack 5
4 | Soft Event Ack 4
3 | Soft Event Ack 3
2 | Soft Event Ack 2
1 | Soft Event Ack 1
0 | Soft Event Ack 0

Byte 4-5

Name Description
Error Code (16-bit Integer)

A 16-bit numeric representation of the error that has occurred:

Code | Error | Description
0x0000 | No Error | No error occurred.
0x0100 | Trigger set while disabled | Occurs when the Trigger bit is set while the Trigger Enable bit is cleared or the AcquireImage function's Trigger parameter is set to External, Network or Industrial Ethernet.
0x0101 | Trigger set while Offline | Occurs when the Trigger bit is set while the vision system is Offline.
0x0400 | Already Executing Error | Occurs when the Execute Command bit is set and the Executing bit is still High.
0x0401 | Job load requested while Online | Occurs when a Job Load command is issued while the vision system is Online.
0x0402 | Job load requested does not exist on the camera | Occurs when a JobID sent in the Command field does not exist as a prefix for any job in the camera file system. For example, if you send Command = 123 and no job on the camera contains 123xxxxx.job.

Byte 6-7

Name | Description
Reserved (16-bit Integer) | Unused.

Byte 8-9

Name | Description
Current Job ID (16-bit Integer) | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Byte 10-11

Name | Description
Acquisition ID (16-bit Integer) | This ID increments at the beginning of an acquisition and when the Trigger Ack bit is set; can be used to synchronize an acquisition with its Inspection Results.

Byte 12-13

Name | Description
Inspection ID (16-bit Integer) | The acquisition ID associated with this set of results.

Byte 14-15

Name | Description
Inspection Result Code (16-bit Integer) (5.1.0 - 5.5.x) | The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.
Inspection Result Code (16-bit Integer) (5.6.0 and later)

Indicates the result of the latest TestRun execution. If all tests pass, the value will be 7. If one or more tests do not pass, or if there is a problem with the setup or cleanup during the TestRun execution, the value will be 0.

  • This field is only valid when a TestRun execution is completed successfully.
  • The results in this field can become invalidated if a Job without a TestRun is loaded, another TestRun job is executed, a TestRun is in progress, a TestRun execution or job load has failed, or a TestRun execution is aborted.

Byte 16-499

Name Description
Inspection Results (0 - 483)

This is the data that is written from In-Sight Explorer, via the WriteResultsBuffer function in the Spreadsheet View, or the Format Output Data tab in the Communications Step of the EasyBuilder GUI.

The data sent will be written exactly as it appears in the In-Sight Explorer GUI, i.e. the bits appear in the same order as they are defined in the FormatOutputBuffer function (Spreadsheet) or the Format Output Data tab (EasyBuilder). For more information, see WriteResultsBuffer.

Note:
  • When the Inspection Results data array is received, RSLogix 5000 will assign a single data type to the entire array, regardless if the data that was sent contained multiple data types (i.e. the formatted data contained integers, floating point and/or bits). Therefore, if the data being sent contains different data types, copy the particular result (starting with the byte offset in the Inspection Results array, and the length, in bytes), into a User-Defined Data Type in RSLogix, based on the expected data type being sent. For more information, see EXAMPLE: Getting Floating Point Value Data from an In-Sight Vision System.
  • If the Buffer Results Enable bit is set, then the inspection results will remain unchanged until acknowledged by pulsing the Inspection Results Ack bit.

I/O Assembly Data Attribute Format - Output Assemblies - Instance 22

Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
22 | 0 | Set Offline | Reserved |  | Execute Command | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Reserved
 | 2 | Reserved |  |  |  | Clear Exposure Complete | Clear Error | Reserved | Set User Data
 | 3 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
 | 4 | Command
 | 5
 | 6 .. 7 | Reserved
 | 8 | User Data 0
 | ... |
 | 495 | User Data 487
Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Byte 0

Bit | Name | Description
7 Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6-5 | Reserved | Unused.
4 | Execute Command (5.1.0 - 5.5.x) | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.
Execute Command (5.6.0 and later) | When set, the vision system loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. When using TestRun, the rising edge of this signal will execute command to start TestRun. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (prior to Command Complete) is interpreted as an abort request.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the Inspection ID, Inspection Result and Inspection Results data. The next set of inspection results is then sent to the PLC. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty. If results buffering is disabled, the Inspection Results Ack bit must be set to clear the Results Valid bit.
2 | Buffer Results Enable | When this bit is set, the Inspection ID, Inspection Result and Inspection Results fields are held constant until the Inspection Results Ack field has acknowledged them and been set. Up to eight inspections are held in the vision system's buffer. The In-Sight vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared and there is a new set of rules sent to the PLC, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the PLC, the Results Valid bit remains cleared.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.

  • The AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet. For more information, see AcquireImage.

    Note: The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

Byte 1

Bit | Name | Description
7-0 | Reserved | Unused.

Byte 2

Bit | Name | Description
7-4 | Reserved | Unused.
3 | Clear Exposure Complete | While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.
2 | Clear Error | When this bit is set, it will clear the Error and Error Code signals; the Clear Error bit should be held high until the Error bit has been cleared. If an error has been queued, clearing this bit will cause the Error and Error Code signals to be set to the next queued error code.
1 | Reserved | Unused.
0 | Set User Data | This command is used by the PLC to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

Byte 3

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Byte 4-5

Byte | Name | Description
4 - 5 | Command (5.1.0 - 5.5.x) | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.
 | Command (5.6.0 and later) | This value indicates the TestRun sequence to execute or the ID number (1-999) of the job to load when the Execute Command bit is set by the PLC. 0x1007 = Execute TestRun 0x0000 – 0x03E7 = Job IDs

Byte 6-7

Byte | Name | Description
6-7 | Reserved | Unused.

Byte 8-495

Byte | Name | Description
8-495 | User Data (0 - 487) | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function. The buffer is written exactly as it appears in the PLC, with the bits appearing in the same order as they are defined in RSLogix 5000.

Mapping of I/O Assembly Data Attribute Components

The following table indicates the I/O Assembly Data attribute mapping for In-Sight vision systems:

Data Component Name | Class |  | Instance Number | Attribute
 | Name | Number |  | Name | Number
Set Offline | Vision | 78 Hex | 1 | SetOffline | 8
Trigger Enable | Vision | 78 Hex | 1 | AcqTriggerEnable | 9
Trigger | Vision | 78 Hex | 1 | AcqTrigger | 10
BufferResultsEnable | Vision | 78 Hex | 1 | BufferResultsEnable | 13
Soft Event N | Vision | 78 Hex | 1 | SoftTrigger bit N | 18
Online | Vision | 78 Hex | 1 | Online | 6
OfflineReason | Vision | 78 Hex | 1 | OfflineReason | 7
Trigger Ready Trigger Ack Exposure Complete Missed Acquisition | Vision | 78 Hex | 1 | AcqStatusRegister | 11
User Data | Vision | 78 Hex | 1 | User Data | 12
System Busy Inspection Completed Results Buffer Overrun Results Valid | Vision | 78 Hex | 1 | InspectionStatusRegister | 14
Inspection ID Inspection Data | Vision | 78 Hex | 1 | InspectionResults | 16

Vision Object Attributes

This section describes the various attributes and services that exist in the EtherNet/IP Vision Object.

Note: Class Code: 78 Hex -This object models all operations available to the In-Sight vision system running In-Sight firmware 5.1.0 and later.

Instance Attributes

Attribute ID

Access Rule

Name

Data Type

Description of Attribute

6

Get

Online

BOOL

0 = Offline

1 = Online

7

Get

OfflineReason

BYTE

0 = Online

1 = Programming

2 = Discrete Offline

3 = Comm. Offline

4-255 = Reserved

8

Set

SetOffline

BOOL

1 = Force the In-Sight vision system Offline.

9

Set

AcqTriggerEnable

BOOL

0 = Acquisition Trigger is disabled. Trigger Ack is reset to 0.

1 = Acquisition Trigger is enabled.

10

Set

AcqTrigger

BOOL

When AcqTriggerEnable is True, the In-Sight vision system will acquire an image when AcqTrigger changes from 0 to 1.

11

Get

AcqStatusRegister

BYTE

Bit 0: Trigger Ready

Bit 1: Trigger Ack

Bit 2: Exposure Complete

Bit 3: Missed Acquisition

Bit 4-7: Reserved

12

Set

UserData

ARRAY of BYTE

User defined data that may be used as an input to the inspection.

Note:

  • For In-Sight vision systems running In-Sight firmware 5.1.0 to 5.3.x, data written to the UserData attribute will not appear until the Set User Data service is executed.

  • For In-Sight vision systems running In-Sight firmware 5.4.x and later with the User Data Holding Buffer Bypass enabled, data written to the UserData attribute appears when written.
  • The User Data Holding Buffer Bypass can only be enabled and disabled via graphical user interface (GUI).

13

Set

BufferResultsEnable

BOOL

When BufferResultsEnable is True, it enables buffering of inspection results until the ResultsAck attribute is set to True.

14

Get

InspectionStatusRegister

BYTE

Bit 0: System Busy

Bit 1: Inspection Completed

Bit 2: Results Buffer Overrun

Bit 3: Results Valid

Bit 4: Job Loading

Bit 5: Job Load Completed

Bit 6: Job Load Failed

Bit 7: Job Pass

15

Set

InspectionResultsAck

BOOL

Acknowledges that the client received the inspection results.

16

Get

InspectionResults

STRUCT of

The last inspection results.

InspectionID

UINT

Inspection counter.

InspectionResultCode

UINT

Inspection result code set in the WriteResultsBuffer function.

InspectionResults

ARRAY of BYTE

Results from the last inspection.

18

Set

SoftTrigger

BYTE

Bit 0: Soft Trigger 0

Bit 1: Soft Trigger 1

Bit 2: Soft Trigger 2

Bit 3: Soft Trigger 3

Bit 4: Soft Trigger 4

Bit 5: Soft Trigger 5

Bit 6: Soft Trigger 6

Bit 7: Soft Trigger 7

19

Set

JobID

INT

The ID number of the currently loaded job, or -1 if the current job does not have an ID.

Setting this value (between 0 and 999) will load the job with that associated ID.

20

Set

JobName

STRING

The file name of the currently loaded job, or an empty string if the file name is unknown.

Setting this value will load the job with that associated file name.

21

Set

 ClearExposureComplete BOOL

Clears the Exposure Complete bit. The rising edge of the bit clears the Exposure Complete bit. If another Exposure Complete signal is sent while the Clear Exposure Complete bit is set, the Exposure Complete bit will be set when the Clear Exposure Complete bit is cleared.

22

Set

SoftEventAck 0-7

BYTE

Bit 0 = Soft Trigger Ack 0

Bit 1 = Soft Trigger Ack 1

Bit 2 = Soft Trigger Ack 2

Bit 3 = Soft Trigger Ack 3

Bit 4 = Soft Trigger Ack 4

Bit 5 = Soft Trigger Ack 5

Bit 6 = Soft Trigger Ack 6

Bit 7 = Soft Trigger Ack 7

Online Attributes

The Online Attributes indicate whether or not an In-Sight vision system is in an Online or Offline state. When the In-Sight vision system is Offline, the OfflineReason attribute can be used to determine the reason as to why the In-Sight vision system is Offline.

OfflineReason Attribute Values

Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.

The SetOffline attribute can be used to force the In-Sight vision system into an Offline state. When the SetOffline attribute is set to True, the OfflineReason attribute will be set to Comm. Offline, if the In-Sight vision system is being held Offline for no other reason.

Acquisition Attributes

Note: If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

The Vision Object can be triggered to acquire images by using the Acquisition Attributes. In order to reset the Acquisition Attributes in the Vision Object, the AcqTriggerEnable attribute must be set to False, until the AcqStatusRegister is 0. Then, the AcqTriggerEnable attribute can be set to True to enable acquisition via the Vision Object. When the Acquisition Trigger is ready to accept triggers, the Trigger Ready bit in the AcqStatusRegister will be set.

While the AcqTriggerEnable attribute is set to True, each time the Vision Object sees the AcqTrigger attribute change from 0 to 1, it will initiate an image acquisition. When setting this via implicit messaging, to guarantee that the change is seen by the Vision Object, the attribute should be held in the changed state until that same value is seen by the Trigger Ack bit of the AcqStatusRegister.

Note: This is not necessary when using explicit messaging, because the change will always be seen.

To determine when an In-Sight vision system has completed an image acquisition, the Exposure Complete and Clear Exposure Complete bits should be utilized. Acquisitions must be explicitly acknowledged by explicitly acknowledging the Exposure Complete signal. If an Exposure Complete is signaled while the Clear Exposure Complete bit is HIGH, the Exposure Complete bit will be asserted when the Clear Exposure Complete bit is cleared by the PLC.

With this manner of operation, if multiple Exposure Complete signals occur, they will have the same effect as though just one signal was sent, and no errors will be reported in this scenario. This allows a PLC to detect when an acquisition was triggered from a discrete input by detecting the Exposure Complete signal.

If other methods of acquisition triggering are employed, the Exposure Complete and Missed Acquisition bits of the AcqStatusRegister will still be active.

Inspection Results Attributes

When an image is acquired as a result of an acquisition trigger, it is placed in a queue for inspection. As the inspection is running on the image, the System Busy bit of the InspectionStatusRegister is set. Once the inspection is completed, the System Busy bit is cleared and the Inspection Completed bit is toggled.

The BufferResultsEnable attribute determines how inspection results are handled in the Vision Object. If the BufferResultsEnable attribute is set to False, then the inspection results are immediately placed into the InspectionResults attribute.

If the BufferResultsEnable attribute is set to True, then the previous inspection results remain in the InspectionResults attribute until they are acknowledged by setting the InspectionResultsAck attribute to True. Once the Results Valid bit is cleared, the InspectionResultsAck attribute should be set to False to allow new results to be placed in to the InspectionResults attribute. This can be used to establish a handshake to obtain results between the Vision Object and the client.

Behavior of InspectionStatusRegister

Inspection

Status

Register

Bit

 Bit Name Results If Buffering Is Disabled Results If Buffering Is Enabled
0

System Busy

 Set when the vision system is running a job, loading a job or responding to user input. Set when the vision system is running a job, loading a job or responding to user input.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC. | This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.
2 | Results Buffer Overrun | Always cleared. | Set when inspection results could not be queued because the client has failed to acknowledge a previous result. Cleared when the inspection result is successfully queued.
3 Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.
7 Job Pass Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared.
Note: The Job Pass bit will be valid prior to toggling the Inspection Completed bit.

Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.

Note: The Job Pass bit will be valid prior to the Results Valid bit being set.

Job Attributes

The Vision Object can load jobs stored in the non-volatile flash memory of an In-Sight vision system by setting the JobID and JobName attributes. If the load fails, the set operation will also fail.

Vision Object Services

Common Services

The Vision Object provides the following Common Services:

Service Code | Service Name | Description of Service
05 Hex | Reset | Resets the Vision Object
0E Hex | Get_Attribute_Single | Returns the contents of the specified attribute.
10 Hex | Set_Attribute_Single | Modifies an attribute value.

Reset Service

The Reset Service will reset and disable the acquisition triggering system in the Vision Object. It will also disable and clear the inspection results buffering system in the Vision Object.

Object Specific Services

The Vision Object provides the following Object Specific Services:

Service Code | Service Name | Description of Service
32 Hex | Acquire | Triggers a single acquisition.
33 Hex | Reserved | Deprecated.
34 Hex | SendNativeCmd | Sends a Native Mode command to the In-Sight vision system.
35 Hex | GetInspectionResults | Gets the InspectionResults attribute.
36 Hex | Transfer User Data | Transfers data into a portion of the User Data Holding Buffer. For more information, see User Data Holding Buffer.
37 Hex | Set User Data | Indicates to the vision system that it should latch the User Data Holding Buffer into the User Data field to give the In-Sight access to the user data.

Acquire Service

The Acquire Service of the Vision Object will cause an acquisition to be triggered, if the acquisition system is ready to acquire an image. If the acquisition could not be triggered, then the Missed Acquisition bit of the AcqStatusRegister will be set until the next successful acquisition.

If the command fails, the Acquire Service will return the vendor specific error code 1F.

SendNativeCmd Service

The SendNativeCmd Service sends any documented Native Mode command string to the In-Sight vision system. The request data for the SendNativeCmd should include the Native Mode command string that is to be sent to the In-Sight vision system; the reply data will contain the string result of the Native Mode command. For more information, see Native Mode Commands.

SendNativeCmd Request Data Format

Name | Type | Description
Command | STRING | The Native Mode command to process.

SendNativeCmd Response Data Format

Name | Type | Description
Result | STRING | The string result of the Native Mode command.

If the command fails, the service will return one of the following vendor specific error codes:

Error Code | Description | Native Mode Return Code
1 | Bad Command | -
4 | No Answer - The system is too busy. |
100 | Command Failed | 0
101 | Command Cannot Be Executed | -1
102 |  | -2
103 |  | -3
104 |  | -4
105 |  | -5
106 |  | -6

GetInspectionResults Service

The GetInspectionResults Service (code 0x35) reads data from the InspectionResults attribute of the Vision Object.

GetInspectionResults Request Data Format

Name | Type | Description
Size | UINT | The number of bytes of the InspectionResults attribute to read.
Offset | UINT | The offset into the InspectionResults attribute. This specifies the first byte of the InspectionResults attribute to read.

GetInspectionResults Response Data Format

Name | Type | Description
InspectionResults | STRUCT of | The last inspection results.
InspectionID | UINT | Inspection counter.
InspectionResultCode | UINT | Inspection result code set in the WriteResultsBuffer function.
InspectionResults | ARRAY of BYTE | Results from the last inspection.

Transfer User Data Command

This command is used to transfer data into a portion of the User Data Holding Buffer. The User Data Holding Buffer will be latched to the User Data field when the Set User Data command is issued.

Request Format

Name | Type | Description
Size | UINT | The number of bytes of the User Data field to write.
Offset | UINT | The offset into the User Data field.
Data | Array of BYTE | User Data to write into the User Data field.

Set User Data Command

This command is used by the PLC to indicate to the vision system that it should latch the User Data Holding Buffer into the User Data field to give the In-Sight access to the user data.

If this additional User Data handshake is not needed, and the communication have the same behavior as the assembly IO on a 4.x.x camera, this User Data Command can be bypassed by:

  1. Logging onto the camera.
  2. From the main menu bar, select Sensor ->Network Settings.

  3. Select EtherNet/IP in the Industrial Ethernet Protocols section:

  4. Select the enabled Settings button next to the EtherNet/IP selection.

  5. Check the Enable User Data Bypass checkbox.

  6. Restart the vision system.

EtherNet/IP Functions

These functions are used to send and receive data between the In-Sight Explorer spreadsheet and the EtherNet/IP stack:

  • ReadUserDataBuffer
  • ReadLatchedUserDataBuffer
  • WriteResultsBuffer
  • GetBufferData(ReadBuffer, Index)

EtherNet/IP Communications

The following topic provides information and steps for configuring and utilizing EtherNet/IP and In-Sight vision systems:

  • Rockwell ControlLogix PLC - In-Sight 5.x.x Firmware

Sending Native Mode Commands using EIP Explicit Messaging


Sending Native Mode Commands using EIP Explicit Messaging

In-Sight vision systems running 5.x.x firmware do not support PCCC commands embedded in PLC read/write MSG instructions to send Native Mode commands. To send Native Mode commands on systems running 5.x.x, you must use EIP Explicit Messaging, specifically the CIP Generic message type of the MSG or EEM instruction. This allows service attribute access (get/set) and object specific service access (SendNativeCmd) to the Vision Object (0x78) in the In-Sight vision system. For more information, see SendNativeCmd Service.

Sample ladder logic rung files for three types of PLC platforms are available and described below. The information in this topic is specific to these sample files.

How it Works

The SendNativeCmd service sends Native Mode command strings to the In-Sight vision system. The request data for SendNativeCmd (i.e., LFJobName.job) should include the Native Mode command string. If the command returned a string result, the reply data would also contain the Native Mode command string. The PLC configuration differs depending on the PLC platform.

After installing the sample ladder files, the following commands are stored in a string file on the PLC:

Commands | ST File Address | Index C5:0.ACC | Description
SO0 | ST30:0 | 0 | Set/Force In-Sight offline
GO | ST30:1 | 1 | Get Online (returns a “0”)
TFJobName-Stored.job | ST30:2 | 2 | Saves the loaded job in flash using the name “JobName-Stored.job,” which becomes the active job. The job displays in the file list when refreshed in In-Sight Explorer.
GF | ST30:3 | 3 | Returns the file name of the active job - “JobName-Stored.job.”
LFJobName.job | ST30:4 | 4 | Loads the previous version of the job.
SO1 | ST30:5 | 5 | Set/Force online (“Online” status shown in In-Sight Explorer)
GO | ST30:6 | 6 | Get Online (returns a 1)

For all three PLC platforms:

  • The logic indexes through the commands associated with that index to the In-Sight vision system.
  • Setting the CopyNMCmdToSend bit in the first rung in all samples will write the Native Mode command stored at the index into the string file (ST30).
  • After copying the command string, the bit is unlatched and the command (MSG/EEM) is sent. A result string is returned if the Native Mode command returns a response. When the instruction is finished, the string file element index (C5:0) is incremented.
  • The CopyNMCmdToSend bit in rung 0 is set again to send the next Native Mode command.
  • The C5:0 index increments each time it reaches 7, which means that seven Native Mode commands have been sent (index 0 through 6). The index is then reset to 0.

For PLC platform-specific information, see Understanding the Sample Ladder Logic Rung Files.

Install and Set up the Sample PLC Ladder Logic Rung Files

Sample ladder logic rung files are available in the following locations:

  • the In-Sight Explorer installation folder: <In-Sight install folder> /Factory Protocol Description
  • the Cognex Technical Support web site: https://support.cognex.com/en/downloads/detail/3551/1033/11.
  1. Download and copy the sample rung files to a desired location.
  2. Follow the instructions below that pertain to your PLC platform.
MicroLogix 1100 or SLC5/05 ControlLogix or CompactLogix
  1. In RSLogix 500, open a new or existing project (.RSS file).
  2. In the Channel Configuration dialog, configure Ethernet settings for Channel 1, including IP Address and Subnet Mask for the controller.
  3. While offline, in the ladder editor, right-click on a rung and select Paste from Library.
  4. Browse to the folder where you copied the sample rung files.
    • If using SLC5/051100, select NativeModeCmds-ML1100.SLC.
    • If using MicroLogix 1100, select NativeModeCmds-ML1100.SLC.
      Click Open. The Import Configuration dialog opens.
  5. If this is a new project, the default settings are OK. If this is an existing project, click Help to learn about settings that might be appropriate for your project.
  6. When finished, click OK. The three rungs are added to the ladder editor.
  7. In rung 2, open the Setup Screen for the MSG instruction. In the MultiHop tab, enter the IP address of the In-Sight vision system.
  8. To validate the rungs, select Edit > Verify File. If no errors were found, the following message displays in the status bar at the bottom of the window: "Verify has completed, no errors found."
    If errors were found, fix the errors and re-verify.
  9. Download the project and set the PLC to Run Mode.
  1. In RSLogix 5000, open a new or existing project (.ACD file).
  2. Under the Ethernet node, add your In-Sight vision system.
  3. While Offline, in the ladder editor, right-click on a rung and select Import Rungs.
  4. Browse to the folder where you copied the sample rung files. Select NativeModeCmds-CLgx.L5X and click Open. The Import Configuration dialog opens.
  5. Click OK. The three rungs are added to the ladder editor.
  6. In rung 1, click the ellipses button of the MSG instruction. The Message Configuration dialog opens.
  7. Select the Communication tab.
  8. In the Path field, select the Browse button, then select your In-Sight vision system in the I/O Configuration tree. Click OK.
  9. Download the project and set the PLC to Run Mode.

Understanding the Sample Ladder Logic Rung Files

Following is a description of the logic flow for each rung, organized by PLC platform.

MicroLogix 1100

Rung Logic Flow Description

0

Summary: This rung copies the Native Mode command strings stored in ST30:0 through ST30:6, based on index C5:0, to the common location of ST30:9.

Details:

  • Each time the user sets the B3:0/1 bit (CopyNMCmdToSend) and the index is incremented, the next command is copied to the common string storage location (ST30:0 through ST30:6), depending on the index (C5:0 through C5:6), respectively. Note that index addressing (#) is used in the COP instruction because it is a file operation.
  • Lastly, once the correct COP instruction executes, the B3:0/1 bit is unlatched and the B3:0/11 bit (CopyNMCmdToCommonString) is set.

1

Summary: This rung copies the currently selected Native Mode command, two ASCII values at time, into an integer (N13) and the bytes are swapped in the integer file.

Details:

  • The B3:0/11 bit (CopyNMCmdToCommonString) is set so that the ST30:9.LEN (Native Mode command string length) is copied (using the MOV instruction) into the MSG control MG12:0 control file’s .ELE element. This sets the number of bytes in the MSG instruction's size of bytes (Send). This is done to make sure the correct data is sent if a short command is sent (S01) along with the command string.
  • The Native Mode command string data is copied (using the MOV instruction), two bytes at a time, into the N13 file starting at word 10 (N13:10) as ASCII characters. This is necessary because in MicroLogix 1100, you can only send and receive string data using the N file type. The command string length is checked, and only the correct number of bytes in the string is copied into N13 words.
  • After the entire command string is copied, all the words in N13 are byte-swapped using indexed addressing, starting at N13:10. The Length field must be constant, hence, it needs to be as long or longer than half the length of the Native Mode command string (since it is two bytes per N13 word). For example, if the longest string is 24 bytes, the length needs to be 12 words or more.
  • The B3:0/0 bit (Send_NMCmd) is latched for use in the next rung. This is necessary because the MSG instruction runs over several scans and would not be valid if the bit is not latched.

2

Summary: This rung sends the Native Mode command using one of two MSG instructions and clears the result file (N11:0) to store the response if one is returned.

Details:

  • The first MSG instruction is used to send the Native Mode commands that do not return a response, or to send a response with an even number of bytes. The second MSG instruction is used for commands that return only one byte of response data.

    Note: There is an issue with MicroLogix firmware when a MSG instruction contains an odd number of bytes. If the In-Sight vision system responds with an odd number of bytes, and the Size in Bytes (Receive) entered in the MicroLogix setup is even or several bytes longer, the last odd byte will not be returned in the response. You must set the Size in Bytes to the exact number of bytes expected.

    For example, if you send the Get File command (GF) and it returns a job name that is 15 characters long, but your Size in Bytes is set to 16 or more bytes, the job name will be returned with a "b" missing in the name. This would also occur with the Get Online command (GO), which returns one byte. If one MSG instruction was set to two or more bytes, the response will not contain any bytes. This is the reason two MSG instructions are required, as they are designed to run conditionally based on the index used for the Native Mode command.

3

Summary: Once the command was sent, the result string (if returned) is stored in the N11 file and the bytes are swapped for easier reading. The index for changing Native Mode commands is also incremented until it reaches 7 and is then reset.

Details:

  • When either of the MSG instructions in rung 2 have completed and the index equals 3, the bytes in the receive data table address (N11) are swapped in each word so the job name string is in the correct byte order and easy to read.
  • The index is incremented (range being 0 through 6 in CS5:0 counter) and will automatically reset to 0 after all the commands have been sent.
  • The Bit B3:0/0 bit is unlatched, which completes one Native Mode command cycle.
Note: If desired, a rung similar to rung 1 could be written to copy the result string in the N11 words to a common string file (ST) element for easier viewing and using in the logic.

SLC 5/05

Rung Logic Flow Description

0

Summary: This rung copies the Native Mode command strings stored in ST30:0 – ST30:6 based on index C5:0 to common location ST30:9. Each time the user sets B3:0/1 bit (CopyNMCmdToSend) and the index was incremented, the next command is copied to the common string storage location. The currently selected Native Mode command is copied into an integer file (N7) and the bytes are then swapped in the integer file.

Details:

  • The B3:0/1 bit is set to send the first Native Mode command. This command is then copied to the command string location ST30:9 into N7 file starting at word 10 (N7:10). This is done because the string cannot be sent in an EEM instruction. Since the string is copied using indirect indexed addressing, the entire string structure (LEN and DATA) is copied into N7 with a length of 25 words.
  • Starting at N7:11, 24 words are swapped in each word of the N7 file (total of 48 bytes).
  • The B3:0/1 bit is unlatched and B3:0/0 bit is latched for the remaining rungs.
1

Summary: This rung sends an EEM instruction (EtherNet/IP Explicit Message) containing the Native Mode command and stores a response string if one is returned.

Details:

  • The B3:0/0 bit is set, then the EEM instruction executes. 24 words (48 bytes) of ASCII data are written using the Native Mode command.
  • If any data is received after the command executes, up to 24 words (48 bytes) are stored in the N17 integer file starting at word 1 (N717:1). The receive size is set to 24 words and any data beyond the actual response data will be nulls. If no data is received, N17:1 – N17:24 will be nulls.

2

Summary: When the EEM instruction in rung 1 is finished, the Native Mode command result string and length are copied from the N17 integer file to the ST30:10 result string element . The index for changing Native Mode commands is also incremented until it reaches 7 and is then reset.

Details:

  • The DN bit is set; the received length in bytes (N59:4) ) is moved into N17:0.

  • The response bytes are swapped for this reason: only index 3 (Get File) returns a string longer than one byte so the bytes need to be swapped in the N17 file starting at word 1 (N17:1). In this example, 24 words in the N17 file are swapped, totaling 48 bytes.

    Note: The SWP instruction only allows a constant in the Length parameter so 24 was used since it is more than long enough for any strings returned in this sample.
  • 25 words in the N17 file are copied into a string (ST30:10) using one COP instruction with indexed addressing. This is preferable over copying two bytes at a time using two instructions.
  • The counter index is incremented until the last index (6) is reached; the counter is reset to 0.
  • The B3:0/0 bit is unlatched.

ControlLogix/CompactLogix

Rung Logic Flow Description

0

Summary: This rung copies a Native Mode command and length from the string array to the string tag SendNM_Cmd.

Details:

  • CopyNMCmdToSend bit is set.
  • The Native Mode command is copied to the common string location (SendNM_Cmd) and the request length of the MSG control block (msg_NMCmd).
  • Using the counter (NMCmdIndx.ACC) as an index into the string array (NativeModeCmds) that is holding the commands, the string ASCII characters are copied into the common string location. (The common string tag data is used in the MSG source element.)
  • The CopyNMCmdToSend bit is unlatched.
  • The send_NMCmd bit is latched for use in the remaining rungs.

1

Summary: The Native Mode command is sent using the MSG instruction and stores a response string if one is returned.

Details:

  • The MSG instruction is enabled. If the Native Mode command returns a response string, the data is stored in the string NM_Cmd_ResultString tag.

2

Summary:When the MSG is finished, the Native Mode command result string length is set according to the received length in the MSG. The index for changing Native Mode commands is also incremented until it reaches 7, and then reset.

Details:

  • When the MSG completes (DN bit set), the length of the data received (if any) is copied into NMCmd_ResultString.LEN. This makes it easier to read the result string without extraneous "$00" characters at the end of the result string if the length remains at 82 bytes. The NMCmdIndx count is incremented by 1.

  • After the seven commands are sent, the NMCmdIndx count index is reset to 0.
  • The Send_NMCmd bit is unlatched to complete the cycle.


Input/Output Assembly Changes

This topic provides a graphical representation of changes to the Input and Output Assembly Objects when updating In-Sight firmware or moving between In-Sight vision system platforms.

Input/Output Assembly Changes When Upgrading In-Sight 4.x.x Firmware

Input/Output Assembly Changes When Migrating to In-Sight Vision Systems Running In-Sight 5.x.x Firmware

Note: The User Data Holding Buffer Bypass can only be enabled and disabled via graphical user interface (GUI).


Rockwell ControlLogix PLC - In-Sight 4.x.x Firmware

These topics cover the connection and transfer of data between a ControlLogix PLC and an In-Sight vision system running In-Sight 4.x.x firmware, and how to send and receive EtherNet/IP implicit messages.

  • Communicate with a Rockwell ControlLogix PLC
  • Implicit Messages - In-Sight 4.x.x Firmware
    • Establish a Unicast Implicit Connection - In-Sight 4.8.0 - 4.9.x Firmware
    • Establish a Unicast Implicit Connection - In-Sight 4.10.x Firmware
    • Example: Verify a ControlLogix Connection - In-Sight 4.x.x Firmware
    • Establish a Multicast Implicit Messaging Connection with Multiple PLCs - In-Sight 4.x.x Firmware
  • Get Data from an In-Sight Vision System - In-Sight 4.x.x Firmware
  • Send Data To an In-Sight Vision System- In-Sight 4.x.x Firmware
  • Explicit Messages - In-Sight 4.x.x Firmware
  • Time Sync Tab- In-Sight 4.x.x Firmware

Implicit Messages

Establish the Connection Using the Add-On Profile (AOP)

Get Data from an In-Sight Vision System

Send Data to an In-Sight Vision System

Explicit Messages

Time Sync Tab


Implicit Messages - In-Sight 4.x.x Firmware

EtherNet/IP implicit messaging allows an In-Sight vision system's inputs and outputs to be mapped into tags in the ControlLogix or CompactLogix PLC. Once these values are established, they are synchronized at an interval defined by the Requested Packet Interval (RPI). Each time the RPI expires, the PLC updates the vision system's status registers, and requests that the vision system update the PLC's status registers.

The figure below represents Ethernet-based I/O through EtherNet/IP:

Note: This information is covered in detail in the EtherNet/IP Object Model - In-Sight 4.x.x Firmware topic. For more information, see EtherNet/IP Object Model and Input/Output Assembly Objects.

The EtherNet/IP Vision Object keeps track of the status of the various subsystems in the In-Sight Sensor, as well as the data that is coming from, and going to the In-Sight Explorer Spreadsheet.

The Input Assembly and Output Assembly map various fields from the EtherNet/IP Vision Object:

  • The Input Assembly is the collection of In-Sight vision system data values sent to the PLC (PLC inputs).
  • The Output Assembly is the collection of data values received by the In-Sight vision system from the PLC (PLC outputs).

If there is an EtherNet/IP implicit messaging connection, then these values are updated on the client at the RPI. In conjunction, if the client updates values across an EtherNet/IP implicit messaging connection, those changes will be reflected in the various In-Sight Sensor subsystems, and the In-Sight Sensor will respond accordingly.

To setup an EtherNet/IP implicit messaging connection between an In-Sight vision system and a ControlLogix controller, the In-Sight vision system must first be configured in the ControlLogix I/O Configuration tree. A Generic Ethernet Module must be added as an I/O device under the node that corresponds to the Ethernet module in the rack.

Establish a Unicast Implicit Connection - In-Sight 4.8.0 - 4.9.x Firmware

Establish a Unicast Implicit Connection - In-Sight 4.10.x Firmware

Example: Verify a ControlLogix Connection

Establish a Multicast Implicit Connection with Multiple PLCs


Establish a Unicast Implicit Connection - In-Sight 4.8.0 - 4.9.x Firmware

If the vision system has In-Sight 4.8.0 - 4.9.0 firmware version installed, the following steps must be taken to transfer data between the In-Sight vision system and a ControlLogix or CompactLogix PLC on an EtherNet/IP network.

  1. Install the Add-On Profile (AOP) version 1.26.1, which will install Major Revision 10. For more information, see Establish the Connection Using the Add-On Profile.
  2. Establish the connection using the Add-On Profile (AOP). For more information, see Establish the Connection Using the Add-On Profile.

Install the Add-On Profile

Establish the Connection Using the Add-On Profile


Install the Add-On Profile

This topic covers how to install the Add-On Profile (AOP) for an In-Sight vision system running 4.x.x firmware. The Add-On Profile is used to simplify the integration between In-Sight vision systems and RSLogix 5000, by allowing the RSLogix 5000 software to know which type of module is being used and setting certain default parameters.

  1. Download the Add-On Profile (AOP) installer from the In-Sight support site: cognex.com/support/insight.
  2. Extract the installation files and double-click the MPSetup.exe file to launch the RSLogix 5000 Module Profiles Setup.

  3. Click Next several times, accepting the default selections in most cases.

  4. Click Finish.


Establish the Connection Using the Add-On Profile

This topic covers how to establish an implicit messaging connection with a single ControlLogix PLC using the Add-On Profile (AOP) for an In-Sight vision system running 4.x.x firmware.

  1. Open RSLogix 5000 and load the PLC's project.

    Note: The PLC must be Offline to add connections in RSLogix 5000.

  2. Under the I/O Configuration node, select the Ethernet Node under the Ethernet Module, right-click on the icon and select New Module from the menu:

  3. When the following dialog appears, select your model of In-Sight Vision System from the list. This option will appear once the Add-On Profile (AOP) is installed.

  4. After the selection is made, the configuration dialog for the In-Sight Vision system will be displayed:

    Note: The Time Sync tab is displayed only when connected to an In-Sight 5000 series vision system. For more information, see Time Sync Tab- In-Sight 4.x.x Firmware.

    The following fields need to be configured:

    • Name: This is the name given to the generic EtherNet/IP device; the tags created in RSLogix 5000 will be based on this name. It is recommended that the In-Sight vision system's name be used, to maintain consistency.
    • IP Address: The IP address of the In-Sight vision system.
    • Host Name: This setting is optional; only use this setting if there is a Domain Name Server (DNS) on the network.
  5. The Change button can be used to set the amount and type of data to be transferred between the In-Sight Vision System and the PLC. Electronic Keying can also be enabled using this button.

  6. (Optionally) The electronic keying can be disabled using the Change button if necessary.

    To disable keying: In the Module Definition dialog, select Revision 10 and select Disable Keying. Then click OK.

  7. After accepting the general communication parameters, the next step in the configuration process is displayed in the figure below:

    The following fields can be configured:

    • Requested Packet Interval (RPI): This field specifies the Requested Packet Interval (RPI), which defines the amount of time (in milliseconds) between data exchanges across an implicit messaging connection.

      Note: Beginning in In-Sight firmware version 3.30.00, the RPI value no longer has to be longer than the job execution time; implicit messaging connections now run asynchronous to the job execution. However, small RPI times (<20ms) may negatively impact the performance of vision jobs. For best results, the RPI time should be set to no more than half the time between when the In-Sight vision system completes the job execution and when the PLC requires the data.
    • Major Fault On Controller If Connection Fails While in Run Mode: This option will cause the controller to generate a major fault when the connection fails.

    • Inhibit Module: Checking this box prevents the PLC from attempting to establish a connection with an In-Sight vision system.

      Note: If the In-Sight vision system appears to be stuck in "Standby" mode, then inhibiting and re-enabling the module can cause the module to become operational again.

  8. After adding the module to ControlLogix, the I/O tree should appear as follows:

  9. RSLogix 5000 will then create tags that map to the In-Sight vision system's Input and Output Data, based on the name given to the device.

    • InSight_Top:I Scheduled Input: The table below represents the data that is sent FROM the In-Sight vision system to the PLC:

    • InSight_Top:O Scheduled Output: The table below represents the data sent TO the In-Sight vision system from the EtherNet/IP client (ControlLogix):


Establish a Unicast Implicit Connection - In-Sight 4.10.x Firmware

If the vision system has In-Sight 4.10.x firmware version installed, the following steps must be taken to transfer data between the In-Sight vision system and a ControlLogix or CompactLogix PLC on an EtherNet/IP network.

Note: The steps will vary depending on the version of RSLogix 5000 being used to program the PLC, and whether or not TestRun is enabled or disabled. For more information, see TestRun™.

TestRun Enabled and Add-On-Profile Previously Installed

  1. Establish the Connection Using a Generic ETHERNET-MODULE. For more information, see Establish the Connection Using a Generic ETHERNET-MODULE.

TestRun Enabled and Add-On-Profile Not Installed

  1. Install the EDS files included with In-Sight Explorer software. For more information, see Install the EDS Files.
  2. Establish the connection using the EDS generated profile. For more information, see Establish the Connection Using the EDS Generated Profile.

TestRun Disabled

  1. Establish the Connection Using the Add-On-Profile, with Keying Disabled. For more information, see Establish the Connection Using the Add-On Profile, with Keying Disabled.

TestRun Enabled and Add-On-Profile Previously Installed

TestRun Enabled and Add-On-Profile Not Installed

TestRun Disabled

Copyright © 1999 - 2019 | Cognex Corporation | All Rights Reserved.

In-Sight® Explorer Help | 2019 August 02 | Revision: 5.7.3.6


Establish the Connection Using a Generic ETHERNET-MODULE

This topic covers integrating In-Sight vision systems running In-Sight 4.10.x or 5.x.x firmware in RSLogix 5000, version 14-19. These versions of RSLogix 5000 do not support the EDS files, and a Generic ETHERNET-MODULE must be used instead. In-Sight Explorer includes .L5X files, which can be used to copy PLC controller tag data to/from user-friendly program tags, representing signals in the In-Sight vision system running In-Sight 4.10.x or 5.x.x firmware.

Note: The screen captures used in this topic were taken from RSLogix 5000, version 16. Some of the other versions of RSLogix 5000 may look slightly different.

  1. Open RSLogix 5000 and load the PLC's project.

    Note: The PLC must be Offline to add connections in RSLogix 5000.

  2. Add a connection to your Ethernet Communications Card. Under the I/O Configuration node, select the Ethernet Node under the Ethernet Module, right-click on the icon and select New Module from the menu.

  3. From the Select Module Type dialog in the Catalog tab, select the Communication Module Type Category Filter, Allen-Bradley as the Module Type Vendor Filter, select ETHERNET-MODULE (Generic Ethernet Module) and press the Create button.
  4. In the New Module dialog, enter the following:
    • The In-Sight vision system's name and IP address.
    • The Connection Parameters:
      • For In-Sight vision systems running In-Sight 5.x.x firmware, the Assembly Objects section defines the Assembly Instance that should be configured. For more information, see EtherNet/IP Object Model and Input/Output Assembly Objects.

      • For In-Sight vision systems running In-Sight 4.x.x firmware, the Assembly Objects section defines the Assembly Instance that should be configured. For more information, see EtherNet/IP Object Model and Input/Output Assembly Objects.

  5. After adding the vision system to the RSLogix project, the L5X rung import file can be used to create structured data for the connection.

    1. Within the main program, right-click on an empty rung and select the Import Rungs... option.

    2. Navigate to the .L5X file and click the Import... button.

      • If using In-Sight 4.10.x firmware, and RSLogix version 14-16, import the InSightGenEth_12_CopyRung.L5X file.
      • If using In-Sight 4.10.x firmware, and RSLogix version 17-19, import the InSight_12_CopyRung.L5X file.
      • If using In-Sight 5.x.x firmware, and RSLogix version 14-16, import the InSightGenEth_11_CopyRung.L5X file.

      • If using In-Sight 5.x.x firmware, and RSLogix version 17-19, import the InSight_11_CopyRung.L5X file.

      The files are located in the following location: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Factory Protocol Description\RSLogix

      Note: For information on which file to use, see Communicate with a Rockwell ControlLogix PLC.

  6. The Import Configuration dialog will then be used to change the names of the created tags to match the configuration.

    1. The generic names of the Tags will need to be modified. The top two lines will have an X beside them, and the Name of each will need to be modified.

    2. By clicking in the white space of the Name field, an arrow will appear, which will provide a drop-down menu that will contain replacement options for the default Name structure.

      The list should contain names that match the name given in Step 4 (the name of the In-Sight vision system; in this example, the name given was IS5705, so the list contains IS5705:I and IS5705:O).

      Replace the two generic names with the options in the drop-down menu.

    3. The bottom two lines will also need to be edited. Click on the text of the name so that the cursor icon appears and then replace the text prior to "_In" and _Out" with the name of the generic module or some other easily identifiable name (e.g. "MyCamera" in this example, since there is only one vision system).

      Note: he name given in this instance should be unique to each vision system that is added to the I/O configuration. If multiple vision systems are going to be deployed, these steps must be followed for each vision system, because each instance of the copy rungs that are created will point to a specific vision system. Therefore, for later troubleshooting, ensure that the names used are easily identifiable.
    4. Once all of the Tags have been updated from their default values, press the OK button.

  7. A new rung will have been added to the Main Routine below the rung that was added (the empty rung can be deleted).

  8. The project can now be downloaded to the PLC, and the PLC can be put into Run Mode.

  9. Once the rungs holding the copy instructions have been run, the new tags will be created in the Controller Tags table.

    In this example, the IS5705:I and IS5705:O tags are the raw input and output assemblies from the vision system, and the MyCamera_In and MyCamera_Out will contain the Control and Status blocks, as well as the User Data and Inspection Result arrays.


Establish the Connection Using the EDS Generated Profile

In-Sight Explorer includes .L5X files, which can be used to copy PLC controller tag data to/from user-friendly program tags, representing signals in the In-Sight vision system running In-Sight 4.10.x or 5.x.x firmware.

Note:
  • If using an EDS generated profile, although the maximum size of the Input Assembly is 500 bytes, the EDS generated profile will only allow a connection of up to 496 bytes.
  • When using Rockwell RSLogix Studio 5000, version 21 through 25, the In-Sight EDS generated profile’s default Input and Output Assembly sizes (496 bytes for each) cannot be edited and will default to the largest Input and Output Assembly sizes.
  • When using Rockwell RSLogix Studio 5000 version 19 and earlier, an Allen-Bradley Generic ETHERNET-MODULE must be used, instead of a Cognex Corporation In-Sight vision system specific module. For more information about adding and configuring a Generic ETHERNET-MODULE, see Establish the Connection Using a Generic ETHERNET-MODULE.
  1. Install the EDS files included with In-Sight Explorer software, if not already installed.

  2. Open RSLogix 5000 and load the PLC's project.

    Note: The PLC must be Offline to add connections in RSLogix 5000.

  3. Add a connection to your Ethernet Communications Card. Under the I/O Configuration node, select the Ethernet Node under the Ethernet Module, right-click on the icon and select New Module from the menu.

  4. From the Select Module Type dialog, select the type of In-Sight vision system that will be connected to the PLC and click Create.

    Note: After loading the new EDS files, new module types will show up and the appropriate module should be selected.

  5. From the New Module dialog, enter the In-Sight vision system's name and IP address, and then click the Change... button to configure the size of the connection.

  6. After adding the vision system to the RSLogix project, the L5X rung import file can be used to create structured data for the connection. Within the main program, right-click on an empty rung and select the Import Rungs... option. Navigate to the .L5X file and click the Import... button.

    • If using In-Sight 4.10.x firmware, import the InSight_12_CopyRung.L5X file, which is installed to the following location:

      C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Factory Protocol Description\RSLogix

    • If using In-Sight 5.x.x firmware, import the InSight_11_CopyRung.L5X file, which is installed to the following location:

      C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Factory Protocol Description\RSLogix

  7. In the Import Configuration dialog, select Tags and change the names of the created tags to match the configuration.
    • If using In-Sight 4.10.x firmware, set the InSight_12:I and InSight_12:O tags to the connection controller tags in the project so that they match the name given to the In-Sight vision system connection.

    • If using In-Sight 5.x.x firmware, set the InSight_11:I1 and InSight_11:O1 tags to the connection controller tags in the project so that they match the name given to the In-Sight vision system connection.

  8. Click the OK button of the Import Configuration dialog to close it. A rung will be added to the project, which includes the copy instructions for copying the data between the generic connection data and the structured data types included in the imported rung file.

    When writing your ladder program, reference the elements in the structured data variables; the copy rung above will automatically move the data to and from the structured data instances to the EtherNet/IP connection. Download and run to get the tags to copy data initially, otherwise an array of SINTS will be all that is seen.


Establish the Connection Using the Add-On Profile, with Keying Disabled

This topic covers how to establish a connection using the Add-On Profile with keying disabled for an In-Sight vision system running 4.10.x firmware.

In-Sight Explorer includes the InSight_12_CopyRung.L5X import file, which can be used to copy PLC controller tag data to/from user-friendly program tags, representing signals in the In-Sight vision system running In-Sight 4.10.x firmware with TestRun. The import file defines a User Defined data type that contains both the existing Add-On Profile (AOP) signals and the new TestRun signals.

  1. Open RSLogix 5000 and load the PLC's project.

    Note: The PLC must be Offline to add connections in RSLogix 5000.

  2. Add a connection to your Ethernet Communications Card. Under the I/O Configuration node, select the Ethernet Node under the Ethernet Module, right-click on the icon and select New Module from the menu.

  3. From the Select Module Type dialog, select the type of In-Sight vision system that will be connected to the PLC and click the Create button.

  4. In the New Module dialog, enter the In-Sight vision system's name and IP Address and click the Change... button.

  5. In the Module Definition dialog, select Revision 10 and select Disable Keying. Click OK.

  6. After adding the vision system to the RSLogix project, the L5X rung import file can be used to create structured data for the connection. Within the main program, right-click on an empty rung and select the Import Rungs... option. Navigate to the InSight_12_CopyRung.L5X file and click the Import... button.

    Note: The InSight_12_CopyRung.L5X file is installed to the following location: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Factory Protocol Description\RSLogix

  7. In the Import Configuration dialog, select Tags and change the names of the created tags to match the configuration. Set the InSight_12:I and InSight_12:O tags to the connection controller tags in the project so that they match the name given to the In-Sight vision system connection.

  8. Click the OK button of the Import Configuration dialog to close it. A rung will be added to the project, which includes the copy instructions for copying the data between the generic connection data and the structured data types included in the imported rung file.

    When writing your ladder program, reference the elements in the structured data variables; the copy rung above will automatically move the data to and from the structured data instances to the EtherNet/IP connection. It is important to note that the newly added camera module data will exist in Controller Tags. The User Defined data instances will exist in the Program Tags. You should write your ladder program only referencing the User Defined data instances in Program Tags. Download and run to get the tags to copy data initially, otherwise an array of SINTS will be all that is seen.


Example: Verify a ControlLogix Connection - In-Sight 4.x.x Firmware

For I/O messaging, the In-Sight vision system has been added as an input/output device in a ControlLogix project. After this project is downloaded to the controller, the I/O connection will be established (as is the case with other I/O devices - unless the Inhibit Module checkbox is set to Offline). Once a successful connection has been established, cyclic data transfers will be initiated, at the requested RPI.

To verify a proper I/O connection, follow these steps:

  1. Working Offline, perform the ControlLogix configuration steps from the applicable Establishing a Unicast Implicit Connection topic as outlined in Communicate with a Rockwell ControlLogix PLC.
  2. Download the project to the ControlLogix controller.
  3. Upon the completion of the download, the I/O device that corresponds to the In-Sight vision system should show no errors; this signifies that the I/O connection has been completed successfully.
  4. To verify the correct, 2-way transfer of I/O data, connect to the In-Sight vision system via In-Sight Explorer. Open the AcquireImage property sheet and set the Trigger parameter to External or Industrial Ethernet.
  5. Place the vision system Online.

  6. In RSLogix, go to the controller tags and change the state of the TriggerEnable bit from 0 to 1, enabling triggering of acquisitions over EtherNet/IP, as shown below:

  7. After this has been set, whenever the Trigger bit is changed from 0 to 1, the In-Sight vision system will acquire an image.

  8. After the inspection is completed, the InspectionCompleted toggle bit should change state, as shown below:


Establish a Multicast Implicit Messaging Connection with Multiple PLCs - In-Sight 4.x.x Firmware

If you want to send inspection results to more than one PLC, you can establish a multicast implicit messaging connection. A multicast connection allows all of the connected PLCs to consume data, but only one of the PLCs can produce data. To set up an EtherNet/IP implicit messaging connection between an In-Sight vision system and a ControlLogix controller, the In-Sight vision system must first be configured in the ControlLogix I/O Configuration tree.

To establish the multicast implicit messaging connection, for the first PLC:

  1. Working Offline, follow steps 1-4 from the applicable Establishing a Unicast Implicit Connection topic as outlined in Communicate with a Rockwell ControlLogix PLC.
  2. In the General tab of the In-Sight Vision System configuration dialog:
    • Connection must be set to "Input (Results Only)"
    • The Input Results from vision system size and data type must be identical for each connection.
    • (Optional) If you want to write data from one of the PLCs to an In-Sight vision system, set Connection to Data Bidirectional (for the writing PLC only). Only one ControlLogix controller can write to an In-Sight vision system at a time.
  3. In the Connection tab of the In-Sight Vision System configuration dialog:
    • RPI values must be the same for each In-Sight vision system connection.


Establish the Connection Using the Add-On Profile (AOP)

This topic covers how to establish an implicit messaging connection with a single ControlLogix PLC using the Add-On Profile (AOP) for an In-Sight vision system running 4.x.x firmware or 5.x.x firmware.

  1. Open RSLogix 5000 and load the PLC's project.

    Note: The PLC must be Offline to add connections in RSLogix 5000.

  2. Under the I/O Configuration node, select the Ethernet Node under the Ethernet Module, right-click on the icon and select New Module... from the menu:

  3. In the Select Module Type dialog, select your In-Sight Vision System. This option displays only after you install the Add-On Profile.

  4. After you select your In-Sight vision system, the New Module dialog displays:

    Note: The Time Sync tab is displayed when using In-Sight 5000 series, In-Sight 7000 Gen2 series, or In-Sight 9000 series vision systems. For more information, see Time Sync Tab- In-Sight 4.x.x Firmware.

    Complete the following fields on the General tab:

    • Name: Enter a name for the In-Sight vision system. Any tags created in RSLogix 5000 is based on this name. It is recommended to use the In-Sight vision system's name to maintain consistency.
    • IP Address: Enter the IP address of the In-Sight vision system.
    • Host Name: (Optional) Enter the Host Name of the In-Sight vision system. Use this setting only when there is a Domain Name Server (DNS) on the network.

  5. On the Connection tab, complete the following fields:

    • Requested Packet Interval (RPI): This field specifies the Requested Packet Interval (RPI) that defines the amount of time (in milliseconds) between data exchanges across an implicit messaging connection.

      Note: For best results you should set the RPI time to no more than half the time between when the In-Sight vision system completes the job execution and when the PLC requires the data.
    • Major Fault On Controller If Connection Fails While in Run Mode: This option will cause the controller to generate a major fault when the connection fails.

    • Inhibit Module: Check to prevent the PLC from attempting to establish a connection with an In-Sight vision system.

      Note: If the In-Sight vision system appears to be stuck in "Standby" mode, then inhibiting and re-enabling the module can cause the module to become operational again.

  6. After adding the module to ControlLogix, the I/O tree should appear as follows:

  7. The RSLogix 5000 then creates tags that map to the In-Sight vision system's Input and Output Data, based on the name given to the device.

    • is8xxx_AOP:I Scheduled Input: The table below represents the data that is sent FROM the In-Sight vision system to the PLC:

    • is8xxx_AOP:O Scheduled Output: The table below represents the data sent TO the In-Sight vision system from the EtherNet/IP client (ControlLogix):

Update a Previously Installed EDS Profile with the New Add-On Profile


Update Add-On Profile (AOP) Revision 10 to the Current Revision 12

This procedure allows you to update the Add-On Profile (AOP) revsion 10 to the current revision 12 for an In-Sight vision system running 4.x.x firmware. It assumes Add-On Profile (AOP) 1.26 (revision 10) has already been installed.

To use the new Add-On Profile (AOP) version 1.28 (installs revision 12):

Note: Before you start, make a note of the assembly IO changes between revisions. These changes are highlighted in the Input/Output Assembly Changes section.
  1. Install the Add-On Profile (AOP) version 1.28.

  2. Open the camera module properties and press the Change... button.

    Note: After updating, the data type of Input Results from Sensor and Output Data to Sensor will be reset to DINT-8, and the RPI settings in the Connection tab will be reset to 60ms. It is recommended to document the Module Properties settings before pressing the Change... button. You will need these information later.

  3. Choose revision 12 from the Revision drop down list.

  4. Correct errors in tags.

    Note: There are updates to the IO assembly, and you may see errors in the rungs using the tags highlighted in red below.

    Camera input/output tags for version 10:

    Camera input/output tags for version 12:


Get Data from an In-Sight Vision System - In-Sight 4.x.x Firmware

To get data from the In-Sight Explorer spreadsheet to a ControlLogix PLC, the data must be pushed into the EtherNet/IP stack by using the WriteEIPBuffer function. For more information, see WriteEIPBuffer.

This function takes a buffer of data created by the FormatOutputBuffer function and writes it to the data area in the In-Sight vision system's EtherNet/IP Input Assembly (input to the network). This data is then transferred to the PLC during the next RPI cycle. For more information, see FormatOutputBuffer.

The EIP buffer writes to this data area are queued, meaning that they do not happen during spreadsheet execution, but as a separate event slightly after the execution of the spreadsheet. This means that there is a small window of time during which an inspection will be complete, but a new buffer write will not have resolved.

It is important to use the ResultsValid bit to decide when to read data to prevent subtle intermittent timing issues in your PLC logic that can arise from this setup, as ResultsValid will only become high when data are ready to read, and not before.

EXAMPLE: Getting 32 Bit Integer Data from an In-Sight Vision System

The following steps explain how to format the data that will be sent from an In-Sight vision system to a ControlLogix PLC.

  1. To begin, using In-Sight Explorer, create a new job.
  2. From the Palette's Snippets tab, add these two Snippets to the spreadsheet: Acquisition > AcqCounter and Math & Logic > Random.
  3. Open the AcquireImage (A0) cell and set the Trigger parameter to Continuous.
  4. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category and double-click the FormatOutputBuffer function to insert it into the spreadsheet.
  5. From the FormatOutputBuffer dialog, click on the Add button. This will initiate the cell selection mode; select the "Scaled random number" cell of the Random snippet.
  6. From the FormatOutputBuffer dialog, use the Data Type pull-down menu to change the Data Type to 32 bit integer.

  7. From the FormatOutputBuffer dialog, click on the Add button again. This will initiate cell selection mode; select the count cell of the AcqCounter snippet. For more information, see Cell Selection Mode.

  8. Close the FormatOutputBuffer by clicking the OK button.
  9. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category, click on the Network subcategory and double-click on the WriteEIPBuffer function to insert it into the spreadsheet.
  10. Set the WriteEIPBuffer function's Buffer parameter as a cell reference to the just created FormatOutputBuffer Buffer data structure.
  11. Place the In-Sight vision system Online.

  12. The data should now be displayed in the Controller > Controller Tags node of RSLogix 5000.

    Note: The RSLogix Monitor Tags tab must be selected in order to display the data values.

EXAMPLE: Getting Floating Point Value Data from an In-Sight Vision System

If a floating point or a mix of equally sized data types needs to be sent, in ControlLogix create a User Defined Type. Copy the floating point data into the newly created User Defined Type from the In-Sight vision system's input tag.

The steps below illustrate how to copy two cells as floating point values:

  1. Place the In-Sight vision system Offline.
  2. Open the previously created FormatOutputBuffer function.

  3. From the FormatOutputBuffer dialog, use the Data Type pull-down menu to change the Data Type from 32 bit integer to 32 bit floating point.

    Note: Matching the Data Type being used by the vision system is not necessarily required. The bits are copied verbatim from the vision system's output buffers in the order that they appear in FormatOutputBuffer or the Format Outputs tab, regardless of the data type used to receive the buffer in the PLC.
  4. Place the In-Sight vision system back Online.
  5. In RSLogix, go into Offline mode.

  6. Within RSLogix, right-click on the Data Types > User-Defined folder and select New Data Type from the menu.

  7. Give the new data type a descriptive name and add two floating point values to the Members: list.

  8. Next, add a new tag to the project's Controller Tags, using the user defined data type.

  9. Finally, add a COP instruction to the MainRoutine ladder logic program, which will copy the data from the InSight_Top:I.InspectionResults[0] tag to the InSight_Top_Input tag.

    Note: The Length field is the number of the input structures that should be copied to the output. In this case, the input structures are 32-bit floating point values, so the COP command copies 64 bits from the vision system's output buffer into the user-defined type in the PLC. If we were using 16-bit integer types (INT)in the PLC's receiving buffers, then we would have used a length of 4 to get the same 64 bits, and if we were using 8-bit integer types (SINT), then we would have used a length of 8 to copy all 64 bits.

  10. After this program has been downloaded to the ControlLogix PLC, the data from the Random and Acquisition Counter In-Sight Explorer spreadsheet cells will now appear in the InSight_Top_Input tag in the floating point format:


Send Data To an In-Sight Vision System- In-Sight 4.x.x Firmware

In order to send data from the ControlLogix PLC to the In-Sight Explorer spreadsheet, the data must be pulled from the EtherNet/IP stack by using the ReadEIPBuffer function. For more information, see ReadEIPBuffer.

This function takes the data format created within the FormatInputBuffer function and reads the data from the data area of the EtherNet/IP Output Assembly (output from the network), and formats this data into the In-Sight Explorer spreadsheet. This data is received from the PLC every RPI cycle; the corresponding spreadsheet data is updated only when the spreadsheet executes. For more information, see FormatInputBuffer.

EXAMPLE: Sending 32 Bit Integer Data to an In-Sight Vision System

For this example, create a new job within In-Sight Explorer, then perform the following steps to configure the data that will be received by the ControlLogix PLC.

  1. Open the AcquireImage cell (A0) and set the Trigger parameter to Continuous.
  2. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category and double-click on the FormatInputBuffer function to insert it into the spreadsheet.

  3. From the FormatInputBuffer dialog, click on the Add button and add two 32-bit integers to the list.

  4. Close the FormatInputBuffer by clicking the OK button.
  5. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category, click on the Network subcategory and double-click on the ReadEIPBuffer function to insert it into the spreadsheet.
  6. Set the ReadEIPBuffer function's Buffer parameter as a cell reference to the just created FormatOutputBuffer Buffer data structure.
  7. The Data Access functions will automatically be added to the spreadsheet based on the fields added to the FormatOutputBuffer function.
  8. Place the In-Sight vision system in Online mode.

  9. Within RSLogix 5000, open the Controller Tags dialog and change the value of the InSight_Top:O.Data[1] and InSight_Top:O.Data[2] tags. The values in the In-Sight Explorer spreadsheet should change, as well:

EXAMPLE: Sending Floating Point Value Data to an In-Sight Vision System

If another data type, for instance a type other than the 32-bit integers type, or a mix of data types needs to be sent, the simplest method to accomplish this is to create a User Defined Type in ControlLogix, and then to copy that data from the In-Sight vision system's output tag to the newly created User Defined Type. The steps below illustrate how to copy to two cells as floating point values:

  1. In RSLogix, go into Offline mode.

  2. Within RSLogix, right-click on the User-Defined > Data Types folder and select New Data Type... from the menu.

  3. Give the new data type a descriptive name and add two floating point values to the Members: list.

  4. Next, add a new tag to the project's Controller Tags, using the user defined data type, as shown in the example below.

  5. Finally, add a COP instruction to the MainRoutine ladder logic program, which will copy the data from the InSight_Top_Output tag to the InSight_Top:O.Data[1] tag.

  6. Place the In-Sight vision system Offline.
  7. Open the previously created FormatInputBuffer function, and change the Data Type values of both to 32 bit floating point.
  8. Place the In-Sight vision system back Online.

  9. After this program has been downloaded to the ControlLogix PLC, the data in the InSight_Top_Output tag will now appear in the floating point format:


Explicit Messages - In-Sight 4.x.x Firmware

Unlike implicit messages, explicit messages are sent to a specific device and that device always responds with a reply to that message. As a result, explicit messages are better suited for operations that occur less frequently. Explicit messages can be used to read and write the Attributes in the EtherNet/IP Vision Object of the In-Sight Vision System, which may be used for changing jobs, acquiring images, sending Native Mode commands and retrieving result data. For more information, see Native Mode Communications.

Example: Change a Job

The most common explicit message sent to an In-Sight vision system from a ControlLogix PLC is an instruction to change a job. Explicit messages are sent from a ControlLogix PLC using MSG instructions. The following steps show how to add a MSG instruction in RSLogix to change a job on an In-Sight vision system:

  1. Add the following tags to the ControlLogix Controller Tags dialog:

    Note: This example assumes a maximum length of 30 characters for the job name. If your job's name is longer, then you will need to extend the SetJobData buffer to include a number of SINT structures equal to the number of characters in your longest job name plus two.

  2. Create the following rung in your RSLogix 5000 project:

    Note: This snippet is copying the length of the job name into the first two bytes of the SetJobData buffer, the string data into the same buffer starting at the third byte, and then sends that buffer to the JobName attribute of the vision system. Make sure to add the ".job" file extension onto the end of the job name.

    This rung uses the Set Offline bit in the implicit connection to force the In-Sight vision system Offline, because the JobName attribute of the Vision Object requires the In-Sight vision system to be Offline before it will change the job. The Set Offline bit waits for the In-Sight vision system to bring the Online bit low, then sets up the data containing the new job name and sends the MSG instruction to the In-Sight vision system. After the job change is completed, the falling edge of the TriggerSetJob tag will cause the In-Sight vision system to go back Online.

  3. To setup the MSG instruction, click the InSight_SetJobMsg … button. This will cause the Message Configuration dialog to appear:

    Note: This example assumes a maximum length of 30 characters for the job name. If your job's name is longer, then you will need to input a Source Length equal to the number of characters in your longest job name plus two.

    The following fields need to be configured:

    • Message Type: This is the type of message that will be sent; choose CIP Generic to send a message to vendor specific objects like the Vision Object.
    • Service Type: This is the service code that will be sent to the object; select Set Attribute Single to change a single attribute of the Vision Object.
    • Service Code: This field allows any type of service to the object; this field is disabled if a predefined service type is selected.
    • Class: This is the identifier of the class that the message will be sent to; the ID of the Vision Object is Hex 78.
    • Instance: This field specifies the instance number of the object that the message will be sent to; for In-Sight vision systems, the Vision Object only has one instance, so this field should be set to 1.
    • Attribute: The attribute number that the message will be sent to; in this case, the JobName attribute has the ID of 14 Hex.
    • Source Element: This field indicates the source for the data that is being sent with the message. For the JobName attribute, a String with a 2 byte length header needs to be sent. This string was formatted earlier using the COP and MOV instructions in the run that was created in the previous steps. This field should be set to InSight_SetJobData to send the new job name to the JobName attribute.
    • Source Length: This field indicates the number of bytes of the source element that will be sent to the object. In this instance, because all of the data in the source element needs to be sent, the bytes should be set to 32.

  4. The MSG instruction now needs to be told which device should have the explicit message sent to it. Click on the Communication tab of the Message Configuration dialog and press the Browse... button. Choose the In-Sight vision system from the I/O configuration as shown below:

  5. After downloading the program to the ControlLogix PLC, the current job should be able to be changed with RSLogix by using the InSight_JobName and the InSight_TriggerSetJob controller tags:

    Note: Make sure to add the ".job" extension at the end of the job name.
  6. The Job Loading, Job Load Complete, and Job Load Failed bits can be used to determine if the job loaded successfully.


Time Sync Tab- In-Sight 4.x.x Firmware

When the In-Sight Add-On Profile (AOP), Major Revision 10 is installed and an In-Sight 5000 series vision system is connected, the Time Sync tab is displayed in the Module Properties window. This tab shows the information on the Grandmaster Clock and the vision system's Local Clock, and is read-only.

Note: For more information on Time Synchronization (CIP-Sync), see Date/Time Settings Dialog and Configure Time Synchronization.


Rockwell ControlLogix PLC - In-Sight 5.x.x Firmware

These topics cover how to connect a ControlLogix PLC to an In-Sight vision system running In-Sight 5.1.0 or later firmware, and how to send and receive EtherNet/IP implicit messages.

  • Communicate with a Rockwell ControlLogix PLC
  • Implicit Messages - In-Sight 5.x.x Firmware
    • Establish a Unicast Implicit Connection - In-Sight 5.x.x Firmware
    • Example: Verify a ControlLogix Connection - In-Sight 5.x.x Firmware
    • Establish a Multicast Implicit Connection with Multiple PLCs - In-Sight 5.x.x Firmware
  • Get Data from an In-Sight Vision System - In-Sight 5.x.x Firmware
  • Send Data To an In-Sight Vision System - In-Sight 5.x.x Firmware
  • Explicit Messages - In-Sight Firmware 5.x.x

Implicit Messages

Establish the Connection Using the Add-On Profile (AOP)

Get Data from an In-Sight Vision System

Send Data to an In-Sight Vision System

Explicit Messages

Implicit Job Load Example From RSLogix PLC

Job Load by Name from RSLogix PLC

Time Sync Tab


Implicit Messages - In-Sight 5.x.x Firmware

EtherNet/IP implicit messaging allows an In-Sight vision system's inputs and outputs to be mapped into tags in the ControlLogix or CompactLogix PLC. Once these values are established, they are synchronized at an interval defined by the Requested Packet Interval (RPI). Each time the RPI expires, the PLC updates the vision system's status registers, and requests that the vision system update the PLC's status registers.

The figure below represents Ethernet-based I/O through EtherNet/IP:

Note: This information is covered in detail in the EtherNet/IP Object Model - In-Sight 5.x.x Firmware topic. For more information, see EtherNet/IP Object Model and Input/Output Assembly Objects.

The EtherNet/IP Vision Object keeps track of the status of the various subsystems in the In-Sight Sensor, as well as the data that is coming from, and going to the In-Sight Explorer Spreadsheet.

The Input Assembly and Output Assembly map various fields from the EtherNet/IP Vision Object:

  • The Input Assembly is the collection of In-Sight vision system data values sent to the PLC (PLC inputs).
  • The Output Assembly is the collection of data values received by the In-Sight vision system from the PLC (PLC outputs).

If there is an EtherNet/IP implicit messaging connection, then these values are updated on the client at the RPI. In conjunction, if the client updates values across an EtherNet/IP implicit messaging connection, those changes will be reflected in the various In-Sight Sensor subsystems, and the In-Sight Sensor will respond accordingly.

To setup an EtherNet/IP implicit messaging connection between an In-Sight vision system and a ControlLogix controller, the In-Sight vision system must first be configured in the ControlLogix I/O Configuration tree. A Generic Ethernet Module must be added as an I/O device under the node that corresponds to the Ethernet module in the rack.

Establish a Unicast Implicit Connection - In-Sight 5.x.x Firmware

Example: Verify a ControlLogix Connection

Establish a Multicast Implicit Connection with Multiple PLCs


Establish a Unicast Implicit Connection - In-Sight 5.x.x Firmware

If the vision system is has In-Sight 5.x.x firmware version installed, the following steps must be taken to transfer data between an In-Sight vision system and a ControlLogix or CompactLogix PLC on an EtherNet/IP network, depending on the version of RSLogix 5000 being used to program the PLC.

RSLogix 5000, Version 14-19

  1. Establish the connection using a Generic ETHERNET-MODULE. For more information, see Establish the Connection Using a Generic ETHERNET-MODULE.

RSLogix 5000, Version 20+

  1. Install the EDS files included with In-Sight Explorer software. For more information, see Install the EDS Files.
  2. Establish the connection using the EDS generated profile. For more information, see Establish the Connection Using the EDS Generated Profile.

Install the EDS Files

Establish the Connection Using the EDS Generated Profile

Establish the Connection Using a Generic ETHERNET-MODULE


Example: Verify a ControlLogix Connection - In-Sight 5.x.x Firmware

For I/O messaging, the In-Sight vision system has been added as an input/output device in a ControlLogix project. After this project is downloaded to the controller, the I/O connection will be established (as is the case with other I/O devices - unless the Inhibit Module checkbox is set to Offline). Once a successful connection has been established, cyclic data transfers will be initiated, at the requested RPI.

To verify a proper I/O connection, follow these steps:

  1. Working Offline, perform the ControlLogix configuration steps from the applicable Establishing a Unicast Implicit Connection topic as outlined in Communicate with a Rockwell ControlLogix PLC.
  2. Download the project to the ControlLogix controller.
  3. Upon the completion of the download, the I/O device that corresponds to the In-Sight vision system should show no errors; this signifies that the I/O connection has been completed successfully.
  4. To verify the correct, 2-way transfer of I/O data, connect to the In-Sight vision system via In-Sight Explorer.
  5. Open the AcquireImage property sheet and set the Trigger parameter to Industrial Ethernet.
  6. Place the vision system Online.

  7. In RSLogix, go to the controller tags and change the state of the TriggerEnable bit from 0 to 1, enabling triggering of acquisitions over EtherNet/IP, as shown below:

  8. After this has been set, whenever the Trigger bit is changed from 0 to 1, the In-Sight vision system will acquire an image.

  9. After the inspection is completed, the InspectionCompleted toggle bit should change state, as shown below:


Establish a Multicast Implicit Connection with Multiple PLCs - In-Sight 5.x.x Firmware

If you want to send inspection results to more than one PLC, you can establish a multicast implicit messaging connection. A multicast connection allows all of the connected PLCs to consume data, but only one of the PLCs can produce data. To set up an EtherNet/IP implicit messaging connection between an In-Sight vision system and a ControlLogix controller, the In-Sight vision system must first be configured in the ControlLogix I/O Configuration tree.

To establish the multicast implicit messaging connection, for the first PLC:

  1. Working Offline, follow steps 1-4 from the applicable Establishing a Unicast Implicit Connection topic as outlined in Communicate with a Rockwell ControlLogix PLC.
  2. In the General tab of the In-Sight Vision System configuration dialog:
    • Connection must be set to "Input (Results Only)"
    • The Input Results from vision system size and data type must be identical for each connection.
    • (Optional) If you want to write data from one of the PLCs to an In-Sight vision system, set Connection to Data (Bidirectional (for the writing PLC only). Only one ControlLogix controller can write to an In-Sight vision system at a time.
  3. In the Connection tab of the In-Sight Vision System configuration dialog:
    • RPI values must be the same for each In-Sight vision system connection.


Update a Previously Installed EDS Profile with the New Add-On Profile

This topic covers how to update a previously installed EDS profile with the new Add-On Profile (AOP) for an In-Sight vision system running 5.x.x firmware. These steps assume you have setup your In-Sight vision system in your RSLogix project with an EDS file.

Note: You must use an Allen-Bradley Generic ETHERNET-MODULE when using Rockwell RSLogix Studio 5000 version 14 and earlier.
  1. Install Add-On Profile (AOP) 1.28.
  2. Make a note of the EDS generated profile camera names & IP addresses that you want to replace with the Add-On Profile (AOP) camera module. You will need to use this information later.

  3. Delete EDS cameras from the module list (you will get tag errors). Deleting EDS cameras from the module list will remove the controller tags. It leaves the tags in the ladder as undefined tag, and marks the rungs with a red X or e (for error).

  4. Add the cameras back using the Add-On Profile (AOP) Module and use the same names and IP addresses of the deleted cameras. The icon will be the grey Rockwell Automation module.

  5. Delete the copy rungs needed for the EDS generated cameras.
    • These copy rungs are no longer needed since the Add-On Profile (AOP) creates module defined types and controller tags as structured data under the Controller->Controller tags. Previously, you needed these rungs to move the unstructured data under the Main Program to structured controller tags.
    • With the Add-On Profile (AOP), when you send data from In-Sight to the PLC, the data will appear in the input controller tags for the In-Sight: In-Sight Name:I. When you send data from the PLC to In-Sight, the data will appear in the output controller tags for the In-Sight: In-Sight Name: O.
  6. Search and replace all the camera tags and update those tags with the new tag names.
  7. Additionally, search and replace the structured tags. Replace these references with the new camera names: In-Sight Name:I and In-Sight Name: O.
  8. The EDS installation ladder uses the insight11_in and insight11_out tags that are created from the rung import. These tags use the user-defined types that map out the signals for control and status. Since these rungs are no longer needed, search and replace those tags with the In-Sight Name:I and In-Sight Name:O. The status and control parts of the tag and signal names remain the same.

Below is an example of vision systems setup with the EDS profile and the Add-On Profile (AOP) profile. Vision systems setup with the EDS profile have a number "1" appended at the end of each tag, while the systems setup with the Add-On Profile (AOP) do not.


Get Data from an In-Sight Vision System - In-Sight 5.x.x Firmware

To get data from the In-Sight Explorer Spreadsheet to a ControlLogix PLC, the data must be pushed into the EtherNet/IP stack by using the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

This function takes a buffer of data created by the FormatOutputBuffer function and writes it to the data area in the In-Sight vision system's EtherNet/IP Input Assembly (input to the network). This data is then transferred to the PLC during the next RPI cycle. For more information, see FormatOutputBuffer.

The EtherNet/IP buffer writes to this data area are queued, meaning that they do not happen during Spreadsheet execution, but as a separate event slightly after the execution of the Spreadsheet. This means that there is a small window of time during which an inspection will be complete, but a new buffer write will not have resolved.

It is important to use the ResultsValid bit to decide when to read data to prevent subtle intermittent timing issues in your PLC logic that can arise from this setup, as ResultsValid will only become high when data are ready to read, and not before.

EXAMPLE: Getting 32 bit Integer Data from an In-Sight Vision System

The following steps explain how to format the data that will be sent from an In-Sight vision system to a ControlLogix PLC.

  1. To begin, using In-Sight Explorer, create a new job.
  2. From the Palette's Snippets tab, add these two Snippets to the spreadsheet: Acquisition > AcqCounter and Math & Logic > Random.
  3. Open the AcquireImage cell and set the Trigger parameter to Continuous.
  4. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category and double-click on the FormatOutputBuffer function to insert it into the spreadsheet.
  5. From the FormatOutputBuffer dialog, click the Add button. This will initiate the cell selection mode; select the "Scaled random number" cell of the Random snippet.
  6. From the FormatOutputBuffer dialog, use the Data Type pull-down menu to change the Data Type to 32 bit integer.

  7. From the FormatOutputBuffer dialog, click on the Add button again. This will initiate cell selection mode; select the count cell of the AcqCounter snippet. For more information, see Cell Selection Mode.

  8. Close the FormatOutputBuffer by clicking the OK button.
  9. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category, click on the Network subcategory and double-click on the WriteResultsBuffer function to insert it into the spreadsheet.
  10. Set the WriteResultsBuffer function's Protocol parameter to EtherNet/IP, and the Buffer parameter as a cell reference to the just created FormatOutputBuffer Buffer data structure. Set a value of 3 in the WriteResultsBuffer Results Code parameter or reference any cell with integer data.
  11. Place the In-Sight vision system Online.

  12. The data should now be displayed in the Controller > Controller Tags node of RSLogix 5000.

    Note: The RSLogix Monitor Tags tab must be selected in order to display the data values.

EXAMPLE: Getting Floating Point Value Data from an In-Sight Vision System

If a floating point or a mix of equally sized data types needs to be sent, in ControlLogix create a User Defined Type. Copy the floating point data into the newly created User Defined Type from the In-Sight vision system's input tag.

The steps below illustrate how to copy two cells as floating point values:

  1. Place the In-Sight vision system Offline.
  2. Open the previously created FormatOutputBuffer function.

  3. From the FormatOutputBuffer dialog, use the Data Type pull-down menu to change the Data Type from 32 bit integer to 32 bit floating point.

    Note: Matching the Data Type being used by the vision system is not necessarily required. The bits are copied verbatim from the vision system's output buffers in the order that they appear in FormatOutputBuffer or the Format Outputs tab, regardless of the data type used to receive the buffer in the PLC.
  4. Place the In-Sight vision system back Online.
  5. In RSLogix, go into Offline mode.

  6. Within RSLogix, right-click on the Data Types > User-Defined folder and select New Data Type from the menu.

  7. Give the new data type a descriptive name and add two floating point values to the Members: list.

  8. Next, add a new tag to the project's Controller Tags, using the user defined data type.

  9. Finally, add a COP instruction to the MainRoutine ladder logic program, which will copy the data from the InSight_Top:I.InspectionResults[0] tag to the InSight_Top_Input tag.

    Note: The Length field is the number of the input structures that should be copied to the output. In this case, the input structures are 32-bit floating point values, so the COP command copies 64 bits from the vision system's output buffer into the user-defined type in the PLC. If we were using 16-bit integer types (INT)in the PLC's receiving buffers, then we would have used a length of 4 to get the same 64 bits, and if we were using 8-bit integer types (SINT), then we would have used a length of 8 to copy all 64 bits.

  10. After this program has been downloaded to the ControlLogix PLC, the data from the Random and Acquisition Counter In-Sight Explorer spreadsheet cells will now appear in the InSight_Top_Input tag in the floating point format:


Send Data To an In-Sight Vision System - In-Sight 5.x.x Firmware

In order to send data from the ControlLogix PLC to the In-Sight Explorer spreadsheet, the data must be pulled from the EtherNet/IP stack by using the ReadUserDataBuffer function. For more information, see ReadUserDataBuffer.

This function takes the data format created within the FormatInputBuffer function and reads the data from the data area of the EtherNet/IP Output Assembly (output from the network), and formats this data into the In-Sight Explorer Spreadsheet. This data is received from the PLC every RPI cycle; the corresponding Spreadsheet data is updated only when the Spreadsheet executes. For more information, see FormatInputBuffer and EtherNet/IP Object Model and Input/Output Assembly Objects.

EXAMPLE: Sending 32 Bit Integer Data to an In-Sight Vision System

For this example, create a new job within In-Sight Explorer, then perform the following steps to configure the data that will be received by the ControlLogix PLC.

  1. Open the AcquireImage cell (A0) and set the Trigger parameter to Continuous.
  2. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category and double-click on the FormatInputBuffer function to insert it into the spreadsheet.

  3. From the FormatInputBuffer dialog, click on the Add button and add two 32-bit integers to the list.

  4. Close the FormatInputBuffer by clicking the OK button.
  5. Right-click an empty cell and select Insert Function. From the left-side of the screen, expand the Input/Output category, click on the Network subcategory and double-click on the ReadUserDataBuffer function to insert it into the Spreadsheet.
  6. Set the ReadUserDataBuffer function's Protocol parameter to EtherNet/IP, and the Buffer parameter as a cell reference to the just created FormatOutputBuffer Buffer data structure.
  7. The Data Access functions will automatically be added to the spreadsheet based on the fields added to the FormatOutputBuffer function.
  8. Place the In-Sight vision system in Online mode.
  9. Within RSLogix 5000, open the Controller Tags dialog and change the value of the InSight_Top:O.Data[0] and InSight_Top:O.Data[1] tags.

  10. Determine if the User Data handshaking is needed. If the User Data Bypass is enabled, the exchange of data will mimic that of the 4.xx cameras. If the User Data Bypass is not enabled (default state), this new bit will add additional handshaking to the data exchange between PLC and In-Sight. Additional steps need to be done to display the data in the spreadsheet.

    1. If the Enable User Data Bypass is enabled in the Network Setting Dialog for the camera, the values in In-Sight Explorer spreadsheet will update immediately.

    2. If the Enable User Data Bypass is NOT enabled in the Network Setting Dialog for the camera (default):
      1. Set the User Data tag, SetUserData bit is a named tag, for this example it would be InSight_Top:O.Control.SetUserData.
      2. Clear the User Data tag above once you receive the User Data Ack bit. SetUserDataAck bit is a named tag, for this example it would be InSIght_Top:I.Status. SetUserDataAck.

EXAMPLE: Sending Floating Point Value Data to an In-Sight Vision System

If another data type, for instance a type other than the 32-bit integers type, or a mix of data types needs to be sent, the simplest method to accomplish this is to create a User Defined Type in ControlLogix, and then to copy that data from the In-Sight vision system's output tag to the newly created User Defined Type. The steps below illustrate how to copy to two cells as floating point values:

  1. In RSLogix, go into Offline mode.

  2. Within RSLogix, right-click on the User-Defined >Data Types folder and select New Data Type... from the menu.

  3. Give the new data type a descriptive name and add two floating point values to the Members: list.

  4. Next, add a new tag to the project's Controller Tags, using the user defined data type, as shown in the example below.

  5. Finally, add a COP instruction to the MainRoutine ladder logic program, which will copy the data from the InSight_Top_Output tag to InSight_Top:O.UserData[0] and InSight_Top:O.UserData[1] tags.

  6. Place the In-Sight vision system Offline.
  7. Open the previously created FormatInputBuffer function, and change the Data Type values of both to 32 bit floating point.
  8. Place the In-Sight vision system back Online.
  9. After this program has been downloaded to the ControlLogix PLC, the data in the InSight_Top_Output tag will now appear in the floating point format.

  10. Determine if the User Data handshaking is needed. If the User Data Bypass is enabled, the exchange of data will mimic that of the 4.xx cameras. If the User Data Bypass is not enabled (default state), this new bit will add additional handshaking to the data exchange between PLC and In-Sight. Additional steps will be needed to be done to display the data in the spreadsheet.

    1. If the Enable User Data Bypass is enabled (checked ON) in the Network Setting Dialog for the camera, the values in In-Sight Explorer spreadsheet will update immediately.

    2. If the Enable User Data Bypass is NOT enabled (unchecked which is the default state) in the Network Setting Dialog for the camera:

      1. Set the User Data tag, SetUserData bit is a named tag, for this example it would be InSight_Top:O.Control.SetUserData.

      2. Clear the User Data tag above once you receive the User Data Ack bit. SetUserDataAck bit is a named tag, for this example it would be InSight_Top:I.Status. SetUserDataAck.


Explicit Messages - In-Sight Firmware 5.x.x

Unlike implicit messages, explicit messages are sent to a specific device and that device always responds with a reply to that message. As a result, explicit messages are better suited for operations that occur less frequently. Explicit messages can be used to read and write the Attributes in the EtherNet/IP Vision Object of the In-Sight Vision System, which may be used for changing jobs, acquiring images, sending Native Mode commands and retrieving result data. For more information, see Native Mode Communications.

Example: Change a Job

The most common explicit message sent to an In-Sight vision system from a ControlLogix PLC is an instruction to change a job. Explicit messages are sent from a ControlLogix PLC using MSG instructions. The following steps show how to add a MSG instruction in RSLogix to change a job on an In-Sight vision system:

  1. Add the following tags to the ControlLogix Controller Tags dialog:

    Note: This example assumes a maximum length of 30 characters for the job name. If your job's name is longer, then you will need to extend the SetJobData buffer to include a number of SINT structures equal to the number of characters in your longest job name plus two.

  2. Create the following rung in your RSLogix 5000 project:

    Note: This snippet is copying the length of the job name into the first two bytes of the SetJobData buffer, the string data into the same buffer starting at the third byte, and then sends that buffer to the JobName attribute of the vision system. Make sure to add the ".job" file extension onto the end of the job name.

    This rung uses the Set Offline bit in the implicit connection to force the In-Sight vision system Offline, because the JobName attribute of the Vision Object requires the In-Sight vision system to be Offline before it will change the job. The Set Offline bit waits for the In-Sight vision system to bring the Online bit low, then sets up the data containing the new job name and sends the MSG instruction to the In-Sight vision system. After the job change is completed, the falling edge of the TriggerSetJob tag will cause the In-Sight vision system to go back Online.

  3. To setup the MSG instruction, click the InSight_SetJobMsg … button. This will cause the Message Configuration dialog to appear:

    Note: This example assumes a maximum length of 30 characters for the job name. If your job's name is longer, then you will need to input a Source Length equal to the number of characters in your longest job name plus two.

    The following fields need to be configured:

    • Message Type: This is the type of message that will be sent; choose CIP Generic to send a message to vendor specific objects like the Vision Object.
    • Service Type: This is the service code that will be sent to the object; select Set Attribute Single to change a single attribute of the Vision Object.
    • Service Code: This field allows any type of service to the object; this field is disabled if a predefined service type is selected.
    • Class: This is the identifier of the class that the message will be sent to; the ID of the Vision Object is Hex 78.
    • Instance: This field specifies the instance number of the object that the message will be sent to; for In-Sight vision systems, the Vision Object only has one instance, so this field should be set to 1.
    • Attribute: The attribute number that the message will be sent to; in this case, the JobName attribute has the ID of 14 Hex.
    • Source Element: This field indicates the source for the data that is being sent with the message. For the JobName attribute, a String with a 2 byte length header needs to be sent. This string was formatted earlier using the COP and MOV instructions in the run that was created in the previous steps. This field should be set to InSight_SetJobData to send the new job name to the JobName attribute.
    • Source Length: This field indicates the number of bytes of the source element that will be sent to the object. In this instance, because all of the data in the source element needs to be sent, the bytes should be set to 32.

  4. The MSG instruction now needs to be told which device should have the explicit message sent to it. Click the Communication tab of the Message Configuration dialog and press the Browse... button. Choose the In-Sight vision system from the I/O configuration as shown below:

  5. After downloading the program to the ControlLogix PLC, the current job should be able to be changed with RSLogix by using the InSight_JobName and the InSight_TriggerSetJob controller tags:

    Note: Make sure to add the ".job" extension at the end of the job name.
  6. The Command Executing bit (which can be on for a maximum of 2 seconds) and Command Failed bit can be used to determine if the job loaded successfully.


Implicit Job Load Example From RSLogix PLC

This topic provides an Implicit Job Load example for vision systems running In-Sight 5.x.x firmware.

  1. Place the In-Sight vision Offline, by setting the Set Offline bit high.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

  2. Set the job ID into bytes 4&5 of the command block. The job name on the camera must start with a JobID number (0-999).

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

    Byte 4-5

    Byte | Name | Description
    4 - 5 | Command | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.

  3. Set the Execute Command bit in the command block.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

    Byte 0

    Bit | Name | Description
    7 Set Offline

    When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
    6-5 | Reserved | Unused.
    4 | Execute Command | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.

  4. Wait for Command Complete to be set before clearing the Execute Command bit and the Offline bit. If the Command did not successfully complete, the Command Failed bit is also set.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    13 0 Online

    Offline

    Reason

    Missed

    Acq

             Reserved

    Trigger

    Ack

    Trigger

    Ready
    1 Error

    Command

    Failed

    Command

    Completed

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    2 Reserved Reserved Reserved

    Job

    Pass

    Exposure

    Complete

             Reserved Reserved

    Set User

    Data Ack
    3

    Soft

    Event

    Ack 7

    Soft

    Event

    Ack 6

    Soft

    Event

    Ack 5

    Soft

    Event

    Ack 4

    Soft

    Event

    Ack 3

    Soft

    Event

    Ack 2

    Soft

    Event

    Ack 1

    Soft

    Event

    Ack 0
    4 | Error Code (16-bit integer)
    5
    6 | Reserved (16-bit integer)
    7
    8 | Current Job ID (16-bit integer)
    9
    10 | Acquisition ID (16-bit integer)
    11
    12 | Inspection ID (16-bit integer)
    13
    14 | Inspection Result Code (16-bit integer)
    15
    16 | Inspection Results 0
    ...
    499 | Inspection Results 483

    Byte 1

    Bit | Name | Description
    7 | Error | This bit is set when an error has occurred, which is defined in the Error Code field.
    6 | Command Failed | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
    5 Command Completed

    This bit is set to indicate that Job Load has completed. When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.


Job Load by Name from RSLogix PLC

Note: The Job load by name feature is only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  1. Place the camera offline by setting the Set Offline bit high.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

  2. Write the Job Load by Name command into bytes 4 and 5 of the command block. The Job Load by Name command is value 0x4000.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

    Byte 4-5

    Byte | Name | Description
    4 - 5 | Command | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.

  3. Write the job name to bytes 8 – 495 (UserData) of the command block. The job name must be null terminated (i.e. a 0 must be in the byte immediately following the job name).

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

  4. Set the Execute Command bit in the command block.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    22 0 Set Offline Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

             Reserved

    Set User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0
    4 | Command
    5
    6 .. 7 | Reserved
    8 | User Data 0
    ...
    495 | User Data 487

    Byte 0

    Bit | Name | Description
    7 Set Offline

    When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
    6-5 | Reserved | Unused.
    4 | Execute Command | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.

  5. Wait for Command Complete or Command Failed to be set before clearing the Execute Command bit and the Offline bit.

    Instance | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
    13 0 Online

    Offline

    Reason

    Missed

    Acq

             Reserved

    Trigger

    Ack

    Trigger

    Ready
    1 Error

    Command

    Failed

    Command

    Completed

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    2 Reserved Reserved Reserved

    Job

    Pass

    Exposure

    Complete

             Reserved Reserved

    Set User

    Data Ack
    3

    Soft

    Event

    Ack 7

    Soft

    Event

    Ack 6

    Soft

    Event

    Ack 5

    Soft

    Event

    Ack 4

    Soft

    Event

    Ack 3

    Soft

    Event

    Ack 2

    Soft

    Event

    Ack 1

    Soft

    Event

    Ack 0
    4 | Error Code (16-bit integer)
    5
    6 | Reserved (16-bit integer)
    7
    8 | Current Job ID (16-bit integer)
    9
    10 | Acquisition ID (16-bit integer)
    11
    12 | Inspection ID (16-bit integer)
    13
    14 | Inspection Result Code (16-bit integer)
    15
    16 | Inspection Results 0
    ...
    499 | Inspection Results 483

    Byte 1

    Bit | Name | Description
    7 | Error | This bit is set when an error has occurred, which is defined in the Error Code field.
    6 | Command Failed | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
    5 Command Completed When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.
    Note: The camera clears the Command Completed bit when the Execute Command bit goes low.


Time Sync Tab

Time Sync Tab- In-Sight 5.x.x Firmware

When the In-Sight Add-On Profile (AOP), Major Revision 11 is installed and an In-Sight 7000 Gen2 series or In-Sight 9000 series vision system is connected, the Time Sync tab is displayed in the Module Properties window. This tab shows the information on the Grandmaster Clock and the vision system's Local Clock, and is read-only.

Note: For more information on Time Synchronization (CIP-Sync), see Date/Time Settings Dialog and Configure Time Synchronization.


Communicate with a Rockwell SLC 5/05 PLC

This section outlines a PCCC (PC3) Communications configuration between an In-Sight vision system and the PLC. This example uses the Allen-Bradley SLC5/05 and Rockwell 500 software.

Note: In-Sight vision systems running In-Sight firmware 5.1.0 or later do not support EtherNet/IP PCCC communications.

Necessary Components

  • In-Sight vision system with firmware version 2.2 through 4.9.1
  • Rockwell RSLogix 500 programming software (version 4.5 or higher)
  • Allen-Bradley SLC5/05 controller, with corresponding firmware to support RSLogix500

Using RSLogix 500

  1. From within the RSLogix 500 software program, open the .RSS file, then open the Channel Configuration dialog (Project Folder > Controller Folder > Channel Configuration).

  2. The Allen-Bradley SLC has 2 channels available for configuration: Channel 1 (Ethernet); and Channel 0 (DF1 Full Duplex - serial). Click on the Chan. 1 - System tab.

  3. Configure Channel 1 (Ethernet) as necessary. Consult with a network administrator for proper settings.

    Note: Verify that the IP/Subnet/Gateway parameters are correct on the PLC and the In-Sight vision system.

  4. Configure the Timeouts as required.

Note: The connection timeout and reply timeout are in milliseconds, inactivity is in seconds. These parameters will determine the Message Timeout parameter later used by the system when sending and receiving requests. (Msg Connection Timeout + Msg Reply Timeout + 5mS = Msg Timeout)

Message (MSG) Instruction

Message instructions may now be constructed within the application. Refer to the RSLogix 500 documentation for expanded instructions for developing messages. The following setup parameters can be configured within a Message (MSG) Instruction.

  • Type: Peer-To-Peer. This cannot be modified.
  • Read/Write: Select the function you want to perform on an In-Sight vision system. Read retrieves data from the In-Sight; Write sends data to the In-Sight.
  • Target Device: Choose PLC5 to talk to an In-Sight vision system. This tells the SLC which communication protocol to use. The In-Sight vision system acts much like a ControlLogix controller (see Rockwell document 13862).
  • Local/Remote: Choose Local to indicate that the In-Sight vision system is on the same network as the SLC; Remote tells the SLC that you will be communicating to an In-Sight on another network. For remote communication, you must direct the message through another device acting as a gateway to that secondary network. Typically, this could be an Allen-Bradley ControlLogix controller. (Refer to Rockwell documentation on how to address devices on other networks through a gateway.)
  • Control Block: This is a temporary integer file that the MSG instruction uses to store data (i.e., IP address, message type, etc.). This is typically not the user data to be sent.
  • Control Block Length: This is automatically computed by the MSG instruction.
  • Setup Screen: Selecting Setup Screen will open the Message Instruction Setup dialog.

Setup Screen for the MSG Instruction

The following setup parameters can be configured within a MSG Instruction Setup screen.

General Tab

This Controller section:

  • Communication Command: Should be the same command (READ/WRITE) that was chosen on the first screen (as seen in MSG Instruction screen). For more information, see Message (MSG) Instruction.

  • Data Table Address: This is the location of the data file on the SLC where data will be written to (READ) or sent from (WRITE) (as seen in MSG Instruction screen). In this instance, 'F8:0', 'F' indicates the float file, '8' indicates the file number 8, and '0' indicates the offset into that file (in this case, start at the 0th element). The figure below shows an example of the Float Table accessed from the RSLogix 500 main screen.

  • Size in Elements: This is the number of elements (or individual data) to send. In this example, two elements are being sent (3.14 and 78.87).
  • Channel: Depends on the configuration of the SLC. In the SLC, Channel 1 is the Ethernet port.

Target Device section:

  • Message Timeout: Choose an appropriate length of time in which the In-Sight vision system will be able to respond. If the In-Sight does not respond within this length of time, the MSG instruction will error out. This parameter cannot be changed from this screen. Message Timeout is determined by the parameters entered in the Channel 1 setup dialog (refer to step 4 of Using RSLogix 500).

  • Data Table Address: This is the location on the In-Sight vision system where data will be read or written to. In this instance, 'F8:1', 'F' indicates that the data is of type float (real); '8' indicates that the In-Sight will ignore ? (data is always being written to the Input Assembly, and read from the Output Assembly); and the '1' has different meanings, based on whether or not a READ or WRITE is being performed.

    When a WRITE is occurring, the '1' indicates the actual data byte offset into the data portion of the Input Assembly. When a READ is occurring, the '1' indicates the element. For example: If the message were a READ, 'F8:2' would instruct to read the 3rd element (the ':2' indicates the 3rd element, due to the SLC's 0-based index), which is of type Float from the Output Assembly (because a READ gets data from the In-Sight's Output Assembly). If the message were a WRITE, 'F8:12' would indicate to write a float value to the 12th byte of the data section of the Input Assembly. WRITE indicates the actual byte of the assembly to begin writing data in to; READ indicates an actual data element.

    Note: The ST10:0 destination address is used for sending Native Mode commands to an In-Sight vision system. To send a string or other data type to an In-Sight, use a destination address other than ST10:0.
  • Local/Remote: Set to Local or Remote, depending on the application.
  • MultiHop: This setting is dependent on the information previously entered. For successful In-Sight communication, this should YES at this time.

MultiHop Tab

The MultiHop tab is used to identify the address of the In-Sight system and the controller location. Both must be identified in order to route communications to the In-Sight vision system. As previously discussed, the In-Sight vision system acts as a ControlLogix module during PC3 communications.

Using the MSG Instruction to Receive Data

A MapSpec specifies a data mapping, which consists of a list of specifiers delimited by colon (:) characters. Each specifier has two parts: the starting byte and a data type code. The various data type codes are listed in the following table:

Code | Data Type
i | 8-bit integer
u | 8-bit unsigned integer
il | 16-bit integer
ul | 16-bit unsigned integer
d | 32-bit unsigned integer
f | 32-bit floating-point number
s | text string

In the following examples, assume that the In-Sight spreadsheet has a cell containing a WriteEIP function with a MapSpec of: '0f:4f:8il:10il:12il'

EXAMPLE:

In the RSLogix500 MSG Instruction, we have 'N8: 2' for the target device data table address (DTA = 'N8:2'), and we are requesting 3 elements (n = 3).

In the MSG instruction: 'N' indicates that integers are going to be transferred; '2' indicates that it will begin with the 3rd item of the MapSpec.
Note: All MapSpec parameters are zero-based.

The In-Sight vision system replies with the data at the 3rd item in the MapSpec (8il), followed by 10il and 12il (3 elements, all integers).

EXAMPLE: | DTA = 'F8: 1' n = 2 The reply would be the data at 4f (the 2nd item of the MapSpec) and In-Sight attempts to combine all the data at 8il and 10il to make the second float. Only contiguous like elements (e.g. 2 float, 42 integers, 13 characters, etc.) can be requested.
EXAMPLE: | DTA = 'F8: 0' n = 2 The reply would be the data at 0f and 4f (2 elements, both floats).
EXAMPLE: | DTA = 'N8: 3' n = 2 The reply would be the data at 10il and 12il (2 elements, both integers). This example reinforces getting contiguous elements of the same type.

Sending Native Mode Commands from an SLC5/05

  1. Configure the SLC5/05 as necessary.

  2. Create a String Table that will hold your Native Mode commands. For more information, see Native Mode Commands.

  3. Add the required Native Mode command strings to the Data File.

  4. Add a new Message (MSG) instruction to your ladder logic and configure it as shown in the following example:

  5. Enter the MSG Setup Screen and configure it as follows:

    THIS CONTROLLER (SLC) | PARAMETER | DESCRIPTION

    Data Table Address:

    ST10:1

    1st element from String Table (ST) created above

    Size in Elements:

    1

    Always set to 1. PCCC MSG only allows for 1 string (therefore 1 command) to be sent at a time.

    Channel:

    1

    Set this to the Ethernet Channel of your controller.
    TARGET DEVICE (IN-SIGHT SENSOR) | PARAMETER | DESCRIPTION

    Message Timeout:

    (From the Channel Configuration dialog)

    Data Table Address:

    ST10:0

    This is the destination address. For Native Mode commands, this will always be ST10:0. For more information, see Native Mode Commands.

  6. Click the MultiHop tab and configure it as required:

    EXAMPLE: In this example, only the IP address of the destination In-Sight vision system needed to be set:

  7. When everything is configured, close the MSG window.
  8. Save your ladder logic, download it to the controller, then go online and set the controller in RUN mode.
  9. Trigger the message to send it to the In-Sight vision system.

Message Instruction Results

The Enable (EN) bit of the message instruction will be set to 1 when the input to the instruction is set high. The Done (DN) bit will be set to 1 when In-Sight has replied that the Native Mode command was received and executed with success. If the Error bit (ER) is enabled (set to 1), there has been a problem with the message instruction. If an error occurs, click the Setup Screen for the MSG instruction. For more information, see Native Mode Commands.

The Error Code will be shown at the bottom of the window. Error codes are listed in the table below:

Error Codes

ERROR CODE | DESCRIPTION | NATIVE MODE RETURN CODE
00 | Success - No Error | 1
10 | Illegal command or format | 0
EE | Command cannot be executed | -2, -4 or -5
D9 | Reply not received before user-specified timeout | NA
F2 | Invalid parameter or invalid data | -1


Mitsubishi MELSEC Communication Protocols

In-Sight vision systems are capable of communicating with Mitsubishi MELSEC Automation Controllers using three different MELSEC communication protocols.

Note:
  • The term Programmable Logic Controllers/Motion Controllers (PLC/MC) is used in the In-Sight Explorer GUI, which is synonymous with the term Automation Controllers.
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
Note: The term Programmable Logic Controllers/Motion Controllers (PLC/MC) is used in the In-Sight Explorer GUI, which is synonymous with the term Automation Controllers. Also, in this topic, Robot PLC/MC and Controllers are referred as "Automation Controller".

In-Sight vision systems support three methods for communicating with Mitsubishi MELSEC Automation Controllers:

 | CC-Link* | CC-Link IE Field Basic | SLMP | SLMP SCanner
PLC/Motion Controllers | Supported | Supported | Supported | Supported
Robot Controllers** |  |  | Supported | Supported
*CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems/sensors running In-Sight firmware 5.x.x or later. ** The In-Sight 2000 series vision sensor does not support robot controllers.

In-Sight vision systems can also be configured for the iQ Sensor Solution using the SLMP Scanner protocol.

CC-Link

Communication between an Automation Controller and an In-Sight vision system on a CC-Link network is facilitated through the use of the In-Sight CIO-MICRO-CC I/O module. This connection only supports data synchronization, and does not provide a built-in means to send commands (such as "trigger," "change job," or "Online/Offline") from the Automation Controller to the vision system. The CC-Link V1 network supports up to 112 bits and 16 words of input and output data; while also capable of occupying one station and using between one and eight cycles. The CC-Link V2 network supports up to 1008 bits and 128 words of input and output data; while also capable of occupying between one and four stations and using between one and eight cycles. The ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, WriteCCLinkBitBuffer and WriteCCLinkWordBuffer functions are used to communicate data between a vision system and an Automation Controller, via the CIO-MICRO-CC I/O module, on the CC-Link network. For more information, see ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, WriteCCLinkBitBuffer and WriteCCLinkWordBuffer.

Note: CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

CC-Link IE Field Network Basic

CC-Link IE Field Basic is a protocol designed to integrate Ethernet devices into a Mitsubishi Automation Controller. As opposed to the existing SLMP (MC Protocol), the Mitsubishi automation controllers act as the master, driving the communications to the slave devices over standard UDP messaging. The communications support 64 bits and 32 16-bit words of data per station in each direction, with each slave supporting 4 stations. The data is mapped into controller memory through the Mitsubishi setup tools (GXWorks 2/3).

Once the protocol is enabled and the vision system is configured in the controller, the controller will begin cyclic communications to the In-Sight vision system through a request/response mechanism.

SLMP

The basic Seamless Message Protocol (SLMP) connection supports the exchange of data between an Automation Controller and the In-Sight vision system. This connection does not provide a built-in means to send commands (such as "trigger," "change job," or "Online/Offline") from the Automation Controller to the vision system. Executing In-Sight commands via the basic SLMP connection requires the use of In-Sight Native Mode string commands, along with additional programming within the Automation Controller. The basic SLMP connection is best for applications that do not include In-Sight commands issued by the Automation Controller, or for compatibility with older applications that were designed to work with Native Mode string commands. For more information, see Native Mode Commands.

SLMP Scanner

The SLMP Scanner connection also supports the exchange of data between an Automation Controller and the In-Sight vision system. However, this connection also provides dedicated control and status channels that allow the Automation Controller to issue vision system commands through direct addressing of the control and status registers. In addition, the SLMP Scanner connection provides dedicated command channels for sending and receiving more advanced Native Mode string commands that are not included in the control and status channels. The SLMP Scanner connection is best for applications that include vision system commands issued by the Automation Controller, and do not need to be compatible with existing applications that use Native Mode commands. For more information, see Native Mode Commands.

This topic covers the configuration and usage of SLMP Scanner with In-Sight vision systems, using In-Sight Explorer. For information about using SLMP Scanner within the EasyBuilder development environment, please refer to the Help tab of the Palette.

Note: The SLMP Scanner connection is only supported by In-Sight vision systems running In-Sight Explorer firmware version 4.5.0 or later, and In-Sight Explorer software version 4.5.0 or later.

iQ Sensor Solution

Mitsubishi iQ Sensor Solution is a factory protocol that enables the GX Works2 software to control In-Sight vision systems over SLMP Scanner protocol. For more information, see Configure In-Sight Vision Systems for SLMP Scanner Communications.

The topic covers how to discover In-Sight vision systems on the network and read/write the vision system's SLMP Scanner parameter settings and monitor the status of a vision system from GX Works 2.

Note: iQ Sensor Solution is only available on In-Sight vision systems using In-Sight firmware 4.x.x.

Communicate with a Mitsubishi Automation Controller on a CC-Link Network via an Anybus X-gateway

Communicating with a Mitsubishi Automation Controller via CC-Link

Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic

Configuring In-Sight Vision Systems for SLMP Communications

Configuring In-Sight Vision Systems for SLMP Scanner Communications

SLMP Scanner Factory Interface

Communicate with a Mitsubishi L-Series Automation Controller via iQ Sensor Solution


Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an In-Sight CIO-MICRO-CC I/O Module

This topic encompasses an overview of the Mitsubishi CC-Link communication protocol and how to incorporate In-Sight vision systems with Mitsubishi Q-Series Automation Controllers, using the In-Sight CIO-MICRO-CC I/O module. Connected directly to the Automation Controller through a CC-Link specified cable, the CIO-MICRO-CC I/O module and the vision system are capable of being used in either an Endpoint or Midspan configuration for CC-Link communications. For more information about the connection and installation of the devices, please refer to the In-Sight® CIO-MICRO and CIO-MICRO-CC I/O Module Installation Manual included with In-Sight Explorer software.

Note: CC-Link is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

Configuring In-Sight Vision Systems for CC-Link Protocol Communications

This section describes how to connect to an In-Sight vision system using CC-Link communications to a Mitsubishi Q-Series Automation Controller. The CIO-MICRO-CC I/O Module acts as a gateway between the In-Sight vision system and the Mitsubishi Q-Series Automation Controller. The ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, WriteCCLinkBitBuffer and WriteCCLinkWordBuffer functions are used to create a CC-Link protocol connection between an In-Sight vision system and a Mitsubishi Automation Controller. For more information, see ReadCCLinkBitBuffer, ReadCCLinkWordBuffer, WriteCCLinkBitBuffer, or WriteCCLinkWordBuffer.

Configuring the In-Sight CIO-MICRO-CC for CC-Link Communications

CC-Link communications are set up through the CC-Link connection on the CIO-MICRO-CC I/O module and the Mitsubishi Q-Series Automation Controller. These steps assume that the In-Sight vision system and CIO-MICRO-CC I/O module have been connected to the Automation Controller, and are ready to be configured within In-Sight Explorer for CC-Link communications.

  1. From the In-Sight Network pane, select the desired In-Sight vision system and connect to it. For more information, see In-Sight Network.
  2. From the Sensor menu, select CC-Link Settings to launch the CC-Link Settings dialog.
  3. If the desired CIO-MICRO-CC I/O module is not displayed in the CC-Link Settings dialog, press the I/O Module button, which opens the I/O Module Configuration dialog, to configure the I/O module.
  4. In the CC-Link Settings dialog, configure the settings to match those of the connected Mitsubishi Q-Series Automation Controller.
  5. Press OK to close the CC-Link Settings dialog.

Getting Data From an In-Sight Vision System To a Mitsubishi Automation Controller

In order to get data from the In-Sight Explorer spreadsheet to a Mitsubishi Automation Controller, the data must be transferred using the WriteCCLinkBitBuffer (e.g. pass/fail data) and WriteCCLinkWordBuffer (e.g. integer, floating-point values and string data) functions. Each function takes an individual buffer of data created by a FormatOutputBuffer function and writes the data to the CC-Link memory buffers on the CIO-MICRO-CC I/O module. This data is then transferred during the next update cycle. For more information, see FormatOutputBuffer.

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. This FormatOutputBuffer function will be used to transmit the word data (e.g. integer, floating-point values and string data).
  3. From the FormatOutputBuffer dialog, click on the Add button. This will initiate the cell selection mode; select the integer, floating-point values and/or string data that will be transferred to the Mitsubishi Automation Controller. For more information, see Cell Selection Mode.
  4. If there is additional data to be sent, again, from the FormatOutputBuffer dialog, click on the Add button. Once again this will initiate the cell selection mode; select the additional data to transfer.
  5. Close the FormatOutputBuffer dialog by clicking the OK button.
  6. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteCCLinkWordBuffer function, from the right pane, to insert it into the spreadsheet.
  7. Set the WriteCCLinkWordBuffer function's Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure. For more information, see Cell References - Relative/Absolute.
  8. Add another FormatOutputBuffer function; this function will be used to transmit the bit data (e.g. pass/fail data).
  9. Follow the directions for step 3. When configuring the FormatOutputBuffer function, ensure that the Data Type parameter is set to Bit.
  10. Close the FormatOutputBuffer by clicking the OK button.
  11. Add the WriteCCLinkBitBuffer function to the spreadsheet.
  12. Set the WriteCCLinkBitBuffer function's Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.

Sending Data To an In-Sight Vision System From a Mitsubishi Automation Controller

In order to send data from the Mitsubishi Automation Controller to the In-Sight Explorer spreadsheet, the data must be transferred from the CIO-MICRO-CC I/O module by using the ReadCCLinkBitBuffer (e.g. enabling/disabling functions) and ReadCCLinkWordBuffer (e.g. integer, floating-point values and string data) functions. These functions take the formatted data created within the FormatInputBuffer function and reads the corresponding memory area of the CIO-MICRO-CC I/O module. This data is then formatted into the In-Sight Explorer spreadsheet. For more information, see FormatInputBuffer.

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. This FormatInputBuffer function will be used to receive the word data (e.g. integer, floating-point values and string data).
  3. From the FormatInputBuffer dialog, click on the Add button and add a 32-bit float and a 32-bit integer to the list.
  4. Close the FormatInputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadCCLinkWordBuffer function, from the right pane, to insert it into the spreadsheet .
  6. Set the ReadCCLinkWordBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  7. Add another FormatInputBuffer function; this function will be used to receive the bit data (e.g. enabling/disabling functions).
  8. From the FormatInputBuffer dialog, click on the Add button and add a bit data type.
  9. Close the FormatInputBuffer dialog by clicking the OK button.
  10. Add the ReadCCLinkBitBuffer function to the spreadsheet.
  11. Set the ReadCCLinkBitBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  12. Once the functions have been implemented, place the In-Sight vision system Online to test the configuration. For more information, see Online/Offline.


Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic

CC-Link IE Field Basic is a protocol designed to integrate Ethernet devices into a Mitsubishi Automation Controller. As opposed to the existing SLMP (MC Protocol), the Mitsubishi automation controllers act as the master, driving the communications to the slave devices over standard UDP messaging. The communications support 64 bits and 32 16-bit words of data per station in each direction, with each slave supporting 4 stations. The data is mapped into controller memory through the Mitsubishi setup tools (GXWorks 2/3).

Once the protocol is enabled and the vision system is configured in the controller, the controller will begin cyclic communications to the In-Sight vision system through a request/response mechanism.

Configuring In-Sight Vision Systems for CC-Link Protocol Communications

This section describes how to connect to an In-Sight vision system using CC-Link communications to a Mitsubishi Q-Series Automation Controller.

Enabling CC-Link IE Field Basic

Note:
  • To enable CC-Link IE Filed Basic from the EasyBuilder View, refer to the EasyBuilder Help (Communication > Device Setup > Communicating with Mitsubishi Devices > CC-Link IE Field Basic).
  • For more information on CC-Link IE Field Basic, refer to Mitsubishi's CC-Link IE Field Network Basic Reference Manual.

In-Sight Explorer

  1. Open In-Sight Explorer and connect to the desired In-Sight vision system.
  2. From the Sensor menu, open the Network Settings dialog.
  3. In the Industrial Ethernet Protocols section of the dialog, select CC-Link IE Field Basic.
  4. Restart the In-Sight vision system, and the CC Link IE Field Basic protocol will be enabled upon completion of the power cycle.

Mitsubishi GX Works 2

  1. Open the Mitsubishi GX Works 2 software to connect their PLC to the In-Sight vision system.
  2. Click on the Built-in Ethernet Port Setting tab and presses the CC-Link IEF Basic Setting button.
  3. Check the Use the CC-Link IEF Basic checkbox.
  4. Click on the Network Configuration Setting button to open the CC-Link IEF Basic Configuration dialog.
  5. Add the vision system to the link scan list, and selects the desired number of stations (1-16) to scan on the vision system.
  6. Accept changes to the dialog.
  7. Select the PLC memory used to store the synchronized CC-Link IEF Basic registers.
  8. Accept all parameter dialogs and downloads the project to the PLC.
  9. After restarting the PLC, it will begin scanning the vision system over CC-Link IEF Basic.

Configuring the In-Sight Vision System to Receive Image Acquisition Triggers

  1. Open the AcquireImage function's property sheet. For more information, see AcquireImage.
  2. Set the Trigger parameter to Industrial Ethernet.
  3. Place the In-Sight vision system Online. For more information, see Online/Offline.
  4. An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the RY Block, or by monitoring the Trigger Ready, Trigger Ack and Missed Acq bits in the RX Bit Block.
Note: The CC-Link IE Field Basic Interface topic contains detailed information about mapping the In-Sight vision system's inputs and outputs into process memory, though the layout of the blocks depends on the version of In-Sight firmware running on the In-Sight vision system. For more information, see CC-Link IE Field Network Basic Factory Interface.

Getting Data From an In-Sight Vision System

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet. For more information, see FormatOutputBuffer.
  2. From the FormatOutputBuffer dialog, click on the Add button. This will initiate the cell selection mode; select the data that will be transferred to the MELSEC Automation Controller. For more information, see Format Input/Output Buffer Dialogs or Cell Selection Mode.
  3. If there is additional data to be sent, again, from the FormatOutputBuffer dialog, click on the Add button. Once again this will initiate the cell selection mode; select the additional data to transfer.
  4. Close the FormatOutputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteResultsBuffer function, from the right pane, to insert it into the spreadsheet. For more information, see WriteResultsBuffer.
  6. Set the WriteResultsBuffer function's Protocol Parameter to 8 = CC-Link IE Field Basic Bit or 9 = CC-Link IE Field Basic Word, and the Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure. For more information, see Cell References - Relative/Absolute.
  7. Optionally, set the Result Code parameter as a cell reference to a cell in the spreadsheet to retrieve the result code with the inspection results.

Sending Data to an In-Sight Vision System

Note: In order to trigger the In-Sight vision system to read the user data from the MELSEC Automation Controller, the Set User Data> bit in the RY Block must be triggered from the Automation Controller.
  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatInputBuffer dialog, click on the Add button and add a 32-bit float and a 32-bit integer to the list.
  3. Close the FormatInputBuffer dialog by clicking the OK button.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadUserDataBuffer function, from the right pane, to insert it into the spreadsheet . For more information, see ReadUserDataBuffer.
  5. Set the ReadUserDataBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  6. Set the ReadUserDataBuffer function's Protocol parameter to 8 = CC-Link IE Field Basic Bit or 9 = CC-Link IE Field Basic Word.
  7. Once the functions have been implemented, place the In-Sight vision system Online to test the configuration.

CC-Link IE Field Network Basic Factory Interface


CC-Link IE Field Network Basic Factory Interface

This topic covers the CC-Link IE Field Basic communication protocol for In-Sight vision systems.

Ports

The CC-Link IE Field Basic protocol runs over 2 UDP ports:

Port | Description
61450 | Cyclic request/response messages
61451 | NodeSearch and IPAddressSet messages
45237 | Base SLMP messaging (GetCommunicationSetting)

Signal Layout

The defined data blocks allow you to control where the vision system is reading and writing data to and from the Automation Controller. For easier application setup, the various control and status bits required for command functionality are grouped into contiguous blocks, which can be processed together. When setting up the interaction between the vision system and the Automation Controller, you will need to choose the starting address and device type for each block of data.

Block | Address | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
RY | 0 | 0 | Set Offline | Reserved |  | Execute Command | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 8 | 1 | Reserved
 | 16 | 2 | Reserved |  |  |  | Clear Exposure Complete | Clear Error | Reserved | Set User Data
 | 24 | 3 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
 | 32..63* | 4..7 | User Data (Bit Area)
 | *Up to 255 when occupying 4 stations.
RWw | 0 | 0..1 | Command
 | 1..31* | 2..63 | User Data
 | *Up to 127 when occupying 4 stations.
RX | 0 | 0 | Online | Offline Reason |  |  | Missed Acq | Reserved | Trigger Ack | Trigger Ready
 | 8 | 1 | Error | Command Failed | Command Completed | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | System Busy
 | 16 | 2 | Reserved |  |  | Job Pass | Exposure Complete | Reserved |  | Set User Data Ack
 | 24 | 3 | Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0
 | 32..63* | 4..7 | Inspection Results (Bit Area)
 | *Up to 255 when occupying 4 stations.
RWr | 0 | 0..1 | Current Job ID
 | 1 | 2..3 | Error Code
 | 2 | 4..5 | Acquisition ID
 | 3 | 6..7 | Inspection ID
 | 4 | 8..9 | Inspection Result Code
 | 5..31* | 10..63 | Inspection Results
 | *Up to 127 when occupying 4 stations.
Note:

RY and RX offer 64-bits of data per station. RWw and RWr support 32 16-bit words per station. In-Sight supports configurations with 1, 2, 3, 4, 8 or 16 stations. However, available PLCs currently limit the number of stations to 4. Signals occupy a portion of the first station only.

 | RY | RWw | RX | RWr
1 Station | 64 bits | 32 words | 64 bits | 32 words
2 Stations | 128 bits | 64 words | 128 bits | 64 words
3 Stations | 192 bits | 96 words | 192 bits | 96 words
4 Stations | 256 bits | 128 words | 256 bits | 128 words

RY Block

Byte 0

Bit | Name | Description
7 Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6-5 | Reserved | Unused.
4 | Execute Command | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit is set by the Automation Controller to acknowledge that it has received the Inspection Count, Inspection Result Code and Inspection Results data. The next set of inspection results is then sent to the Automation Controller. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty.
2 | Buffer Results Enable | When this bit is set, the Inspection Count, Inspection Result Code and Inspection Results fields are held constant until they are acknowledged by setting the Inspection Results Ack bit. Up to eight inspections are held in the In-Sight vision system's buffer. The vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack bit is cleared and there is a new set of results sent to the Automation Controller, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the Automation Controller, the Results Valid bit remains cleared.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The Trigger parameter is set to Network, Externalor Industrial Ethernet.
Note:
  • The Trigger parameter can be configured in the AcquireImage function in the Spreadsheet view, or in the Set Up Image application step in the EasyBuilder view. For more information, see AcquireImage.
  • The Industrial Ethernet Trigger type should be used when the trigger is coming from an Automation Controller.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

Byte 1

Bit | Name | Description
7-0 | Reserved | Unused.

Byte 2

Bit | Name | Description
7-4 | Reserved | Unused.
3 | Clear Exposure Complete | While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.
2 | Clear Error | When this bit is set, it will clear the Error and Error Code signals; the Clear Error bit should be held high until the Error bit has been cleared. If an error has been queued, clearing this bit will cause the Error and Error Code signals to be set to the next queued error code.
1 | Reserved | Unused
0 | Set User Data | This command is used by the Automation Controller to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

Byte 3

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Byte 4..7

Bit | Name | Description
7-0 | User Data (Bit Area) | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

RWw Block

Byte 0..1

Bit | Name | Description
7-0 | Command | This is a 16-bit integer used to either indicate the Job ID number (0-999). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate.

Byte 2..63

Bit | Name | Description
7-0 | User Data | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

RX Block

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6-4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 Missed Acq Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
2 | Reserved | Unused.
1 Trigger Ack Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
0 Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet, and the vision system is not currently acquiring an image.

Note: The Industrial Ethernet Trigger type should be used when the trigger is coming from an Automation Controller.

Byte 1

Bit | Name | Description
7 | Error | This bit is set when an error has occurred, which is defined in the Error Code field.
6 | Command Failed | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
5 Command Completed When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.
Note: The camera clears the Command Completed bit when the Execute Command bit goes low.
4 | Command Executing | This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.
3 Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.
2 Results Buffer Overrun

This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the Automation Controller has not acknowledged the results by setting the Inspection Results Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer. The ninth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.
0 System Busy

Set when the vision system is running a job, loading a job or responding to user input.

Byte 2

Bit | Name | Description
7-5 | Reserved | Unused.
4 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
3 | Exposure Complete | This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.
2 - 1 | Reserved | Unused
0 | Set User Data Ack | This bit is set to acknowledge completion of the Set User Data command.

Byte 3

Bit | Name | Description
7 | Soft Event Ack 7 | These bits are used to indicate that the Soft Event command was received.
6 | Soft Event Ack 6
5 | Soft Event Ack 5
4 | Soft Event Ack 4
3 | Soft Event Ack 3
2 | Soft Event Ack 2
1 | Soft Event Ack 1
0 | Soft Event Ack 0

Byte 4..7

Bit | Name | Description
7-0 | Inspection Results (Bit Area) | Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.

RWr Block

Byte 0..1

Name | Description
Current Job ID | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Byte 2..3

Name Description
Error Code

A 16-bit numeric representation of the error that has occurred:

Code | Error | Description
0x0000 | No Error | No error occurred.
0x0100 | Trigger set while disabled | Occurs when the Trigger bit is set while the Trigger Enable bit is cleared or the AcquireImage function's Trigger parameter is set to External, Network or Industrial Ethernet.
0x0101 | Trigger set while Offline | Occurs when the Trigger bit is set while the vision system is Offline.
0x0400 | Already Executing Error | Occurs when the Execute Command bit is set and the Executing bit is still High.
0x0401 | Job load requested while Online | Occurs when a Job Load command is issued while the vision system is Online.

Byte 4..5

Name | Description
Acquisition ID | This ID increments at the beginning of an acquisition and when the Trigger Ack bit is set; can be used to synchronize an acquisition with its Inspection Results.

Byte 6..7

Name | Description
Inspection ID | The acquisition ID associated with this set of results.

Byte 8..9

Name | Description
Inspection Result Code | The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Byte 10..63

Name | Description
Inspection Results | Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.


Configuring In-Sight Vision Systems for SLMP Communications

This section describes how to connect to an In-Sight vision system using SLMP communications to a Mitsubishi MELSEC Automation Controller. The ReadMC and WriteMC functions are used to create an SLMP connection between an In-Sight vision system and a MELSEC Automation Controller, sending Batch Read/Write commands using a 3E QnA compatible or 1E A compatible Binary frame to send/receive data from the Automation Controller.

Note:
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
  • The In-Sight 2000 series vision sensor does not support robot controllers.
  • When SLMP is assigned to a Mitsubishi MELSEC FX Series (1E frame) Ethernet module, the available ports and the maximum number of connections vary depending on the module’s model type (FX3U-ENET or FX3U-ENET-L). For more information, please refer to the module’s documentation.

Getting Data From an In-Sight Vision System

In order to get data from the In-Sight Explorer spreadsheet to a MELSEC Automation Controller (PLC and Robot Controller), the data must be transferred using the WriteMC function. This function takes a buffer of data created by the FormatOutputBuffer function and writes the data to the configured memory location of the Automation Controller. This data is then transferred during the next update cycle. For more information, see WriteMC and FormatOutputBuffer.

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatOutputBuffer dialog, click the Add button. This will initiate the cell selection mode. Select the data that will be transferred to the Automation Controller.
  3. If there is additional data to be sent, again, from the FormatOutputBuffer dialog, click the Add button. Once again this will initiate the cell selection mode. Select the additional data to transfer.
  4. Close the FormatOutputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteMC function, from the right pane, to insert it into the spreadsheet.
  6. Set the WriteMC function's Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.
  7. Configure the WriteMC function's Host Name, Port, PLC Series and Device Address parameters to the Automation Controller settings.

Reading Data Into an In-Sight Vision System

In order to send data from the MELSEC Automation Controller (PLC and Robot Controller) to the In-Sight Explorer spreadsheet, the data must be read from the Automation Controller using the ReadMC function. This function takes the data format created within the FormatInputBuffer function and determines which memory location of the Automation Controller to read from. The function then formats this data into the In-Sight Explorer spreadsheet. For more information, see ReadMC and FormatInputBuffer.

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatInputBuffer dialog, click on the Add button and add a 32-bit float and a 32-bit integer to the list.
  3. Close the FormatInputBuffer dialog by clicking the OK button.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadMC function, from the right pane, to insert it into the spreadsheet .
  5. Set the ReadMC function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  6. Configure the ReadMC function's Host Name, Port, PLC Series and Device Address parameters to the Automation Controller settings.
  7. Once the functions have been implemented, place the In-Sight vision system Online to test the configuration.


Configure In-Sight Vision Systems for SLMP Scanner Communications

This topic describes how to connect an In-Sight vision system using SLMP Scanner communications to a Mitsubishi MELSEC Automation Controller. SLMP Scanner allows an In-Sight vision system's inputs and outputs to be mapped into process memory in the MELSEC Automation Controller. Once these values have been established, they are synchronized at an interval defined by the update rate parameter setting of the SLMP Scanner communications.

Note:
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
  • The In-Sight 2000 series vision sensor does not support robot controllers.

  • The SLMP Scanner Factory Interface topic contains detailed information about mapping the In-Sight vision system's inputs and outputs into process memory, though the layout of the blocks depends on the version of In-Sight firmware running on the In-Sight vision system:

    • For more information about In-Sight 5.x.x Firmware, see SLMP Scanner Factory Interface - In-Sight 5.x.x Firmware.
    • For more information about In-Sight 4.x.x Firmware, see SLMP Scanner Factory Interface - In-Sight 4.x.x Firmware.

  • When SLMP Scanner is assigned to a MELSEC FX Series (1E frame) Ethernet module, the available ports and the maximum number of connections vary depending on the module’s model type (FX3U-ENET or FX3U-ENET-L). For more information, please refer to the module’s documentation.

    Model Type Available Ports Maximum Number of
    Connections
    FX3U-ENET | All ports (C1 – C8) | 4
    FX3U-ENET-L | C3 and C4 | 2

Establish SLMP Scanner Communications

Before SLMP Scanner communications can be established with an In-Sight vision system, the vision system must be configured to enable SLMP Scanner, using the Network Settings dialog of the vision system. Once enabled, the SLMP Scanner Settings dialog is used to configure the connection to the MELSEC Automation Controller, and define the device addresses and sizes for the various data blocks. For more information, see Network Settings Dialog and SLMP Scanner Settings Dialog.

  1. Open In-Sight Explorer and connect to the desired In-Sight vision system.
  2. From the Sensor menu, open the Network Settings dialog. For more information, see Network Settings Dialog.

  3. To communicate with a Mitsubishi PLC/MC, in the Industrial Ethernet Protocols section of the dialog, select SLMP Scanner and press the Settings button to launch the SLMP Scanner Settings dialog.

    To communicate with a Mitsubishi Robot Controller, in the Robots group box of the dialog, select Mitsubishi and press the Settings button to launch the SLMP Scanner Settings dialog. For more information, see SLMP Scanner Settings Dialog

  4. The SLMP Scanner Settings dialog's Settings tab is used to define the connection information required to establish a connection with the Mitsubishi Automation Controller. The SLMP Scanner Settings dialog's Device Addressing tab is used to define the device addresses and sizes for the various data blocks to be communicated to the Automation Controller.

    Note:

    The SLMP Scanner Factory Interface topic contains detailed information about mapping the In-Sight vision system's inputs and outputs into process memory, though the layout of the blocks depends on the version of In-Sight firmware running on the In-Sight vision system:

    • For more information about In-Sight 5.x.x Firmware, see SLMP Scanner Factory Interface - In-Sight 5.x.x Firmware.
    • For more information about In-Sight 4.x.x Firmware, see SLMP Scanner Factory Interface - In-Sight 4.x.x Firmware.
  5. Restart the In-Sight vision system, and the SLMP Scanner service will be enabled upon completion of the power cycle.

Configure the In-Sight Vision System to Receive Image Acquisition Triggers

With the In-Sight vision system integrated with the Mitsubishi Automation Controller, it is possible to trigger the vision system to acquire images from the MELSEC Automation Controller. Setting the Trigger parameter in the AcquireImage function to Industrial Ethernet enables the Automation Controller to trigger the vision system when SLMP Scanner communication is enabled.

  1. Open the AcquireImage function's property sheet.

  2. Set the Trigger parameter to Industrial Ethernet.

  3. Place the In-Sight vision system Online.

  4. An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Vision Control Bit Block, or by monitoring the Trigger Ready, Trigger Ack and Missed Acq bits in the Vision Status Bit Block.

    Note:

    The SLMP Scanner Factory Interface topic contains detailed information about mapping the In-Sight vision system's inputs and outputs into process memory, though the layout of the blocks depends on the version of In-Sight firmware running on the In-Sight vision system:

    • For more information about In-Sight 5.x.x Firmware, see SLMP Scanner Factory Interface - In-Sight 5.x.x Firmware.
    • For more information about In-Sight 4.x.x Firmware, see SLMP Scanner Factory Interface - In-Sight 4.x.x Firmware.

Get Data From an In-Sight Vision System

In order to get data from the In-Sight Explorer spreadsheet to a MELSEC Automation Controller, the data must be pushed into the SLMP Scanner stack by using the WriteResultsBuffer function. This function takes a buffer of data created by the FormatOutputBuffer function and writes the data to the configured data table of the MELSEC Automation Controller. This data is then transferred during the next update cycle. For more information, see WriteResultsBuffer and FormatOutputBuffer.

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatOutputBuffer dialog, click on the Add button. This will initiate the cell selection mode. Select the data that will be transferred to the MELSEC Automation Controller.
  3. If there is additional data to be sent, again, from the FormatOutputBuffer dialog, click on the Add button. Once again this will initiate the cell selection mode. Select the additional data to transfer.
  4. Close the FormatOutputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteResultsBuffer function, from the right pane, to insert it into the spreadsheet.
  6. Set the WriteResultsBuffer function's Protocol Parameter to 2 = SLMP Protocol Scanner, and the Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.
  7. Optionally, set the Result Code parameter as a cell reference to a cell in the spreadsheet to retrieve the result code with the inspection results.

Send Data to an In-Sight Vision System

In order to send data from the MELSEC Automation Controller to the In-Sight Explorer spreadsheet, the data must be pulled from the SLMP Scanner stack by using the ReadUserDataBuffer function. This function takes the data format created within the FormatInputBuffer function, reads the data received from the MELSEC Automation Controller, and formats this data into the In-Sight Explorer spreadsheet. For more information, see ReadUserDataBuffer and FormatInputBuffer.

Note: In order to trigger the In-Sight vision system to read the user data from the MELSEC Automation Controller, the Set User Data bit in the Vision Control Bit Block must be triggered from the Automation Controller.
  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatInputBuffer dialog, click on the Add button and add a 32-bit float and a 32-bit integer to the list.
  3. Close the FormatInputBuffer dialog by clicking the OK button.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadUserDataBuffer function, from the right pane, to insert it into the spreadsheet .
  5. Set the ReadUserDataBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  6. Set the ReadUserDataBuffer function's Protocol parameter to 2 = SLMP Protocol Scanner.
  7. Once the functions have been implemented, place the In-Sight vision system Online to test the configuration.


SLMP Scanner Factory Interface

SLMP Scanner is a command/response-based protocol, with the connection and read/write commands originating from the In-Sight vision system. The vision system must send read requests to the Mitsubishi Automation Controller at periodic intervals to determine if there are changes in the control bits. This process is called "polling," and defines the polling cycle.

In the Mitsubishi communication protocol, information from the In-Sight vision system is combined into data blocks, which are then transferred between the vision system and the Automation Controller. Within this methodology, bit-type data is stored in bit registers in the Automation Controller and word-type data is stored in word registers in the Automation Controller. Due to this implementation, bit data is never combined with word data in a data block, which allows these data items to be addressed separately in the Automation Controller.

The data blocks are configured and defined differently, depending on the firmware running on the In-Sight vision system.

  • SLMP Scanner Factory Interface - In-Sight 4.x.x Firmware
  • SLMP Scanner Factory Interface - In-Sight 5.x.x Firmware


SLMP Scanner Factory Interface - In-Sight 4.x.x Firmware

This topic covers the SLMP Scanner communication protocol for In-Sight vision systems running In-Sight 4.x.x and earlier firmware. For a complete list of models and supported firmware versions, see Firmware Versions.

SLMP Scanner Operations

SLMP Scanner is a command/response-based protocol, which originates from the In-Sight vision system, and the vision system must send read requests to the Automation Controller at periodic intervals to determine if there are changes in the control bits. This process is called "polling," and defines the polling cycle.

Polling Cycle

At the beginning of every polling cycle, the Vision Control Bit block will be read from the Automation Controller.The vision system will then process any bit state-change in the control block, in order.Some state-changes will require additional communication with the Automation Controller, such as reading a Job ID or the User Data fields, or writing the status block.These requests are placed in a queue.The polling mechanism processes these requests, in order, until there are either no more items in the queue, or the polling interval has been exceeded.Once the polling cycle has been completed, the cycle will not repeat.

Note:
  • Any communication items that were placed in the queue from the previous cycle, but were not processed, will be the first items processed during the next cycle.If there are several items in the queue at the beginning of the cycle, at least one item from the queue will always be processed during each polling cycle, even if the processing might delay the next polling cycle.
  • The Poll Interval (ms) parameter in the SLMP Scanner Settings dialog allows you to define the polling cycle interval.

Block Communications

The table below defines the actions that the In-Sight vision system will take in response to a status bit change in the Vision Control Bit block:

Block | When Read/Written | Action
Vision Control Bit Block | Read at a user-specified periodic interval. | Acquisition Trigger Soft Event Read or Write of any other block
Vision Status Bit Block | Written when the connection is first established, and when a new status is available. |
PLC Input Word Block | Written when new inspection results are available, or when a job change occurs. |
PLC Output Word Block | Read when the Set User Data bit changes from 0 to 1, or when the Initiate Job Load bit changes from 0 to 1. | Setting the User Data Ack bit after reading the User Data field.
String Command Word Block | Read when the Initiate String Command bit changes from 0 to 1. | Processing the String Command.
String Command Result Block | Written when new string command results are available. | Setting the String CMD Ack bit, after writing the String Command Result Word Block.

Typical Sequence Diagram

The following diagram illustrates the typical behavior of the In-Sight vision system in response to a Automation Controller triggering an acquisition and inspection cycle:

Typical Acquisition Sequence

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Vision Control Block, or by monitoring the Trigger Ready, Trigger Ack, Acquiring and Missed Acq bits in the Vision Status Block.

On initial start-up, the Trigger Enable bit will be False, and must be set to True to enable triggering. When the vision system is ready to accept triggers, the Trigger Ready bit in the Vision Status Block will be set to True.

While the Trigger Enable and Trigger Ready bits are True, each time the vision system sees the Trigger bit change from 0 to 1, an image acquisition will be initiated. The Trigger bit should be held in the new state until that same state value has been seen in the Trigger Ack bit of the Vision Status Block (which is a necessary handshake to guarantee that the change has been seen by the vision system).

During an acquisition, the Trigger Ready bit in the Vision Status Block will be cleared and the Acquiring bit will be set to True. When the acquisition is completed, the Acquiring bit will be cleared and the Trigger Ready bit will again be set to True once the vision system is ready to begin a new image acquisition.

To force a reset of the trigger mechanism, set the Trigger Enable bit to False until the Vision Status Block is 0. Then the Trigger Enable bit can be set to True and acquisitions re-enabled.

Closed Example - Typical Acquisition Sequence

Closed Example - Acquisition Faster Than Inspection Sequence

Typical Inspection Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. While the vision system is processing the image, the Inspecting bit of the Vision Status Block is set. When the vision system has finished processing the image, the Inspecting bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit of the Vision Control Block determines how inspection results are handled by the vision system. If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Output Word Block and the Results Valid bit is set to True. If the Buffer Results Enable bit is set to True, the new results are queued. The earlier inspection results remain in the Output Word Block until they are acknowledged by the Automation Controller, which sets the Inspection Results Ack bit to True.After the Results Valid bit is cleared, the Automation Controller should set the Inspection Results Ack bit back to False to allow the queued results to be placed into the Output Word Block (this is a necessary handshake to ensure that the results are received by the Automation Controller).

Inspection Status Register Behavior

Bit | Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
0 | Inspecting | Set when inspecting an image. | Set when inspecting an image.
1 | Inspection Complete | Toggled on completion of an inspection. | Toggled on completion of an inspection.
2 | Results Buffer Overflow | Remains set to 0. | Set when the inspection results could not be queued because the Automation Controller failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.
3 | Results Valid | Set when new results are placed in the Output Word Block.Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True. | Set when new results are placed in the Output Word Block. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

Results Buffering

A queue for inspection results may be enabled. If enabled, this allows a finite number of inspection data results to be queued until the Automation Controller has time to read them. This is a useful feature for smoothing out data flows if different parts of the system (including the external Automation Controller) slow down for short periods of time.

In general, if inspections are occurring faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded. If buffering is not enabled, the most recent results are kept, and the earlier result that the Automation Controller was unable to read is lost. Essentially, the most recent result will simply overwrite the earlier result. If buffering is enabled (and the queue becomes full), the most recent results are discarded until room becomes available in the results queue.

Closed Example - Results Overflow Sequence

Typical Job Management Sequence

The Current Job ID field indicates the current job ID of the In-Sight vision system, or 65535 if the current job does not have an ID. In order to load a job, the Automation Controller must set the vision system Offline by using the Set Offline bit. Next, the Job Load ID field is set to the desired job's ID and the Initiate Job Load bit is set. Once the Job Load Complete bit goes to High, the Initiate Job Load bit is reset.

Typical Soft Event Sequence

A soft event can be used by the Automation Controller to trigger job specific behavior. Each soft event has a trigger and acknowledgment bit associated with it. The rising edge of the trigger bit causes the In-Sight vision system to process the action associated with the soft event. Upon initiation of the soft event, the vision system will set the corresponding Soft Event Ack bit to High. This bit will be held High until the Automation Controller resets the trigger bit, and the processing of the action associated with the soft event has been completed. If the soft event could not be triggered, the general fault bit will be set to High; this bit will remain High until an event is successfully triggered.

Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Typical String Command Sequence

In-Sight vision systems rely on Native Mode communications to support string commands for device interaction. Native Mode commands allow a string-style command to be issued from the Automation Controller to the vision system, which are especially useful when a command cannot be issued via the control bits. This section defines the common interface to be used when initiating string commands to the vision system, and how to obtain the response from the vision system.

SLMP Defined Data Blocks

The defined data blocks allow you to control where the vision system is reading and writing data to and from the Automation Controller. For easier application setup, the various control and status bits required for command functionality are grouped into contiguous blocks, which can be processed together. When setting up the interaction between the vision system and the Automation Controller, you will need to choose the starting address and device type for each block of data.

Vision Control Block

The Vision Control Block defines all of the bit-typed signals for any action that the Automation Controller might initiate. The Vision Control Block is 32 bits, some of which are reserved for future implementations.

Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Vision Control | 0 | Set Offline | Reserved |  | Initiate Job Load | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Reserved
 | 2 | Reserved |  |  |  | Clear Exposure Complete | Reserved | Initiate String Command | Set User Data
 | 3 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0

Byte 0

Bit | Name | Description
7 Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6-5 | Reserved | Unused.
4 | Initiate Job Load | When set, the vision system loads the job ID specified in the Job Load ID field.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit is set by the Automation Controller to acknowledge that it has received the InspectionCount, Inspection Result Code and Inspection Results data. The next set of inspection results is then sent to the Automation Controller. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty.
2 | Buffer Results Enable | When this bit is set, the Inspection Count, Inspection Result Code and Inspection Results fields are held constant until they are acknowledged by setting the InspectionResults Ack bit. Up to eight inspections are held in the In-Sight vision system's buffer. The vision system will respond to the acknowledgment by clearing the ResultsValid bit. Once the InspectionResults Ack bit is cleared and there is a new set of results sent to the Automation Controller, the ResultsValid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the Automation Controller, the ResultsValid bit remains cleared.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The Acquire Image function's Trigger parameter is set to External or Industrial Ethernet.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

Byte 1

Bit | Name | Description
7-1 | Reserved | Unused.

Byte 2

Bit | Name | Description
7-4 | Reserved | Unused.
3 | Clear Exposure Complete | While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.
2 | Reserved | Unused.
1 | Initiate String Command | When this bit is set, it will read the data from the String Command field and execute the string command. Upon reading the command, the String Cmd Ack bit will be set. This bit should be held High until the vision system sets the String Cmd Ack bit to ensure that the vision system has received the command.
0 | Set User Data | This command is used by the Automation Controller to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

Byte 3

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Vision Status Bit Block

Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Vision Status | 0 | Online | Offline Reason |  |  | Missed Acq | Acquiring | Trigger Ack | Trigger Ready
 | 1 | Reserved | Job Load Failed | Job Load Completed | Job Loading | Results Valid | Results Buffer Overrun | Inspection Completed | Inspecting
 | 2 | Reserved |  |  | Job Pass | Exposure Complete | String Command Error | String Command Ack | Set User Data Ack
 | 3 | Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6-4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 Missed Acq Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
2 | Acquiring | Set when an In-Sight vision system is currently acquiring an image, regardless how the acquisition was triggered.
1 Trigger Ack Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
0 | Trigger Ready | Indicates when an In-Sight vision system can accept a new trigger via the Trigger Bit. This field is true when the vision system is Online, the TriggerEnable bit is set, the AcquireImage function's Trigger parameter is set to External or Industrial Ethernet, and the vision system is not currently acquiring an image.

Byte 1

Bit | Name | Description
7 | Reserved | Unused.
6 | Job Load Failed | This bit is set when the last job load attempt failed. It is cleared after a successful job load, initiated by the SLMP Scanner protocol.
5 | Job Load Completed | This bit is toggled on the completion of a job load operation initiated by this protocol.
4 | Job Loading | This bit is set when a job load was initiated through this protocol.
3 Results Valid

Set when the Inspection Count, Inspection Result Code and Inspection Results fields are valid.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.
2 | Results Buffer Overrun | This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the Automation Controller has not acknowledged the results by setting the InspectionResults Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer, and will overwrite the eighth inspection in the buffer. The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are valid.
0 Inspecting

This bit is set when an In-Sight vision system is running a job.

Byte 2

Bit | Name | Description
7-5 | Reserved | Unused.
4 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
3 Exposure Complete

This bit is set upon the completion of the In-Sight vision system's exposure period, and is cleared when an acquisition is triggered. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.
2 | String Command Error | This bit indicates whether or not the result of the previous string command returned a failure code.
1 | String Command Ack | This bit is set when the vision system completes processing of a command and generates a response to the command. After the vision system has set this bit, the Automation Controller can safely read the string command response data. The bit will be reset after the Automation Controller clears the Initiate String Command bit. The Automation Controller should clear the Initiate String Command bit and wait for the String Command Ack bit to return to a Low state before initiating a new command.
0 | Set User Data Ack | This bit is set to acknowledge completion of the Set User Data command.

Byte 3

Bit | Name | Description
7 | Soft Event Ack 7 | These bits are used to indicate that the Soft Event command was received.
6 | Soft Event Ack 6
5 | Soft Event Ack 5
4 | Soft Event Ack 4
3 | Soft Event Ack 3
2 | Soft Event Ack 2
1 | Soft Event Ack 1
0 | Soft Event Ack 0

Output Word Block

Block | Byte | Name
Output Word | 0..1 | Current Job ID
 | 2..3 | Acquisition ID
 | 4..5 | Inspection ID
 | 6..7 | Inspection Result Code
 | 8..9 | Inspection Result Length
 | 10.. | Inspection Results

Byte 0 - 1

Name | Description
Current Job ID | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Byte 2 - 3

Name | Description
Acquisition ID | The identifier is associated with the current acquisition, and is set to the Acquisition ID at then end of an acquisition, for an acquisition triggered using the Trigger bit.

Byte 4 - 5

Name | Description
Inspection ID | The acquisition ID associated with this set of results.

Byte 6 - 7

Name | Description
Inspection Result Code | The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Byte 8 - 9

Name | Description
Inspection Result Length | The length of the inspection results data.

Byte 10 - 1914

Name | Description
Inspection Results | Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.

Input Word Block

Block | Byte | Name
Input Word | 0..1 | Job Load ID
 | 2..3 | User Data Length
 | 4.. | User Data

Byte 0 - 1

Name | Description
Job Load ID | The ID number (1-999) of the job to load when the Initiate Job Load bit is set by the Automation Controller.

Byte 2 - 3

Name | Description
Reserved | Unused.

Byte 4 - 1920

Name | Description
User Data | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

String Command Word Block

Block | Byte | Name
String Command Word | 0..1 | String Command Length
 | 2.. | String Command

Byte 0 - 1

Name | Description
String Command Length | The length of the Native Mode command.

Byte 2 - 1920

Name | Description
String Command | The Native Mode command to be processed by the vision system.

String Command Result Word Block

Block | Byte | Name
String Command Result Word | 0..1 | String Command Result Code
 | 2..3 | String Command Result Length
 | 4.. | String Command Result

Byte 0 - 1

Name Description
String Command Result Code

The response code for the Native Mode command, which can be used to determine if the command was successful, or failed.

Note: Each Native Mode command returns a 1 for a successful execution, while each command has specific error codes for cases of failure. Review the individual Native Mode command topics for more information about the failure codes.

Byte 2 - 3

Name | Description
String Command Result Length | The length of the Native Mode command's Response Data, in bytes.

Byte 4 -

Name | Description
String Command Result | The Native Mode command's result string, an ASCII string representation of the data returned by the command.


SLMP Scanner Factory Interface - In-Sight 5.x.x Firmware

This topic covers the SLMP Scanner communication protocol for In-Sight vision systems running In-Sight 5.1.0 and later firmware.For a complete list of models and supported firmware versions, see Firmware Versions.

Note:
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
  • The In-Sight 2000 series vision sensor does not support robot controllers.

SLMP Scanner Operations

SLMP Scanner is a command/response-based protocol, which originates from the In-Sight vision system, and the vision system must send read requests to the Automation Controller at periodic intervals to determine if there are changes in the control bits. This process is called "polling," and defines the polling cycle.

Polling Cycle

At the beginning of every polling cycle, the Vision Control Bit block will be read from the Automation Controller.The vision system will then process any bit state-change in the control block, in order.Some state-changes will require additional communication with the Automation Controller, such as reading a Job ID or the User Data fields, or writing the status block.These requests are placed in a queue.The polling mechanism processes these requests, in order, until there are either no more items in the queue, or the polling interval has been exceeded.Once the polling cycle has been completed, the cycle will not repeat.

Note:
  • Any communication items that were placed in the queue from the previous cycle, but were not processed, will be the first items processed during the next cycle.If there are several items in the queue at the beginning of the cycle, at least one item from the queue will always be processed during each polling cycle, even if the processing might delay the next polling cycle.
  • The Poll Interval (ms) parameter in the SLMP Scanner Settings dialog allows you to define the polling cycle interval.

Block Communications

The table below defines the actions that the In-Sight vision system will take in response to a status bit change in the Vision Control Bit block:

Block | When Read/Written | Action
Vision Control Bit Block | Read at a user-specified periodic interval. | Acquisition Trigger Soft Event Read or Write of any other block
Vision Status Bit Block | Written when the connection is first established, and when a new status is available. |
Input Word Block | Written when new inspection results are available, or when a job change occurs. |
Output Word Block | Read when the Set User Data bit changes from 0 to 1, or when the Execute Command bit changes from 0 to 1. | Setting the User Data Ack bit after reading the User Data field.
String Command Word Block | Read when the Initiate String Command bit changes from 0 to 1. | Processing the String Command.
String Command Result Block | Written when new string command results are available. | Setting the String Command Ack bit, after writing the String Command Result Word Block.

Typical Sequence Diagram

The following diagram illustrates the typical behavior of the In-Sight vision system in response to a Automation Controller triggering an acquisition and inspection cycle:

Note: In the following image, the term "PLC" is used as "Automation Controller".

Typical Acquisition Sequence

Note: If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Vision Control Block while monitoring the Trigger Ready, Trigger Ack, and Missed Acq bits in the Vision Status Block.

On initial start-up, the Trigger Enable bit will be False, and must be set to True to enable triggering. When the vision system is ready to accept triggers, the Trigger Ready bit will be set to True.

While the Trigger Enable and Trigger Ready bits are True, each time the vision system sees the Trigger bit change from 0 to 1, an image acquisition will be initiated. The Trigger bit should be held in the new state until that same state value has been seen in the Trigger Ack bit (which is a necessary handshake to guarantee that the change has been seen by the vision system).

During an acquisition, the Trigger Ready bit in the Vision Status Block will be cleared. The Exposure Complete bit will be set at the end of the acquisition, and can only be cleared by the Clear Exposure Complete bit.

To force a reset of the trigger mechanism, set the Trigger Enable bit to False until the Vision Status Block is 0. Then the Trigger Enable bit can be set to True and acquisitions re-enabled.

Closed Example - Typical Acquisition Sequence
Note: In the following image, the term "PLC" is used as "Automation Controller".

Closed Example - Acquisition Faster Than Inspection Sequence
Note: In the following image, the term "PLC" is used as "Automation Controller".

Typical Inspection Sequence

The Vision Status Block and Vision Control Block allow the Automation Controller to monitor the vision processing portion of the In-Sight vision system to determine when new results are available, and to request that the vision system queue any new results.

Inspection/Result Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. While the vision system is processing the image, the System Busy bit is set. When the vision system has finished processing the image, the System Busy bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit determines how inspection results are handled by the vision system. If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Output Word Block and the Results Valid bit is set to True. If the Buffer Results Enable bit is set to True, the new results are queued. The earlier inspection results remain in the Output Word Block until they are acknowledged by the Automation Controller, which sets the Inspection Results Ack bit to True.After the Results Valid bit is cleared, the Automation Controller should set the Inspection Results Ack bit back to False to allow the queued results to be placed into the Output Word Block (this is a necessary handshake to ensure that the results are received by the Automation Controller).

Vision Status Block Behavior

Bit | Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
0 | System Busy | Set when the vision system is running a job, loading a job or responding to user input. | Set when the vision system is running a job, loading a job or responding to user input.
1 | Inspection Complete | Toggled on completion of an inspection. | Toggled on completion of an inspection.
2 | Results Buffer Overflow | Remains set to 0. | Set when the inspection results could not be queued because the Automation Controller failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.
3 | Results Valid | Set when new results are placed in the Output Word Block.Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True. | Set when new results are placed in the Output Word Block. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

Results Buffering

A queue for inspection results may be enabled. If enabled, this allows a finite number of inspection data results to be queued until the Automation Controller has time to read them. This is a useful feature for smoothing out data flows if different parts of the system (including the external Automation Controller) slow down for short periods of time.

In general, if inspections are occurring faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded. If buffering is not enabled, the most recent results are kept, and the earlier result that the Automation Controller was unable to read is lost. Essentially, the most recent result will simply overwrite the earlier result. If buffering is enabled (and the queue becomes full), the most recent results are discarded until room becomes available in the results queue.

Closed Example - Results Overflow Sequence
Note: In the following image, the term "PLC" is used as "Automation Controller".

Typical Job Management Sequence

The Current Job ID field module indicates the current job ID of the In-Sight vision system, or 65535 if the current job does not have an ID. In order to load a job, the Automation Controller must set the vision system Offline by using the Set Offline bit. Next, the Command field is set to the desired job's ID and the Execute Command bit is set. Once the Command Completed bit goes to High, the Execute Command bit is reset.

Typical Soft Event Sequence

A soft event can be used by the Automation Controller to trigger job specific behavior. Each soft event has a trigger and acknowledgment bit associated with it. The rising edge of the trigger bit causes the In-Sight vision system to process the action associated with the soft event. Upon initiation of the soft event, the vision system will set the Soft Event Ack bit to High. This bit will be held High until the Automation Controller resets the trigger bit, and the processing of the action associated with the soft event has been completed. If the soft event could not be triggered, the general fault bit will be set to High; this bit will remain High until an event is successfully triggered.

Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Typical String Command Sequence

In-Sight vision systems rely on Native Mode communications to support string commands for device interaction. Native Mode commands allow a string-style command to be issued from the Automation Controller to the vision system, which are especially useful when a command cannot be issued via the control bits.

SLMP Defined Data Blocks

The defined data blocks allow you to control where the vision system is reading and writing data to and from the Automation Controller. For easier application setup, the various control and status bits required for command functionality are grouped into contiguous blocks, which can be processed together. When setting up the interaction between the vision system and the Automation Controller, you will need to choose the starting address and device type for each block of data.

Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Vision Control | 0 | Set Offline | Reserved |  | Execute Command | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Reserved
 | 2 | Reserved |  |  |  | Clear Exposure Complete | Clear Error | Initiate String Command | Set User Data
 | 3 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
Vision Status | 0 | Online | Offline Reason |  |  | Missed Acq | Reserved | Trigger Ack | Trigger Ready
 | 1 | Error | Command Failed | Command Completed | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | System Busy
 | 2 | Reserved |  |  | Job Pass | Exposure Complete | String Command Error | String Command Ack | Set User Data Ack
 | 3 | Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0
Output Word | 0..1 | Current Job ID
 | 2..3 | Error Code
 | 4..5 | Acquisition ID
 | 6..7 | Inspection ID
 | 8..9 | Inspection Result Code
 | 10.. | Inspection Results
Input Word | 0..1 | Command
 | 2..3 | Reserved
 | 4.. | User Data
String Command Word | 0..1 | String Command Length
 | 2.. | String Command
String Command Result Word | 0..1 | String Command Result Code
 | 2..3 | String Command Result Length
 | 4.. | String Command Result

Vision Control Block

Byte 0

Bit | Name | Description
7 Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6-5 | Reserved | Unused.
4 | Execute Command | When set, the vision system loads the job ID specified in the Command field. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit is set by the Automation Controller to acknowledge that it has received the InspectionCount, Inspection Result Code and Inspection Results data. The next set of inspection results is then sent to the Automation Controller. Clearing the Inspection Results Ack bit causes the vision system to set the ResultsValid bit if the buffer is not empty.
2 | Buffer Results Enable | When this bit is set, the Inspection Count, Inspection Result Code and InspectionResults fields are held constant until they are acknowledged by setting the InspectionResults Ack bit. Up to eight inspections are held in the In-Sight vision system's buffer. The vision system will respond to the acknowledgment by clearing the ResultsValid bit. Once the InspectionResults Ack bit is cleared and there is a new set of results sent to the Automation Controller, the ResultsValid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the Automation Controller, the ResultsValid bit remains cleared.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The Trigger parameter is set to Network, External or Industrial Ethernet.
Note:
  • The Trigger parameter can be configured in the AcquireImage function in the Spreadsheet view, or in the Set Up Image application step in the EasyBuilder view.
  • The Industrial Ethernet Trigger type should be used when the trigger is coming from an Automation Controller.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

Byte 1

Bit | Name | Description
7-1 | Reserved | Unused.

Byte 2

Bit | Name | Description
7-4 | Reserved | Unused.
3 | Clear Exposure Complete | While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.
2 | Clear Error | When this bit is set, it will clear the Error and Error Code signals; the Clear Error bit should be held high until the Error bit has been cleared. If an error has been queued, clearing this bit will cause the Error and Error Code signals to be set to the next queued error code.
1 | Initiate String Command | When this bit is set, it will read the data from the String Command field and execute the string command. Upon reading the command, the String Cmd Ack bit will be set. This bit should be held High until the vision system sets the String Cmd Ack bit to ensure that the vision system has received the command.
0 | Set User Data | This command is used by the Automation Controller to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

Byte 3

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Vision Status Block

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6-4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 Missed Acq Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
2 | Reserved | Unused.
1 Trigger Ack Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
0 Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet, and the vision system is not currently acquiring an image.

Note: The Industrial Ethernet Trigger type should be used when the trigger is coming from an Automation Controller.

Byte 1

Bit | Name | Description
7 | Error | This bit is set when an error has occurred, which is defined in the Error Code field.
6 | Command Failed | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
5 Command Completed When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.
Note: The camera clears the Command Completed bit when the Execute Command bit goes low.
4 | Command Executing | This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.
3 Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.
2 Results Buffer Overrun

This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the Automation Controller has not acknowledged the results by setting the InspectionResults Ack bit.Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer. The ninth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.
0 System Busy

Set when the vision system is running a job, loading a job or responding to user input.

Byte 2

Bit | Name | Description
7-5 | Reserved | Unused.
4 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
3 | Exposure Complete | This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.
2 | String Command Error | This bit indicates whether or not the result of the previous string command returned a failure code.
1 | String Command Ack | This bit is set when the vision system completes processing of a command and generates a response to the command. After the vision system has set this bit, the Automation Controller can safely read the string command response data. The bit will be reset after the Automation Controller clears the Initiate String Command bit. The Automation Controller should clear the Initiate String Command bit and wait for the String Command Ack bit to return to a Low state before initiating a new command.
0 | Set User Data Ack | This bit is set to acknowledge completion of the Set User Data command.

Byte 3

Bit | Name | Description
7 | Soft Event Ack 7 | These bits are used to indicate that the Soft Event command was received.
6 | Soft Event Ack 6
5 | Soft Event Ack 5
4 | Soft Event Ack 4
3 | Soft Event Ack 3
2 | Soft Event Ack 2
1 | Soft Event Ack 1
0 | Soft Event Ack 0

Output Word Block

Byte 0 - 1

Name | Description
Current Job ID | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Byte 2 - 3

Name Description
Error Code

A 16-bit numeric representation of the error that has occurred:

Code | Error | Description
0x0000 | No Error | No error occurred.
0x0100 | Trigger set while disabled | Occurs when the Trigger bit is set while the Trigger Enable bit is cleared or the AcquireImage function's Trigger parameter is set to External, Network or Industrial Ethernet.
0x0101 | Trigger set while Offline | Occurs when the Trigger bit is set while the vision system is Offline.
0x0400 | Already Executing Error | Occurs when the Execute Command bit is set and the Executing bit is still High.
0x0401 | Job load requested while Online | Occurs when a Job Load command is issued while the vision system is Online.
0x0402 | Job load requested does not exist on the camera | Occurs when a JobID sent in the Command field does not exist as a prefix for any job in the camera file system. For example, if you send Command = 123 and no job on the camera contains 123xxxxx.job.

Byte 4 - 5

Name | Description
Acquisition ID | This ID increments at the beginning of an acquisition and when the Trigger Ack bit is set; can be used to synchronize an acquisition with its Inspection Results.

Byte 6 - 7

Name | Description
Inspection ID | The acquisition ID associated with this set of results.

Byte 8 - 9

Name | Description
Inspection Result Code | The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Byte 10 - 1914

Name | Description
Inspection Results | Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.

Input Word Block

Byte 0 - 1

Name | Description
Command | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load. The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate.

Byte 2 - 3

Name | Description
Reserved | Unused.

Byte 4 - 1919

Name | Description
User Data | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

String Command Word Block

Byte 0 - 1

Name | Description
String Command Length | The length of the Native Mode command.

Byte 2 - 1919

Name | Description
String Command | The Native Mode command to be processed by the vision system.

String Command Result Word Block

Byte 0 - 1

Name Description
String Command Result Code

The response code for the Native Mode command, which can be used to determine if the command was successful, or failed.

Note: Each Native Mode command returns a 1 for a successful execution, while each command has specific error codes for cases of failure. Review the individual Native Mode command topics for more information about the failure codes.

Byte 2 - 3

Name | Description
String Command Result Length | The length of the Native Mode command's Response Data, in bytes.

Byte 4 -

Name | Description
String Command Result | The Native Mode command's result string, an ASCII string representation of the data returned by the command.

Available Device Types and Ranges on Mitsubishi Automation Controller

The following table describes the available devices and ranges on Mitsubishi Automation Controller when communicating with SLMP Scanner.

Controller Type |  | Controller Bit Block, Status Bit Block |  | Input Word Block, Output Word Block, Command Word Block, Command Result Block
 |  | Device Type | Range | Device Type | Range
PLC/MC | iQ-R/Q/L Series | X, Y, B, W | 0～FFFF (Hex) | D, R, ZR, TN, CN | 0～65535
 |  | M, L, F, D, R, ZR | 0～65535 | W | 0～FFFF (Hex)
 | iQ-F Series | X, Y | 0～177777 (Oct) | D | 0～65535
 |  | M, F, D | 0～65535 |  |
 | FX Series | X, Y | 0～177777 (Oct) | D, R, TN, CN | 0～65535
 |  | M, D, R, S | 0～65535 |  |
Robot Controller | CR800-D Series | D | 0～65535 | D | 0～65535

Errors on GX Works

Error Codes on Monitor Information

The following table shows the Error Codes displayed within the Monitor Information section in the Sensor/Device Monitor for Ethernet Configuration dialog.

Error Code | Description
0 | SLMP is running / connected
1 | SLMP connecting...
3 | SLMP Fault (default error code if no other error details can be obtained)
7 | Error in status block
8 | Error in control block
9 | Error in output block
10 | Error in input block
11 | Error in command block
12 | Error in command result block
13 | SLMP protocol not started
14 | Protocol pending sensor reboot (after a protocol change)


Communicate with a Mitsubishi Automation Controller via iQ Sensor Solution

Overview

This topic describes how to configure the iQ Sensor Solution for In-Sight vision systems, and transfer data between a vision system and a Mitsubishi Automation Controller using GX Works2. The examples in this topic were written assuming the following components are being used:

  • In-Sight vision system running firmware version 4.x.x

  • Mitsubishi iQ-R, Q, L or F-series (3E Frame) Automation Controller

    Note: FX Series (1E Frame) are not supported.
  • Mitsubishi GX Works2 software (SWnDNC-GXW2-E) version 1.492 or later
  • Cognex In-Sight Profile Language Package (English = CognexInsight_en.ipar; Japanese = CognexInsight_ja.ipar) included within In-Sight Explorer 4.x.x or 5.4.3
Note:
  • iQ Sensor Solution is only available on In-Sight vision systems using In-Sight firmware 4.x.x.
  • If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 70xx - 74xx series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2. It is recommended that you keep PLC projects within the same language of GXWorks2.
  • For more information on Mitsubishi iQ Sensor Solution, refer to Mitsubishi's iQ Sensor Solution Reference Manual.

Mitsubishi iQ Sensor Solution

Mitsubishi iQ Sensor Solution is a factory protocol that enables the GX Works2 software to control In-Sight vision systems over the SLMP Scanner protocol. For more information, see Configuring In-Sight Vision Systems for SLMP Communications. With the iQ Sensor Solution, GX Work2 is able to discover vision systems on the network, read/write the vision system's SLMP Scanner parameter settings and monitor the status of a vision system.

Note: For more information on GX Works2, refer to the GX Works2 Operating Manual.

Discovering In-Sight Vision Systems on GX Work2

The following procedure assumes that the In-Sight vision system has not previously configured for SLMP Scanner and is connected to the same Ethernet subnet as a supported Mitsubishi Automation Controller.

  1. Launch GX Works2.

  2. Create a new project in GX Works2.

  3. From the Tool menu, select Register Profile. The Register Profile window opens.

  4. Navigate to the Cognex In-Sight Profile Language Package (English = CognexInsight_en.ipar; Japanese = CognexInsight_ja.ipar), and click Register.

    Note: By default, the Cognex In-Sight Profile Language Package is installed to: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 4.9.x\Factory Protocol Description\ESPP.

  5. Select Parameter --> PLC Parameter on the Project view. The L Parameter Setting window is displayed.

  6. Select the Built-in Ethernet Port Settings tab.

  7. Check the Set Open Setting in Ethernet Configuration window checkbox. The following message will be displayed.

  8. Click Yes; the Open Settings button will be changed to the Ethenet Conf. button.

  9. Click the Ethernet Conf. button. The Ethernet Configuration window will be displayed.

  10. Select Ethernet Configuration --> Online --> Detect Now; the following message is displayed.

  11. Read the message and click Yes. The actual system configuration is reflected on the Ethernet Configuration window.

  12. Select Close with Reflecting the Setting. The settings on the Ethernet Configuration window will be saved, and the system configuration setting is completed.
Note:
  • Up to 16 In-Sight vision system may be displayed (in ascending order of their IP addresses) on the Ethernet Configuration window after executing the automatic detection of connected devices.
  • If the Detect Now button is pressed, and a vision system in the network is not iQSS-compatible, the vision system will not appear in the Ethernet configuration window. If a vision system is iQSS-compatible but no profile was previously added to GX Works2, "Module With No Profile Found" will be displayed.
  • When a vision system detected in the actual system configuration
  • Error information is displayed on the Output window when there is an error in the system configuration after executing the automatic detection of connected devices. Double-click the error on the Output window and correct the error at the error jump destination.
  • For troubleshooting, refer to Mitsubishi's iQ Sensor Solution Reference Manual.

Reflect the Communication Settings to In-Sight Vision Systems

The communication settings, such as the IP address, can be reflected to the In-Sight vision system. Execute this feature after adding/deleting or changing the settings of vision systems.

  1. From GX Works2, open the Ethernet Configuration window. (To display this window, refer to the Discovering In-Sight vision systems on GX Work2 section).
  2. Select the target In-Sight vision system and configure the communication settings.

  3. Right-click the target vision system on the device map area.

  4. Select Online --> Communication Setting Reflection of Ethernet Device. The communication settings will be now reflected to the selected vision system.

Reading and Writing SLMP Scanner Parameters

Note: For detailed SLMP Scanner parameter information, refer to the SLMP Scanner Parameters section.
  1. From GX Works2, open the Ethernet Configuration window. (To display this window, refer to the Discovering In-Sight vision systems on GX Work2 section).

  2. Right-click the target In-Sight vision system on the device map area.

  3. Select Online --> Parameter Processing of Ethernet Device. The Parameter Processing of Ethernet Device window will be displayed.

Reading Parameters

  1. To read the vision system's parameters, from the Method selection drop-down list, select Parameter read.
  2. Confirm that the checkboxes for the parameter to be read are checked.
  3. Click the Execute button. The vision system's parameter values will be displayed in the Read Value column.

Writing Parameters

  1. To write the vision system's parameters, from the Method selection drop-down list, select Parameter write.
  2. Confirm that the checkboxes for the parameter to be written are checked.
  3. Enter values in the Write Value column.
  4. Click the Execute button. The new parameter values will now be written to the vision system.

Parameters

ID | Name | Type | Size (Byte) | Description | Corresponding GUI on In-Sight Explorer
1 (4.x.x) SLMP Scanner Enable1 Byte 1

Enables the SLMP Scanner service on the vision system. 0 = Disabled (default); 1 or greater =Enabled.

Note: The vision system must be restarted to enable the SLMP Scanner service.
Network Settings Dialog
2 Controller Type Enum 1 Specifies the type of Mitsubishi PLC/MC to communicate with: iQ-R/Q/L Series (3E Frame), iQ-F Series (3E Frame) or FX Series (1E Frame)1. Default = iQ-R/Q/L Series (3E Frame).
 SLMP Scanner Settings Dialog
3 | Controller IP Address | String | Specifies the IP address of the PLC/MC that In-Sight vision system will be connected to.
4 | Controller Port | Word | 2 | Specifies the TCP port number, in decimal (1 - 65535) format, of the SLMP channel that will be used by the PLC/MC (default = 12288 in Dec).
5 | SLMP Timeout | Word | 2 | Specifies the timeout (5 to 30000; default = 1000), in milliseconds, for a response from the PLC/MC to an SLMP message.
6 | SLMP Poll Interval | Word | 2 | Specifies the amount of time (5 to 30000; default = 1000), in milliseconds, between successive polls of the Vision Control block on the PLC/MC.
7 SLMP Control Address String

The starting PLC/MC address of the vision control data block.

  • iQ-R/Q/L Series: None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; L - Latch Relay; F - Annunciator; B - Link Relay; D - Data Register; W - Link Register; R - File Block Register; ZR - File Register
  • iQ-F Series: None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; F - Annunciator; D - Data Register
 Device Addressing Tab
8 SLMP Status Address String

The starting PLC/MC address of the vision status data block.

  • iQ-R/Q/L Series: None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; L - Latch Relay; F - Annunciator; B - Link Relay; D - Data Register; W - Link Register; R - File Block Register; ZR - File Register
  • iQ-F Series: None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; F - Annunciator; D - Data Register
9 SLMP Input Address String

The starting PLC/MC address of the inspection results data block.

  • iQ-R/Q/L Series: None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register
  • iQ-F Series: None (default); D - Data Register
10 SLMP Input Size Word 2

Specifies the size of the data block that will be communicated with the PLC/MC.

2 devices2 + Input Data length (in words) (Maximum: 960 words)

11 SLMP Output Address String

The starting PLC/MC address of the user data block.

  • iQ-R/Q/L Series: None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register
  • iQ-F Series: None (default); D - Data Register
12 SLMP Output Size Word 2

Specifies the size of the data block that will be communicated with the PLC/MC.

5 devices3 + Output Data length (in words) (Maximum: 960 words)

13 SLMP Command Address String

The starting PLC/MC address of the command string.

None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register
14 SLMP Command Size Word 2

Specifies the size of the data block that will be communicated with the PLC/MC.

0 - 960 (default = 0)
15 SLMP Command Result Address String

The starting PLC/MC address of the command result data.

  • iQ-R/Q/L Series: None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register
  • iQ-F Series: None (default); D - Data Register
16 SLMP Command Result Size Word 2

Specifies the size of the data block that will be communicated with the PLC/MC.

0 - 960 (default = 0)

1 FX Series (1E Frame) is not supported on the iQ Sensor Solution.

2 2 devices (4 bytes/2 words) are used for the Job Load ID and User Length.

3 5 devices (10 bytes/5 words) are used for the Job ID, Acquisition ID, Inspection ID, Inspection Result Code and Inspection Result Length.

Monitoring the Status of In-Sight Vision Systems

  1. Launch GX Works2 and open a project that has the specified network configured.
  2. From the Diagnostics menu, select Sensor/Device Monitor. The Module Selection (Sensor/Device Monitor) window will be displayed.

  3. Click OK; the Status of vision systems connected to the Built-in Ethernet port LCPU will be displayed on the Sensor/Device Monitor window.

  4. Select the desired vision system from the "list of devices" or "device map area". The status of the vision system will be displayed on the Monitor Information window.

    Note: Only one vision system can be monitored in the Ethernet Configuration window at a time.


Motoman Communications

Motoman MRC, MRC-II, and XRC robot controllers communicate with other devices over RS-232 serial ports using a complex, but highly robust, error checking protocol. When configured for Motoman serial communications, the In-Sight vision system understands this protocol and is able to respond to the commands it receives from the Motoman controller.

Motoman Mode is an extension of In-Sight's Native Mode communications. Motoman robot controllers only send numeric text over their RS-232 ports; In-Sight's standard Native Mode commands cannot be sent. Instead, the Motoman controller must send to In-Sight a numeric representation of the Native Mode commands, with additional parameters appended as necessary.

Because Motoman Mode is based on Native Mode, an In-Sight job may be developed and tested in Native Mode, then switched to Motoman Mode only when the actual robot controller is connected to the In-Sight vision system. No other changes to the job are required.

To Configure an In-Sight Vision System for Motoman Communication

  1. On the Sensor menu, click Serial Port Settings.
  2. In the Serial Port Settings dialog, open the Mode drop-down list and select Motoman. For more information, see Serial Port Settings Dialog.

The In-Sight vision system will now default to standard Motoman controller serial port settings. However, if your controller uses different settings, make sure to configure In-Sight to use the same serial port settings as the Motoman controller.

Note:
  • The Motoman controller must be configured to communicate in DCI mode. Communications initiated from In-Sight to a Motoman robot controller operating in Host mode are not currently supported.
  • Although Motoman controllers specify "None" for Flow Control, In-Sight requires "Hardware" Flow Control (hardware handshaking) when communicating with a Motoman controller.
  • At this time, only Motoman XRC controllers have been tested.

Motoman Commands

Motoman Command Examples


Motoman Commands

The Motoman robot controller initiates all data communication between itself and an In-Sight vision system, whether sending data and commands or receiving data. Communication between In-Sight and a Motoman controller is accomplished using a two-command procedure initiated from the controller.

To Send a Command or Data From the Robot Controller to an In-Sight Vision System

Four Motoman SAVEV commands are used:

  • The first SAVEV specifies the index of the Motoman variable containing the command.
  • The second SAVEV specifies the command number, and the cell address if required.
  • The third SAVEV specifies the index of the Motoman variable containing the parameter for the command.
  • The fourth SAVEV specifies the parameter to append to the command number.

To Retrieve Data From an In-Sight Vision System to the Robot Controller

Three Motoman SAVEV commands followed immediately by a LOADV command are used:

  • The first SAVEV specifies the index of the Motoman variable containing the command.
  • The second SAVEV specifies the command number, and the cell address if required.
  • The third SAVEV specifies the index of the Motoman variable that will contain the result data sent from In-Sight.
  • The LOADV causes the data to be sent.

Motoman Commands

Nine Native Mode commands are supported in Motoman mode. The robot controller programmer must send all commands as a Motoman "D" variable. For more information, see Native Mode Commands. The supported commands and their Motoman mode equivalents are listed in the following table:

Native Mode Command | Motoman Mode equivalent
Set Job (SJ) | 100000
Get Job (GJ) | 200000
Set Online (SO) | 300000
Get Online (GO) | 400000
Set Event (SE) | 500000
Set Integer (SI) | 600000
Set Float (SF) | 700000
Set String (SS) | 800000
Get Value (GV) | 900000

The commands SJ, GJ, SO, GO, and SE do not require any additional parameters to fully specify the command. Therefore, any value between 100000 and 199999 represents an SJ command, any value between 200000 and 299999 represents a GJ command, and so on.

The commands SI, SF, SS, and GV require parameters to be sent as part of the command, specifically, a reference to a cell in the In-Sight spreadsheet. But because Motoman robot controllers do not send alpha characters, the column reference for the desired In-Sight cell must be specified numerically. The column number is 01000 through 26000, where 01000 indicates column 'A', 02000 indicates column 'B', and so on (e.g. 26000 indicates column 'Z'). The row number is added on as-is to complete the cell address.

Since a complete Motoman-equivalent Native Mode command will always be a number in excess of 100000, all commands sent by the robot controller must be stored as Motoman D-variables.

A complete Motoman mode command is constructed as follows:

Robot controller D-value command = N + CC + RRR

  • N is the Native Mode "equivalent" {100000 through 900000}
  • CC is the column number "equivalent" (01000 through 26000)
  • RRR is the row number.

Motoman Command Example

A command to get the value from cell B123 in the active In-Sight spreadsheet job would be written in Native Mode as GVB123. The equivalent command issued from the Motoman robot controller is 902123 ( 900000 + 02000 + 123 ).


Motoman Command Examples

The following are examples of the Motoman command sequences needed to duplicate the functionality of each of the corresponding Native Mode commands. In each example, Motoman variable D001 is used to hold the command, Motoman variable B000 is used to hold the index pointing to D001, and Motoman variable B001 is used to hold the index pointing to the Motoman variable holding the parameter to be sent or data received.

  • Activate the job in slot #13 on the In-Sight sensor:

    Native Mode Command

    Motoman Command Sequence

    SJ13

    0001 SET B000 1
    0002 SET D001 100000
    0003 SET B001 2
    0004 SET B002 13
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV B002

    The Motoman B-variable B002 holds the job # parameter.

  • Retrieve the job# of the active In-Sight job:

    Native Mode Command

    Motoman Command Sequence

    GJ

    0001 SET B000 1
    0002 SET D001 200000
    0003 SET B001 3
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV B003

    The Motoman B-variable B003 will hold the number of the active In-Sight job (0 to 19).

  • Set In-Sight vision system Online

    Native Mode Command

    Motoman Command Sequence

    SO1

    0001 SET B000 1
    0002 SET D001 300000
    0003 SET B001 4
    0004 SET B004 1
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV B004

    The Motoman B-variable B004 holds the parameter. To set In-Sight Offline, SETB004 0.

  • Retrieve the Online/Offline state of the In-Sight vision system:

    Native Mode Command

    Motoman Command Sequence

    GO

    0001 SET B000 1
    0002 SET D001 400000
    0003 SET B001 5
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV B005

    The Motoman B-variable B005 will hold the Online/Offline state (1 or 0).

  • Trigger the Event in the active In-Sight job that is specified as 'Soft 7':

    Native Mode Command

    Motoman Command Sequence

    SE7

    0001 SET B000 1
    0002 SET D001 500000
    0003 SET B001 6
    0004 SET B006 7
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV B006

    The Motoman B-variable B006 holds the Event number parameter.

  • Set the value of an EditInt function contained in cell A13 of the active In-Sight job to the integer value 69.

    Native Mode Command

    Motoman Command Sequence

    SIA013 69

    0001 SET B000 1
    0002 SET D001 601013
    0003 SET B001 7
    0004 SET I007 69
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV I007

    The Motoman I-variable I007 stores the integer parameter.

  • Set the value of an EditFloat function contained in cell B14 of the active In-Sight job to the double, or real, value 3.142.

    Native Mode Command

    Motoman Command Sequence

    SFB014 3.142

    0001 SET B000 1
    0002 SET D001 702014
    0003 SET B001 8
    0004 SET R008 3.142
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV R008

    The Motoman R-variable R008 stores the double or real parameter.

  • Set the value of an EditString function contained in cell C15 of the active In-Sight job to the string, or P-variable, "1.1,2.2,3.3,4.4,5.5,6.6,00".

    Native Mode Command

    Motoman Command Sequence

    SSC015 1.1,2.2,3.3,4.4,5.5,6.6,00

    0001 SET B000 1
    0002 SET D001 803015
    0003 SET B001 9
    0004 SET P009 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 00
    0005 SAVEV B000
    0006 SAVEV D001
    0007 SAVEV B001
    0008 SAVEV P009

    The Motoman P-variable P009 stores the P-variable parameter.
    Note: In your In-Sight job, you should use Token$ functions to parse the values of a P-variable.

  • Retrieve the string contained in cell C15 in the active In-Sight job (as set in the example immediately above), and place the result in the designated Motoman variable.

    Native Mode Command

    Motoman Command Sequence

    GVC015

    0001 SET B000 1
    0002 SET D001 903015
    0003 SET B001 10
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV P010

    The Motoman P-variable P010 will contain 1.1,2.2,3.3,4.4,5.5,6.6,00.

  • Retrieve the value contained in a cell in the active In-Sight job and place the result in the designated Motoman variable. The requested data will be formatted to match the specified data type (integer or floating point) indicated by the Motoman variable in the controller program.

    Note: An In-Sight cell containing any numeric value will return a float value formatted to 3 decimal places when requested by the Native Mode command GV, regardless of whether the cell contains an integer or a floating point value.

    Native Mode Command

    Motoman Command Sequence

    GVD016

    0001 SET B000 1
    0002 SET D001 904016
    0003 SET B001 11
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV I011

    In this example, an I-variable (integer) is requested. So:

    1. If the value contained in cell D016 is 123, the Motoman I-variable I011 will contain '123'.
    2. If the value contained in cell D016 is 123.555, the Motoman I-variable I011 will also contain '123'.
    Note: The Motoman mode command does not perform any rounding operation when converting a floating-point value into an integer; the decimal part is simply truncated; it is up to the user to perform a mathematical rounding function, if necessary, to transmit an In-Sight floating-point value into a Motoman integer variable.

    Native Mode Command

    Motoman Command Sequence

    GVE017

    0001 SET B000 1
    0002 SET D001 905017
    0003 SET B001 12
    0004 SAVEV B000
    0005 SAVEV D001
    0006 SAVEV B001
    0007 LOADV R012

    In this example, an R-variable (real) is requested. So:

    1. If the value contained in cell E017 is 123, the Motoman R-variable R012 will contain '123.000'.
    2. If the value contained in cell E017 is 123.555, the Motoman R-variable R012 will contain '123.555'.


Native Mode Communications

The In-Sight Native Mode protocol is an ASCII protocol that allows an In-Sight sensor to be controlled from any of the following:

  • Custom application programs running on a PC
  • Remote hosts that support standard serial communications
  • Telnet over an Ethernet network

The Native Mode protocol is divided into two sets of commands: Basic and Extended.

  • Basic Native Mode commands are two characters long, plus parameters (if any) and a terminator character.
  • Extended Native Mode commands include additional functions or commands.

The commands are not case sensitive. The terminator is CR + LF (ASCII characters 13 + 10) when sending Native Mode commands using a telnet connection. When using Native Mode commands over a serial port, an alternate terminator character may be specified in the Native Mode Details. The default terminator is CR (ASCII character 13).

When a Native Mode command is remotely issued to an In-Sight sensor, the In-Sight sensor processes the command and then returns a response, consisting of an ASCII string followed by the terminator character.

  • Commands that set values return 1 for "success", 0 for "unrecognized command", or a negative number for "failure".
  • Commands that get values return various values, depending on the command.
Note:
  • A subset of Native Mode commands can be sent from any PLC (that allows a generic CIP message) over an EtherNet/IP connection using Explicit Messaging: Delete File, Get File, Get Online, Get Value, Load File, Set Event, Set Float, Set Integer, Set Online, Set String and Store File. For more information, see Native Mode Commands.
  • The In-Sight 2000 series sensor has the following limitations:
    • The In-Sight 2000 series sensor does not support all basic native mode commands. For more information, see Native Mode Commands.
    • The Get Value (GV) command is only supported for Serial Native.
    • The In-Sight 2000 series sensor does not support extended native mode commands, except where noted.
    • The In-Sight 2000-110, 2000-120 and 2000-120C sensors are only capable of returning Pass/Fail data. When attempting to retrieve numeric data, an invalid permission (-6) error will be returned.

Basic Native Mode Syntax

The general syntax of a Basic Native Mode command is as follows: [command][parameter][terminator]

  • Where [command] consists of two characters. Some Native Mode commands take an optional [parameter].
  • The Basic Native Mode command is completed with a [terminator] character. The terminator is CR + LF (ASCII characters 13 + 10) when sending Native Mode commands using a telnet connection. When using Native Mode commands over a serial port, an alternate terminator character may be specified in the Native Mode Details. The default terminator is CR (ASCII character 13).
  • Basic Native Mode commands are not case-sensitive. No spaces exist between parameters.
Note:
  • Native Mode commands that are executed on a Job (such as Write Job and Delete Job) are included primarily for backwards compatibility.
  • The checksum that is used by Native Mode file transfer commands is a standard 16-bit Cyclical Redundancy Check. For more information, see Cyclical Redundancy Check (CRC).

Extended Native Mode Syntax

The general syntax of an Extended Native Mode command is as follows: [command1] [command2] [input parameters][terminator]

  • Where [command1] is any one of the three Extended Native Mode commands (Get, Put, EV). [command2] represents the secondary command, indicating which data to send, receive, or execute, based upon [command1]. [input parameters] supply optional supplementary information to the command.
  • The Extended Native Mode command is completed with a [terminator] character. The terminator is CR + LF (ASCII characters 13 + 10) when sending Native Mode commands using a telnet connection. When using Native Mode commands over a serial port, an alternate terminator character may be specified in the Native Mode Details. The default terminator is CR (ASCII character 13).
  • Extended Native Mode commands are not case-sensitive. Note that spaces exist between certain input parameters.

Communicate with In-Sight Vision Systems via Serial Port Using Native Mode Commands

  1. On the Sensor menu, click Serial Port Settings.
  2. In the Serial Port Settings dialog, choose Native From the Mode drop-down list.
  3. Configure the remote serial device to use the same port settings as the In-Sight sensor.
Note: When using Native Mode commands over a serial port, a different terminator character may be specified in the Native Mode Details, which is accessed from the Serial Port dialog. For more information, see Native Mode Details.

Communicate with In-Sight Vision Systems via Telnet Using Native Mode Commands

Telnet is a built-in Microsoft Windows client that can be used to remotely communicate with the sensor using In-Sight Native Mode commands.

Note: Telnet must be enabled in Windows before it can be utilized. Open Control Panel > Programs and Features. Select Turn Windows features on or off. Check the Telnet Client box, then click OK.
  1. Open the telnet client application on the remote host.
  2. In the telnet application, connect to the vision system by either its Host Name or IP address. If the connection is successful, a "Welcome to In-Sight(tm)" message appears, along with the hardware model number (for example: IS8402M) and the session number.

  3. Enter a valid user name and password for the In-Sight sensor. The user name and password entered must exist in the User List for that sensor. If the log on is successful, the message "User Logged In" will appear. The default administrator logon is admin and the default password is <blank>.

    You can test the telnet connection by typing the Native Mode Get Value command, "gva000", at the telnet prompt. If successful, the command returns a 1, followed by the value in cell A0 in the spreadsheet of the In-Sight sensor, #Image:

Custom applications can be written (to run on a remote host) to automate the telnet logon process, as well as to send and receive Native Mode data.

Note:
  • By default, when connected via telnet, there is no default timeout. To set a timeout value, use the Put Timeout command.
  • Under typical use, password echo is disabled in the telnet client application for security purposes.

  • When using telnet to log on to an In-Sight sensor from a Unix-based platform, the telnet command line must be in the following format:

    > telnet <host> <port>

    where <host> is either the In-Sight sensor's Host Name or IP Address, and <port> is the remote telnet port (usually 23). Supplying the port number disables the Unix username/password authentication and forces the Unix system to prompt you for a user name and password.

Native Mode Commands

Extended Native Mode Commands


Native Mode Commands

Basic Native Mode Commands

Note:

The In-Sight 2000 series sensor supports the following basic native commands:

  • File & Job commands: Load File (LF), Store File (TF), Read File (RF), Write File (WF), Delete File (DF), Get File (GF), Set Job (SJ), Store Job (TJ), Read Job (RJ), Write Job (WJ), Delete Job (DJ), and Get Job (GJ)
  • Image Commands: Read BMP (RB), and Write BMP (WB)
  • Settings & Cell Value Commands: Set Integer (SI), Set Float (SF), Get Info (GI), Read Settings (RS), Write Settings (WS), Store Settings (TS), Set IP Address Lock (SL), and Get IP Address Lock (GL)
  • Execution & Online Commands: Set Online (SO), Get Online (GO), Set Event 8 (SE8), Set Event and Wait 8 (SW8), and Reset System (RT).
  • The Get Value (GV) command is only supported for Serial Native.

File & Job Commands

  • Load File: (LF) Loads the specified job from flash memory on the In-Sight vision system, making it the active job. For more information, see Load File.
  • Store File: (TF) Saves the current job in flash memory on the vision system. For more information, see Store File.
  • Read File: (RF) Reads a job from the flash memory on the vision system. For more information, see Read File.
  • Write File: (WF) Sends a job to the flash memory on the vision system. For more information, see Write File.
  • Delete File: (DF) Deletes the specified job or cell data file (.cxd) from flash memory on the vision system. For more information, see Delete File.
  • Get File: (GF) Returns the filename of the active job on the vision system. For more information, see Get File.
  • Set Job: (SJ) Loads a job from one of the job slots in flash memory on the vision system, making it the active job. For more information, see Set Job.
  • Store Job: (TJ) Saves the current job into the specified slot in flash memory on the vision system. For more information, see Store Job.
  • Read Job: (RJ) Reads a job from the specified In-Sight job slot. For more information, see Read Job.
  • Write Job: (WJ) Sends a job to the specified job slot in flash memory on the vision system. For more information, see Write Job.
  • Delete Job: (DJ) Deletes the job from the specified slot in flash memory on the vision system. For more information, see Delete Job.
  • Get Job: (GJ) Gets the currently loaded job's ID number. For more information, see Get Job.

Image Commands

  • Read BMP: (RB) Sends the current image, in ASCII hexadecimal format, from a vision system to an external device. For more information, see Read BMP.
  • Read Image: (RI) Sends the current image, in ASCII hexadecimal format, from a vision system to an external device. For more information, see Read Image.
  • Write BMP: (WB) Sends image data from an external device to the vision system. For more information, see Write BMP.
  • Write Image: (WI) Sends image data from an external device to the vision system. For more information, see Write Image.

Settings & Cell Value Commands

  • Get Value: (GV) Returns the value in a specified cell or symbolic tag. For more information, see Get Value.
  • Set Integer: (SI) Sets an integer value in a specified cell or symbolic tag. For more information, see Set Integer.
  • Set Float: (SF) Sets a floating point value in a specified cell or symbolic tag. For more information, see Set Float.
  • Set Region: (SR) Sets the values of an EditRegion cell or symbolic tag. For more information, see Set Region.
  • Set String: (SS) Sets a string value in a specified cell or symbolic tag. For more information, see Set String.
  • Get Info: (GI) Returns system information about the In-Sight vision system. For more information, see Get Info.
  • Read Settings: (RS) Reads the system settings data from a vision system. For more information, see Read Settings.
  • Write Settings: (WS) Sends the system settings data from an external device to the vision system. For more information, see Write Settings.
  • Store Settings: (TS) Stores the vision system settings to the proc.set file. For more information, see Store Settings.
  • Set IP Address Lock: (SL) Prevents unauthorized changes to a vision system's IP address. For more information, see Set IP Address Lock.
  • Get IP Address Lock: (GL) Returns the security status of the IP address on a vision system. For more information, see Get IP Address Lock.

Execution & Online Commands

  • Set Online: (SO) Sets the vision system into Online or Offline mode. For more information, see Set Online.
  • Get Online: (GO) Returns the Online state of the vision system. For more information, see Get Online.
  • Set Event: (SE) Triggers a specified event. For more information, see Set Event.
  • Set Event and Wait: (SW) Triggers a specified event and waits until the command is completed to return a response. For more information, see Set Event and Wait.
  • Reset System: (RT) Resets the vision system (similar to physically power cycling the vision system). For more information, see Reset System.
  • Send Message: (SM) Sends a string to the spreadsheet over a Native Mode connection, and optionally, triggers a spreadsheet Event. For more information, see Send Message.

Extended Native Mode Commands

  • Get: Used to receive information from the In-Sight vision system and its spreadsheet. For more information, see Get.
  • Put: Used to send information to a vision system and its spreadsheet. For more information, see Put.
Note: The In-Sight 2000 series vision sensor does not support extended native mode commands, except where noted.

Evaluate

Evaluate: (EV) Executes In-Sight functions as well as inserts formulas into the In-Sight spreadsheet; used to retrieve information and make changes to In-Sight vision systems. For more information, see Evaluate.

Note: All In-Sight functions may be used with the EV command; the commands listed below are some of the most common functions to be executed using the EV command.
  • GetCellName: Returns the cell location of a specified symbolic tag name, or the symbolic tag name of a specified cell. For more information, see GetCellName.
  • GetCellValue: Returns the contents of a specified symbolic tag or spreadsheet cell in XML format. For more information, see GetCellValue.
  • GetDeEnergizeOutputs: Returns the De-Energize Outputs While Offline setting configured in the Discrete I/O Settings dialog. For more information, see GetDeEnergizeOutputs.
  • GetDiagnosticLog: Returns a log of information used to diagnose errors on the In-Sight vision system. For more information, see GetDiagnosticLog.
  • GetDiscreteInput: Returns information that is configured in the Discrete I/O Settings dialog. For more information, see GetDiscreteInput.
  • GetDiscreteOutput: Returns information that is configured in the Discrete I/O Settings dialog. For more information, see GetDiscreteOutput.
  • GetDiscreteOutputDelay: Returns delay settings that are configured in the Discrete I/O Settings dialog. For more information, see GetDiscreteOutputDelay.
  • GetEasyBuilderTag: Returns the EasyBuilder Tag for the specified symbolic tag name or cell location. For more information, see GetEasyBuilderTag.
  • GetFTPSettings: Returns information that is configured in the FTP Settings dialog. For more information, see GetFTPSettings.
  • GetHostTable: Returns information contained in the In-Sight Host Table dialog. For more information, see GetHostTable.
  • GetMSBuffer: Returns the Machine Status data stored in one of 8 indexed buffers (zero-based) within the Machine Status stack. For more information, see GetMSBuffer.
  • GetNetwork: Returns information that is configured in the Network Settings dialog. For more information, see GetNetwork.
  • GetSerialPort: Returns information that is configured in the Serial Port Settings dialog. For more information, see GetSerialPort.
  • GetStartup: Returns information that is configured in the Startup dialog. For more information, see GetStartup.
  • GetSystemConfig: Various commands that return system information. For more information, see GetSystemConfig.
  • GetUserList: Returns information that is configured in the User List dialog. For more information, see GetUserList.
  • SetCellName: Sets the symbolic tag name of a specified cell. For more information, see SetCellName.
  • SetCellValue: Sets the value of specific cell appended with an EasyBuilder Tag. For more information, see SetCellValue.
  • SetDeEnergizeOutputs: Configures the De-Energize Outputs While Offline setting found in the Discrete I/O Settings dialog. For more information, see SetDeEnergizeOutputs.
  • SetDiscreteInput: Configures settings that are found in the Discrete I/O Settings dialog. For more information, see SetDiscreteInput.
  • SetDiscreteOutput: Configures settings in the Discrete I/O Settings dialog and the Output Details dialog. For more information, see SetDiscreteOutput.
  • SetDiscreteOutputDelay: Configures delay settings that are found in the Output Details dialog. For more information, see SetDiscreteOutputDelay.
  • SetEditRegion: Configures settings for a cell that contains an EditRegion function. For more information, see SetEditRegion.
  • SetFavorHostTable: Enables or disables the Favor Host Table over DNS option found in the In-Sight Host Table. For more information, see SetFavorHostTable.
  • SetFTPSettings: Configures settings that are found in the FTP Settings dialog. For more information, see SetFTPSettings.
  • SetHostTable: Configures settings that are found in the In-Sight Host Table dialog. For more information, see SetHostTable.
  • SetNetwork: Configures settings that are found in the Network Settings dialog. For more information, see SetNetwork.
  • SetSerialPort: Configures settings that are found in the Serial Port Settings dialog. For more information, see SetSerialPort.
  • SetStartup: Configures settings that are found in the Startup dialog. For more information, see SetStartup.
  • SetSystemConfig: Various commands that configure system parameters. For more information, see SetSystemConfig.


Load File

Loads the specified job from flash memory on the In-Sight vision system, RAM Disk or SD Card, making it the active job.

Note:
  • The In-Sight vision system must be Offline.
  • To load a job file stored in the RAMDisk folder, the syntax is: LFRAMDisk/[Filename]. For example, to load the file "Product.job" stored in the vision system's RAMDisk folder, issue the following command: "LFRAMDisk/Product.job".
  • To load a job file stored in the SD Card folder, the syntax is LFSDCARD/[Filename]. For example, to read the file "Product.job" stored in the vision system's SD Card folder, issue the following command: "LFSDCARD/Product.job".
  • The Job Server Settings dialog can be used to configure an FTP server that will host In-Sight job files for the In-Sight vision system, which allows another device, such as a PLC or robot controller via the LF and TF Native Mode commands, to change jobs without specifying a location.

Load File Inputs

Syntax: LF[Filename]

Input | Description
Filename | The name of the job. The command will execute with or without the .JOB extension.

Load File Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The filename is missing.
-2 | The job failed to load, the vision system is Online, or the file was not found.
-4 | The vision system is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Load File Example

To load "Product" as the active job on the In-Sight vision system, issue the following command: LFProduct.job

The In-Sight sensor responds with 1, indicating that the job was successfully loaded and made active.


Store File

Saves the current job in flash memory on the In-Sight vision system, RAM Disk or SD Card.

Note:

  • If the Allow Online Job Save checkbox is enabled, users with Full or Protected access are allowed to save jobs while Online. If the Allow Online Job Save checkbox is not enabled, the vision system must be Offline to save jobs.

  • To save the current job file, with the specified filename, to the vision system's RAMDisk folder, the syntax is: TFRAMDisk/[Filename]. For example, to save the file "Test.job" to the vision system's RAMDisk folder, issue the following command: "TFRAMDisk/Test.job".
  • To save the current job file, with the specified file name, to the vision system's SD Card folder, the syntax is TFSDCARD/[Filename]. For example, to save the file "Test.job" stored to the vision system's SD Card folder, issue the following command: "TFSDCARD/Test.job".
  • The Job Server Settings dialog is used to configure an FTP server that will host In-Sight job files for the In-Sight vision system, which allows another device, such as a PLC or robot controller via the LF and TF Native Mode commands, to change jobs without specifying a location.

Store File Inputs

Syntax: TF[Filename]

Parameter | Description
Filename | The name of the job. The file extension must be .JOB.

Store File Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The filename is missing.
-2 | The job failed to save, the vision system is Online or the file was not found, therefore the command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Store File Example

To name the current job "Test" and save it in flash memory on the In-Sight vision system, issue the following command: TFTest.job

The In-Sight vision system responds with 1, indicating that the current job was successfully saved.


Read File

Reads a job from the specified In-Sight flash memory, RAM Disk or SD Card.

Note:
  • To read a job file stored in the RAMDisk folder, the syntax is: RFRAMDisk/[Filename]. For example, to read the file "Model.job" stored in the vision system's RAMDisk folder, issue the following command: "RFRAMDisk/Model.job".
  • To read a job file stored in the SD Card folder, the syntax is RFSDCARD/[Filename]. For example, to read the file "Model.job" stored in the vision system's SD Card folder, issue the following command: "RFSDCARD/Model.job".

Read File Inputs

Syntax: RF[Filename]

Parameter | Description
Filename | The name of the job. The command will execute with or without the .JOB extension.

Read File Outputs

Returns a status code, followed by a line terminator, followed by lines of job data.

  • The status codes are:

    Status Codes Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -1

    The job filename is missing.
    -2

    There is no job saved with the given name or the job data is invalid, therefore the command could not be executed.
    -6

    User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • The lines of job data are:

    Name

    The first line contains the job name.

    Size

    The second line contains an integer value for the size (in bytes) of the job.

    Data

    The actual job data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.

    CheckSum

    The last line contains four ASCII hexadecimal bytes that are a checksum of the job data.

Read File Example

To receive information about the job "Model.job", which is saved on the In-Sight vision system, issue the following command: RFModel.job

After issuing the Read File command, the first line outputted to the telnet window is the status code (1), followed by the job name (Model.job) and size (1900) in bytes, then the job data (in ASCII hexadecimal format). Finally, the four-byte ASCII hexadecimal checksum is displayed on the last line (48A3).

Note: The size reported by the RF command will be twice the number of bytes of the actual .JOB file size stored on the In-Sight vision system, due to the ASCII hexadecimal encoding of the data.


Write File

Sends a job to the flash memory on the In-Sight vision system, RAM Disk or SD Card.

Note:
  • The In-Sight vision system must be Offline.
  • To send a job file stored in the vision system's RAMDisk folder, the filename must include the RAMDisk folder path. For example, "RAMDisk/NewModel.job".
  • To send a job file stored in the vision system's SD Card folder, the filename must include the SD Card folder path. For example, "SDCARD/NewModel.job".

Write File Inputs

Syntax: WF[Filename][Size][Data][Checksum]

The command is sent on a separate line, followed by the lines of job data, which should be an exact copy of the data received from a Read File command. The lines of job data are:

Parameter | Description
Filename | The name of the job. The command will execute with or without the .JOB extension.
Size | The second line contains an integer value for the size (in bytes) of the job.
Data | The actual job data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.
CheckSum | The last line contains four ASCII hexadecimal bytes that are a checksum of the job data.

Write File Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The job could not be written, or the job data is invalid.
-3 | The checksum failed. The checksum does not match the job data.
-4 | The In-Sight vision system is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Write File Example

To write job data to the job "NewModel.job", issue the following command: WF. After issuing the Write File command, the first input is the job name (NewModel.job), followed by the size (826) in bytes. Next, each ASCII hexadecimal byte of the job file is input. Finally, the four ASCII hexadecimal checksum bytes are input on the last line (48A3).

The In-Sight vision system responds with 1, indicating that the job was successfully sent to the vision system's flash memory.

Note:
  • If the job file already exists on the vision system, the existing job data is overwritten.
  • If the job file does not already exist on the vision system, a new job file is created with the specified name.


Delete File

Note:
  • The In-Sight vision system must be Offline.
  • To delete a job or .CXD file stored in the vision system's RAMDisk folder, the syntax is: DFRAMDisk/[Filename]. For example, to delete the file "Test.job" stored in the vision system's RAMDisk folder, issue the following command: "DFRAMDisk/Test.job".
  • To delete a job or .CXD file stored in the vision system's SD Card folder, the syntax is: DFSDCARD/[Filename]. For example, to delete the file "Test.job" stored in the vision system's SD Card folder, issue the following command: "DFSDCARD/Test.job".

Delete File Inputs

Syntax: DF[Filename]

Parameter | Description
Filename | The name of the job or .CXD file. The file extension must be .JOB or .CXD.

Delete File Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The filename is missing.
-2 | The file could not be deleted, the vision system is Online, a file does not exist with the given name, or the job data is invalid, therefore the command could not be executed.
-6 | User does not have Full Access to execute the command.

Example: Delete a Job File

To delete the job "Test.job" from the In-Sight vision system, issue the following command: DFTest.job

The In-Sight vision system responds on the following line with the status code of 1, indicating that the job was successfully deleted.

Example: Delete a .CXD File

To delete the .CXD file "FindPatterns.cxd" from the In-Sight vision system's RAM Disk folder, issue the following command: DFRAMDisk/FindPatterns.cxd

The In-Sight vision system responds on the following line with the status code of 1, indicating that the .CXD file was successfully deleted.


Get File

Returns the filename of the active job on the In-Sight vision system, RAM Disk or SD Card.

Note:
  • The active job must be saved before this command can be executed successfully.
  • If the active job is saved to the vision system's RAMDisk folder, the Get File output includes the RAMDisk folder path. For example, if the active job, "Test.job", is saved in the vision system's RAMDisk folder, the Get File command returns "RAMDisk/Test.job".
  • If the active job is saved to the vision system's SD Card folder, the Get File output includes the SD Card folder path. For example, if the active job, "Test.job", is saved in the vision system's SD Card folder, the Get File command returns "SDCARD/Test.job".

Get File Inputs

Syntax: GF

Get File Outputs

Returns a status code, followed by the name of the file. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The active job has not been saved, therefore the command could not be executed.

Get File Example

Assume that the active, saved job on an In-Sight vision system is named "Test.job". To return the filename of the active job, issue the following command: GF

The In-Sight vision system responds with 1, indicating that the command executed successfully. On the following line, the active job filename (Test.job) is displayed.

Note:
  • If the active job was loaded from a remote In-Sight vision system, the filename will be displayed in the following format: FTP://HostName/filename.
  • If the active job was drag-and-dropped from the PC (and not saved to the sensor), the filename is displayed in the following format: .job.


Set Job

Loads a job from one of the job slots in flash memory on the In-Sight sensor, making it the active job.

Note:
  • The In-Sight sensor must be Offline.
  • This command only works on a job saved on the flash memory on the In-Sight vision system. If the job is stored on the configured Job Server or the SD Card installed to the In-Sight vision system, this command does not work.
  • To use the job ID number feature, the job to be loaded must be saved with a numerical prefix of 0 to 999.

Set Job Inputs

Syntax: SJ[ID]

Parameter | Description
ID | The ID number of the job to load (0 to 999).

Set Job Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The ID is less than 0, or is not an integer.
-2 | The job failed to load, the sensor is Online or the file was not found, therefore the command could not be executed.
-4 | The In-Sight sensor is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Job Example

To load "85Test.job" as the active job on the In-Sight sensor, issue the following command: SJ85.

The In-Sight sensor responds with 1, indicating that the job was successfully loaded and made active.


Store Job

Saves the current job into the specified slot in flash memory on the In-Sight sensor.

Note:

  • If the Allow Online Job Save checkbox is enabled, users with Full or Protected access are allowed to save jobs while Online. If the Allow Online Job Save checkbox is not enabled, the vision system must be Offline to save jobs.

  • This command only works on a job saved on the flash memory on the In-Sight vision system. If the job is stored on the configured Job Server or the SD Card installed to the In-Sight vision system, this command does not work.
  • To use the job ID number feature, the job to be saved must be saved with a numerical prefix of 0 to 999.

Store Job Inputs

Syntax: TJ[ID][Name]

Parameter | Description
ID | The job ID number (0 to 999).
Name | The name of the job. The command will execute with or without the .JOB file extension.

Store Job Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The job ID number is invalid or it is not an integer.
-2 | The sensor is Online, therefore the command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Store Job Example

To name the current job "Test" and save it into slot 0 on the In-Sight sensor, issue the following command: TJ00Test.job

The In-Sight sensor responds with 1, indicating that the current job was successfully saved.


Read Job

Reads a job from the specified In-Sight job slot.

Read Job Inputs

Syntax: RJ[ID]

Parameter | Description
ID | The job ID number (0 to 999).

Read Job Outputs

Returns a status code, followed by a line terminator, followed by lines of job data.

  • The status codes are:

    Status Codes | Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -1

    The job ID number is outside the allowable range (0 to 999).
    -2 | The job could not be read, or the job slot is empty, therefore the command could not be executed.
    -4

    The In-Sight sensor is out of memory.
    -6

    User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • The lines of job data are:

    Name

    The first line contains the job name.

    Size

    The second line contains an integer value for the size (in bytes) of the job.

    Data

    The actual job data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.

    CheckSum

    The last line contains four ASCII hexadecimal bytes that are a checksum of the job data.

Read Job Example

To receive information about the job named "85Test.job", which is saved on the In-Sight sensor, issue the following command: RJ85

After issuing the Read Job command, the first line outputted to the telnet window is the status code (1), followed by the job name (85Test.job) and size (1900) in bytes, then the job data (in ASCII hexadecimal format). Finally, the four-byte ASCII hexadecimal checksum is displayed on the last line (48A3).

Note: The size reported by the RJ command will be twice the number of bytes of the actual .JOB file size stored on the In-Sight sensor, due to the ASCII hexadecimal encoding of the data.


Write Job

Sends a job to the specified In-Sight job slot in flash memory on the In-Sight sensor.

Note:
  • The In-Sight vision system must be Offline.
  • This command only works on a job saved on the flash memory on the In-Sight vision system. If the job is stored on the configured Job Server or the SD Card installed to the In-Sight vision system, this command does not work.

Write Job Inputs

Syntax: WJ[ID][Filename][Size][Data][Checksum]

The command and ID are sent on a separate line, followed by the lines of job data, which should be an exact copy of the data received from a Read Job command.

Parameter | Description
ID | The job ID number (0 to 999).

The lines of job data are:

Parameter | Description
Filename | The first line contains the job name.
Size | The second line contains an integer value for the size, in bytes, of the job.
Data | The actual job data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.
CheckSum | The last line contains four ASCII hexadecimal bytes that are a checksum of the job data.

Write Job Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The job ID number is outside the allowable range (0 to 999).
-2 | The job could not be written, or the job data is invalid.
-3 | The checksum failed. The checksum does not match the job data.
-4 | The In-Sight vision system is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Write Job Example

To write job data to the job named "86Test.job", issue the following command: WJ86

After issuing the command, input the job name (Test.job), followed by the size (826) in bytes. Next, each ASCII hexadecimal byte of the job file is input. Finally, the four ASCII hexadecimal checksum bytes are input on the last line (D56E).

The In-Sight sensor responds with 1, indicating that the job was successfully sent to the sensor's flash memory.

Note:
  • If the job file already exists on the sensor, the existing job data is overwritten.
  • If the job file does not already exist on the sensor, a new job file is created with the specified name.
  • The size will be twice the number of bytes of the actual .JOB file size stored on the In-Sight sensor, due to the ASCII hexadecimal encoding of the data.


Delete Job

Deletes the job from the specified slot in flash memory on the In-Sight sensor.

Note:
  • The In-Sight sensor must be Offline.
  • This command only works on a job saved on the flash memory on the In-Sight vision system. If the job is stored on the configured Job Server or the SD Card installed to the In-Sight vision system, this command does not work.

Delete Job Inputs

Syntax: DJ[ID]

Parameter | Description
ID | The job ID number (0 to 999).

Delete Job Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The job ID number is outside the allowable range (0 to 999).
-2 | The job could not be deleted, the sensor is Online, or the job slot is empty, therefore the command could not be executed.
-6 | User does not have Full Access to execute the command.

Delete Job Example

To delete the job "Test.job" from slot 0 on the In-Sight sensor, issue the following command: DJ00Test.job

The In-Sight sensor responds on the following line with the status code of 1, indicating that the job was deleted successfully.


Get Job

Returns the ID of the active job on the In-Sight sensor.

Note:
  • To use the job ID number feature, the job to be loaded must be saved with a numerical prefix of 0 to 999.
  • The active job must be saved with a numerical prefix before this command can be executed successfully. If the job has been dragged and dropped, the file name must have a numerical prefix before this command can be executed successfully.
  • When a Get Job command is issued using Motoman communications, the status data is returned but the result data is not returned. Use the Get File command instead of the Get Job command, or place the job ID number in another cell in the spreadsheet and use the Get Value command.

Get Job Inputs

Syntax: GJ

Get Job Outputs

Returns a status code, followed by the integer ID of the active job. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The active job has not been saved or does not have a numerical prefix, therefore the command could not be executed.

Get Job Example

To return the ID for the active job, issue the following command: GJ

The In-Sight sensor responds with 1 to indicate that the command was executed successfully. The active job's name is "85.JOB".


Read BMP

Sends the current image, in ASCII hexadecimal format (formatted to 80 characters per line), from an In-Sight sensor out to a remote device. When converted to binary, the resulting data is in standard BMP image format.

Note: Executing the Read BMP command is the equivalent of executing the Read Image command.

Read BMP Inputs

Syntax: RB

Read BMP Outputs

Returns a status code, followed by a line terminator, followed by lines of image data.

  • The status codes are:

    Status Codes Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -4

    The In-Sight sensor is out of memory.
    -6

    User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • The lines of image data are:

    Size

    The second line contains an integer value for the size, in bytes, of the image.

    Image

    The actual image data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.

    CheckSum

    The last line contains four ASCII hexadecimal bytes that are a checksum of the image data.

Read BMP Example

To read the current image (in ASCII hexadecimal format) from an In-Sight sensor, issue the following command: RB

The In-Sight sensor initially responds with 1, indicating the command was successfully executed. The next line contains the size (3848) in bytes, followed by the image data (in ASCII hexadecimal format.)

Note: Most of the actual image data has been omitted from the preceding graphic for clarity.

Finally, the four-byte ASCII hexadecimal checksum (611E) is returned.


Read Image

Sends the current image, in ASCII hexadecimal format (formatted to 80 characters per line), from an In-Sight sensor out to a remote device. When converted to binary, the resulting data is in standard BMP image format.

Note: Executing the Read Image command is the equivalent of executing the Read BMP command.

Read Image Inputs

Syntax: RI

Read Image Outputs

Returns a status code, followed by a line terminator, followed by lines of image data.

  • The status codes are:

    Status Codes Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -4

    The In-Sight sensor is out of memory.
    -6

    User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • The lines of image data are:

    Size

    The second line contains an integer value for the size, in bytes, of the image.

    Image

    The actual image data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.

    CheckSum

    The last line contains four ASCII hexadecimal bytes that are a checksum of the image data.

Read Image Example

To read the current image (in ASCII hexadecimal format) from an In-Sight sensor, issue the following command: RI

The In-Sight sensor initially responds with 1, indicating the command was successfully executed. The next line contains the data size (3314) in bytes, followed by the image data (in ASCII hexadecimal format.)

Note: Most of the actual image data has been omitted from the preceding graphic for clarity.

Finally, the four-byte ASCII hexadecimal checksum (611E) is returned.


Write BMP

Sends image data from a remote device to an In-Sight sensor.

Note:
  • The In-Sight vision system must be Offline.
  • Executing the Write BMP command is the equivalent of executing the Write Image command.

Write BMP Inputs

Syntax: WB[Size][Image][Checksum]

The command is sent on a separate line, followed by the lines of image data, which should be an exact copy of the data sent using a Read BMP command. The lines of image data are:

Parameter | Description
Size | An integer value for the size (in bytes) of the image file.
Image | The actual image data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.
CheckSum | The last line contains four ASCII hexadecimal bytes that are a checksum of the image data.

Write BMP Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The image could not be written, or the image data is invalid.
-3 | The checksum failed. The checksum does not match the image data.
-4 | The In-Sight sensor is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Write BMP Example

To send the system settings to the sensor, issue the following command: WB. After issuing the Write BMP command, the first input is the size (3878) in bytes. Next, each ASCII hexadecimal byte of the image data is input. Finally, the four ASCII hexadecimal checksum bytes are input on the last line (A36D).

Note: Most of the actual image data has been omitted from the preceding graphic for clarity.

The In-Sight sensor responds with 1, indicating that the image data was successfully sent to the sensor.


Write Image

Sends image data from a remote device to an In-Sight sensor.

Note:
  • The In-Sight vision system must be Offline.
  • Executing the Write Image command is the equivalent of executing the Write BMP command.

Write Image Inputs

Syntax: WI[Size][Image][Checksum]

The command is sent on a separate line, followed by the lines of image data, which should be an exact copy of the data sent using a Read Image command. The lines of image data are:

Parameter | Description
Size | An integer value for the size, in bytes, of the image file.
Image | The actual image data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.
CheckSum | The last line contains four ASCII hexadecimal bytes that are a checksum of the image data.

Write Image Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The image could not be written, or the image data is invalid.
-3 | The checksum failed. The checksum does not match the image data.
-4 | The In-Sight sensor is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Write Image Example

To send the system settings to the sensor, issue the following command: WI

After issuing the Write Image command, the first input is the size (3436) in bytes. Next, each ASCII hexadecimal byte of the image data is input. Finally, the four ASCII hexadecimal checksum bytes are input on the last line (D4DC).

Note: Most of the actual image data has been omitted from the preceding graphic for clarity.

The In-Sight sensor responds with 1, indicating that the image data was successfully sent to the sensor.


Get Value

  • Get Value: Spreadsheet View
  • Get Value: EasyBuilder View


Set Integer

  • Set Integer: Spreadsheet View
  • Set Integer: EasyBuilder View


Set Float

  • Set Float: Spreadsheet View
  • Set Float: EasyBuilder View


Set Region

  • Set Region: Spreadsheet View
  • Set Region: EasyBuilder View


Set String

Sets an edit box control contained in a cell to a specified string. The edit box must be of the type EditString.

Set String Inputs

Syntax: SS[Column][Row][String]

Parameter | Description
Column | The column letter of the cell value to set (A to Z).
Row | The row number of the cell value to set. The row number must contain a three-digit number (000 to 399).
String | The string to set.

Set String Outputs

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid.
-2 | The input string is longer than the specified maximum string length in the EditString function or the cell does not contain an EditString function.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set String Example

  1. Assume cell B2 is populated as follows:

    B2 = EditString(20)

    The EditString control currently contains the text Before SS. The spreadsheet looks like this:

  2. To change this text to After SS using the Set String Native Mode command, issue the command SSB002After SS, as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The EditString control has been successfully changed from Before SS to After SS:


Get Info

Returns the system information for the In-Sight vision system.

Get Info Inputs

Syntax: GI

Get Info Outputs

Returns a status code, followed by the system information.

  • The status codes are:

    Status Codes | Description
    1 | The command was executed successfully.
    0 | Unrecognized command.
    -2 | The command could not be executed.

  • The system information includes:

    Output Description
    Serial Number

    The serial number of the In-Sight vision system.

    Application Version

    The current firmware version on the In-Sight vision system.

    Monitor Version

    The Monitor version of the In-Sight vision system. The In-Sight Monitor is used mainly for troubleshooting the In-Sight sensor.

    • "Safe Mode" allows you to start In-Sight by resetting all the setting parameters; be aware that this will replace the current "Settings" on the In-Sight sensor, including I/O, startup, and customization, without any prompting or warning.
    • "Diagnostics" and "Server Mode" are for internal use and should not be accessed without Cognex technical support assistance. "Start In-Sight" starts the In-Sight software on the system.

    MAC Address

    The Media Access Control (MAC) address of the In-Sight vision system. The MAC address is a hardware address that identifies a specific node of a network. Every In-Sight vision system has a unique MAC address assigned to it, which cannot be changed. For example, 00-d0-24-01-02-03. To locate the MAC address of an In-Sight vision system, look at the serial number label affixed to the vision system. Alternately, you can open the About In-Sight Explorer dialog. For more information, see About In-Sight Explorer Dialog.

    Date of Build

    The date of build of the firmware on the In-Sight vision system.

Get Info Example

To display system information about an In-Sight vision system, issue the following command: GI

The vision system initially responds with 1, indicating the command successfully executed. On the following lines, the system information is reported.


Read Settings

Reads the system settings data from an In-Sight sensor. The system settings data consist of the contents of the proc.set file, encoded in ASCII hexadecimal format.

Read Settings Inputs

Syntax: RS

Read Settings Outputs

Returns a status code, followed by a line terminator, followed by lines of settings data.

  • The status codes are:

    Status Codes Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -1

    The settings could not be read.
    -4

    The In-Sight sensor is out of memory.
    -6

    User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • The lines of settings data are:

    Size | The first line contains an integer value for the size (in bytes) of the settings data.
    Settings | The data for the settings is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with the terminating character.
    CheckSum | The last line contains four ASCII hexadecimal bytes that are a checksum of the system settings data.

Read Settings Example

To read system settings data from an In-Sight sensor, issue the following command: RS

The In-Sight sensor initially responds with 1, indicating the command successfully executed. The following line (1626) represents the amount of data (in bytes) to be transmitted. Finally, the system settings data are sent, followed by a checksum (6B38) of the data.

Note:
  • Most of the actual image data has been omitted from the preceding graphic for clarity.
  • The size reported by the RS command will be twice the number of bytes of the proc.set file, due to ASCII hexadecimal encoding of the data.


Write Settings

Sends the system settings data from a remote device to the In-Sight vision system.

Note: The In-Sight sensor must be Offline.

Write Settings Inputs

Syntax: WS[Size][Settings][Checksum]

The command is sent on a separate line, followed by the lines of settings data, which should be an exact copy of the data received from a Read Settings command.

The lines of settings data are:

Parameter | Description
Size | The first line contains an integer value for the size (in bytes) of the settings.
Settings | The data for the settings is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with the terminating character.
CheckSum | The last line contains four ASCII hexadecimal bytes that are a checksum of the system settings data.

Write Settings Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The settings could not be saved.
-3 | The checksum failed. The checksum does not match the settings data.
-4 | The In-Sight vision system is out of memory.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Write Settings Example

To send the system settings to the sensor, issue the following command: WS

After issuing the Write Settings command, the first input is the size (4246) in bytes. Next, each ASCII hexadecimal byte of the system settings is input. Finally, the four ASCII hexadecimal checksum bytes are input on the last line (7106).

The In-Sight sensor responds with a status code of 1, indicating that the command was executed successfully.

Note:
  • Most of the actual image data has been omitted from the preceding graphic for clarity.
  • The size will be twice the number of bytes of the proc.set file, due to ASCII hexadecimal encoding of the data.


Store Settings

Stores the In-Sight sensor settings to the proc.set file. For more information, see PROC.SET.

Store Settings Inputs

Syntax: TS

Store Settings Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The sensor is Online, therefore the command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Store Settings Example

To store the sensor settings to the proc.set file, issue the following command: TS

The In-Sight sensor responds with a status code of 1, indicating that the command was executed successfully.


Set IP Address Lock

Prevents unauthorized changes to an In-Sight sensor's IP address.

Set IP Address Lock Inputs

Syntax: SL[Int]

Parameter Description

Int
  • 0 = Unlock the IP address
  • 1 = Lock the IP Address

Set IP Address Lock Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The value given for Int is either out of range or is not a valid integer.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set IP Address Lock Example

To lock the sensor's IP address, issue the following command: SL1

The In-Sight sensor responds with a status code of 1, indicating that the IP address was successfully locked.


Get IP Address Lock

Returns the security status of the IP address on an In-Sight sensor. The ability to prevent unauthorized changes to the IP address is established by the Set IP Address Lock command. For more information, see Set IP Address Lock.

Get IP Address Lock Inputs

Syntax: GL

Get IP Address Lock Outputs

Returns the security status of the IP address on the vision system.

Security Status of the IP Address | Description
0 | The IP address is not locked.
1 | The IP address is locked.
-2 | The command could not be executed.

Get IP Address Lock Example

To return the security status of the IP address on the vision system, issue the following command: GL

The In-Sight vision system responds with 0, indicating that the IP address is not locked.


Set Online

Sets the In-Sight sensor into Online or Offline mode. For more information, see Online/Offline.

Note:
  • This command cannot place the In-Sight sensor into Online mode if the sensor has been set Offline either manually in the In-Sight Explorer user interface or by a Discrete Input signal.
  • The In-Sight Explorer application will send Set Online commands to In-Sight sensors to perform administrative functions such as Backup and Restore.

Set Online Inputs

Syntax: SO[Int]

Parameter

Description

Int
  • 0 = Sets the In-Sight sensor Offline.
  • 1 = Sets the In-Sight sensor Online.

Set Online Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The value given for Int is either out of range, or is not a valid integer.
-2 | The command could not be executed.
-5 | The communications flag was successful but the sensor did not go Online because the sensor is set Offline manually through the In-Sight Explorer user interface or by a Discrete I/O signal.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Set the In-Sight Sensor Into Online Mode

To set an In-Sight sensor into Online mode, issue the following command: SO1

The In-Sight sensor responds with a status code of 1, indicating that the sensor was successfully placed Online.

Example: Set the In-Sight Sensor into Offline Mode

To set an In-Sight sensor into Offline mode, issue the following command: SO0

The In-Sight sensor responds with a status code of 1, indicating that the sensor was successfully taken Offline.


Get Online

Returns the Online state of the In-Sight vision system. For more information, see Online/Offline.

Get Online Inputs

Syntax: GO

Get Online Outputs

Returns the Online state of the vision system.

Online State | Description
0 | The In-Sight vision system is currently Offline.
1 | The In-Sight vision system is currently Online.

Get Online Example

To determine the Online state of an In-Sight vision system, issue the following command: GO

The In-Sight vision system responds with 0, indicating that the vision system is currently Offline.


Set Event

Triggers a specified event in the spreadsheet through a Native Mode command.

Note:
  • If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait. If the SetEvent function will be used by a PLC/Motion Controller to trigger an acquisition, it should only be used in circumstances where the inspection results are not also being read. Otherwise, the acquisition and inspection will not be synchronized, with the vision system returning a response as soon as the image is acquired and before the inspection has been completed.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

Set Event Inputs

Syntax: SE[Int]

Parameter

Description

Int

The Event code to set.

  • 0 to 7 = Specifies a soft trigger (Soft 0, Soft 1, ... Soft 7).
  • 8 = Acquire an image and update the spreadsheet. This option requires the AcquireImage function's Trigger parameter to be set to External, Manual or Network. For more information, see AcquireImage.

Set Event Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:
Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The number is either out of range (0 to 8) or not an integer.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Event Example

The SetEvent function may be used to trigger events in the spreadsheet through Native Mode commands.

The command to trigger Event 0 (Soft 0) is: SE0

  1. Assume cells A2 and A3 are populated as follows:

    A2 = Event(80,0)

    A3 = Count($A$2,9999,0,0)

    The spreadsheet looks like this:

  2. Using the telnet client, issue 4 consecutive Set Event commands:

    The counter in cell A3 is incremented by 1 for each time SE0 is sent:


Set Event and Wait

Triggers a specified event and waits until the command is completed to return a response.

Note:
  • The In-Sight vision system must be Online.
  • If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

Set Event and Wait Inputs

Syntax: SW[Int]

Parameter

Description

Int

The Event code to set.

  • 0 to 7 = Specifies a soft trigger (Soft 0, Soft 1, ... Soft 7).
  • 8 = Acquire an image and update the spreadsheet. This option requires the AcquireImage function's Trigger parameter to be set to External, Manual or Network.

Set Event and Wait Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The number is either out of range (0 to 8) or not an integer.
-2 | The command could not be executed, or the sensor is Offline.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Event and Wait Example

The command to trigger Event 0 (Soft 0) is SW0. A response is not sent until the command has been completed.

  1. Assume cells A2 and A3 are populated as follows:

    A2 = Event(80,0)

    A3 = Count($A$2,9999,0,0)

    The spreadsheet looks like this:

  2. Place the sensor Online. Using the telnet client, issue 4 consecutive Set Event & Wait commands:

    The counter in cell A3 is incremented by 1 for each time SW0 is sent:


Reset System

Resets the In-Sight sensor. This command is similar to physically cycling power on the sensor.

Reset System Inputs

Syntax: RT

Reset System Outputs

Returns a status code, followed by a line terminator, followed by lines of settings data. The only status code returned is:

Status Codes | Description
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Reset System Example

To reset the In-Sight sensor, issue the following command: RT

The In-Sight sensor is successfully reset and no status code is returned.


Send Message

Sends a string to an In-Sight spreadsheet over a Native Mode connection, and optionally, triggers a spreadsheet Event.

Send Message Inputs

Syntax: SM"String"[Int]

Parameter | Description
Input | Description
"String" | The string to set. The string must be enclosed with quotation marks.
Int

The Event code to set. This is an optional parameter.

  • 0 to 7: Specifies a soft trigger (Soft 0, Soft 1, ... , Soft 7).
  • 8: Acquire an image and update the spreadsheet. This option requires that the AcquireImage function's Trigger parameter be set to External or Manual. For more information, see AcquireImage.

Send Message Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The number is either out of range (0 to 8) or not an integer.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Send a Text String

  1. Assume cells A2 and A3 are populated as follows:

    A2 = Event(80,0)

    A3 = ReadMessage(A2)

    The spreadsheet looks like this:

  2. Place the sensor Online. Using the telnet client, issue the Send Message command, followed by the Set Event command. The command to send the string "Test" is SM"Test". The command to trigger Event 0 (Soft 0) is: SE0.

    The ReadMessage function in cell A3 displays "Test".

Example: Send a String and Trigger a Spreadsheet Event

  1. Assume cells A2 and A3 are populated as follows:

    A2 = Event(80,0)

    A3 = ReadMessage(A2)

    The spreadsheet looks like this:

  2. Place the sensor Online. Using the telnet client, issue the Send Message command to the In-Sight sensor. The command to send the string "Test" and trigger Event 0 (Soft 0) is: SM"Test"0.

  3. Take the sensor Offline. The ReadMessage function in cell A3 displays "Test".


Get

Three commands are used in conjunction with the Get extended Native Mode command to receive information from the In-Sight vision system and its spreadsheet.

Syntax: Get [command]

Note: A space is needed between Get and the command, as well as between the command and any input parameters.

Get Connections

Returns current connection information for the In-Sight vision system.

Get Connections Inputs

Syntax: Get Connections

Get Connections Outputs

Returns:

  • A status code followed by the number of characters, and the name or cell reference of the cell. The status codes are:

    Status Codes Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -1

    The cell ID is invalid.
    -2

    The command could not be executed.
    -6

    User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • The number of users currently logged onto the vision system.

  • The names of the users that are currently logged on to the vision system.

  • A hexadecimal representation of each user's FTP Read/Write permissions, Access level and Java applet connections. The FTP Read/Write permissions, Access levels and Java applet connections are:

    Hexadecimal Values Description

    0x01

    Read
    0x02

    Write
    0x08

    Users with a Protected access level are restricted from switching the vision system between its Online and Offline modes of operation.
    0x10

    Full
    0x20

    Protected
    0x40

    Locked
    0x80

    Java applet connection
  • The Host Name and IP address (as a hexadecimal number) of each user's vision system.

Get Connections Example

To retrieve the vision system's connection settings, issue the following command: Get Connections

The In-Sight vision system initially responds with the status code (1), followed by the number of users currently logged in to the In-Sight vision system (2). Next, the connection information is presented for each user. The first user, admin, has a hexadecimal access representation of 0x13; this representation is obtained by summing the FTP Read/Write permissions and Access level that applies to the user (see preceding table). In this case, admin has Full access (0x10) + FTP Read permission (0x01) + FTP Write permission (0x02) = 0x13. The user admin is currently connected from the IP address of 10.25.80.73; represented in hexadecimal, this address becomes 0A195049.

Connection information for the second user (monitor) is presented similarly on the following line.

Get Expr

Returns the parameters or value stored in the cell specified by the column and row address, as well as the state of that cell.

Note: If the specified cell is empty, the two output lines after the status code will be blank.

Get Expr Inputs

Syntax: Get Expr [Column][Row]

Parameter | Description
Column | The column letter of the cell value to set (A to Z).
Row | The row number of the cell value to set. The row number must consist of three digits (000 to 399).

Get Expr Outputs

  • A status code. The status codes are:

    Status Code Description
    1

    The command was executed successfully.
    0

    Unrecognized command.
    -1

    The cell ID is invalid or has exceeded 15 bytes in length.
    -2

    The command could not be executed.
  • The parameters or values that are stored in the specified cell.

  • The state of the specified cell. For more information, see Cell State Dialog.

    State of the Specified Cell Description
    0

    The cell is disabled.
    1

    The cell is enabled.

Get Expr Example

To retrieve the parameters returned by AcquireImage that is stored in cell A0, issue the following command: Get Expr A000

After issuing the command Get Expr A000, the In-Sight vision system responds with a status code (1), followed by the expression contained within cell A0. Finally, the cell state (1) is displayed.

Get Filelist

Returns the number of files stored in memory, and the name of each file in memory on the In-Sight vision system.

Note:
  • If a RAM Disk folder is enabled on the vision system, the "RAMDisk" folder name is included in the Get Filelist output.
  • It is not possible to get the file list from a RAM Disk folder using the Get Filelist Native Mode command. In order to obtain the file list of a RAM Disk folder, use the Closed FTP protocol instead. Note that the CD (change directory) FTP command is not supported.

Get Filelist Inputs

Syntax: Get Filelist

Get Filelist Outputs

A status code, followed by the number of files stored in memory, followed by the name of each file in memory. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid or has exceeded 15 bytes in length.
-2 | The command could not be executed.

Get Filelist Example

To retrieve a count and list of files that are stored on the In-Sight vision system, issue the following command: Get Filelist

After issuing the command Get Filelist, the In-Sight vision system responds with a status code (1), followed by the number of files present in memory (13). Finally, the individual name of each file is displayed.


Put

Syntax: Put [command] [input parameters]

About Put

The following commands are used in conjunction with the Put extended Native Mode command to send information to an In-Sight vision system and its spreadsheet: Put Live [Int], Put Portnum [Int], Put Timeout [Int], Put Update, Put Watch [Column][Row][Int], and Put XML [Int].

Note: A space is needed between Put and the command, as well as between the command and the input parameters (if any.)

Put Live

Turns live acquisition mode on or off.

Note: The vision system must be Offline.

Put Live Inputs

Syntax: Put Live [Int]

Parameter Description
Int
  • 0 = Disable live acquisition mode.
  • 1 = Enable live acquisition mode.

Put Live Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid or has exceeded 15 bytes in length.
-2 | The command could not be executed, or the vision system is Online.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Put Live Examples

To place the vision system into live acquisition mode, issue the following command: Put Live 1

The In-Sight vision system responded with a status code of 1, indicating that the vision system was successfully placed into live acquisition mode.

To take the vision system out of live acquisition mode, issue the command: Put Live 0

The In-Sight vision system responded with a status code of 1, indicating that the vision system was successfully taken out of live acquisition mode.

Put Portnum

Specifies the port that will be used by the In-Sight vision system for transferring data or images over the network.

Note:
  • The Portnum command must be executed before another device can connect to the specified port.
  • If the port number is changed, the In-Sight OPC Server will be disabled.
  • The In-Sight 2000 series vision sensor does not support this extended native mode command, and returns -2 when issued.

Put Portnum Inputs

Syntax: Put Portnum [Int]

Parameter | Description
Int | Specifies the port number. (1 to 65535) Note: A valid port assignment is any unused number from 1 to 65535, except for ports used for In-Sight communications.

Put Portnum Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid, or has exceeded 15 bytes in length.
-2 | The command could not be executed, or the vision system is Online.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Put Portnum Example

To specify 3001 as the port to be used for transferring data or images across the network, issue the following command: Put Portnum 3001

The In-Sight vision system responded with a status code of 1, indicating that the port number was successfully changed to 3001.

Put Timeout

Specifies the amount of time (ms) that a port connection from a client may be left open without any activity. If the In-Sight vision system does not receive any messages from the client for the specified amount of time, it will close the port.

Note: The timeout is reset to the default (0 ms) if the In-Sight vision system is rebooted.

Put Timeout Inputs

Syntax: Put Timeout [Int]

Parameter Description
Int
  • 0 (default) or -1 = Does not timeout.
  • 1 to 9999999

Put Timeout Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid, or has exceeded 15 bytes in length.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Put Timeout Example

To specify a timeout of 30000 ms, issue the following command: Put Timeout 30000

The In-Sight vision system responded with a status code of 1, indicating that the timeout was successfully changed to 30000.

Put Update

Updates the GUI (spreadsheet, cell graphics and image display).

Put Update Inputs

Syntax: Put Update [Int]

Parameter | Description
Int | 1 = Updates the GUI (spreadsheet, cell graphics and image display).

Put Update Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid, or has exceeded 15 bytes in length.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Put Update Example

To update the GUI, issue the following command: Put Update 1

The In-Sight vision system responded with a status code of 1, indicating that the command successfully executed.

Put Watch

Returns the value contained in the specified cell each time the cell is updated. The Put Watch command can be used to specify output cells and send data using the DataChannel.

Note:
  • The Put Portunum command must be executed to specify a port to which the Put Watch command will send information.
  • The In-Sight 2000 series vision sensor does not support this extended native mode command, and returns -2 when issued.

Put Watch Inputs

Syntax: Put Watch [Column][Row][Int]

Parameter Description
Column

The column letter of the cell value to set (A to Z).
Row

The row number of the cell value to set. The row number must consist of three digits (000 to 399).

Int
  • 0 = disable output of the cell value
  • 1 = enable output of the cell value only when it changes
  • 2 = enable output of the cell value on every acquisition

Put Watch Outputs

Returns a status code, followed by a line terminator, followed by the value contained in the specified cell. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid, or has exceeded 15 bytes in length.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Put Watch Example

To receive information from cell A0, only when that cell is updated, issue the following command: Put Watch A000

The In-Sight vision system responded with a status code of 1, indicating that the command successfully executed.

Put XML

Specifies whether Native Mode command output results are formatted in XML.

Put XML Inputs

Syntax: Put XML [Int]

Parameter Description
Int
  • 0 = disable XML formatting (default)
  • 1 = enable legacy XML formatting
  • 2 = enable strict XML formatting

Put XML Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The input is invalid, or has exceeded 15 bytes in length.

Put XML Example

In the following examples, the standard output is compared with legacy XML-enabled output and strict XML-enabled output.

Put XML 0

To disable XML formatting for the output results, issue the following command: Put XML 0. The In-Sight vision system responds with 1, indicating the XML has been successfully disabled. Next, issue the Get Filelist command.

Put XML 1

To enable legacy XML formatting for the output results, issue the following command: Put XML 1. The In-Sight vision system responds with 1, using the appropriate XML formatting, indicating that legacy XML has been successfully enabled. Next, issue the Get Filelist command; the response is in legacy XML format.

Put XML 2

To enable strict XML formatting for the output results, issue the following command: Put XML 2. The In-Sight vision system responds with 1, using the appropriate XML formatting. Next, issue the Get Filelist command; the response is in strict XML format (for example, the FileName ID value is enclosed in quotes).


Evaluate

Executes In-Sight functions, as well as inserting formulas into the spreadsheet. Evaluate executes commands for retrieving information from, and making changes to, vision systems.

Note:
  • In-Sight functions that return a data structure cannot be executed using the Evaluate command. However, these functions can be inserted into the In-Sight spreadsheet. For more information, see Structures Functions.
  • Changes made to the In-Sight system settings using the Evaluate command are temporary. Rebooting the vision system will discard any changes. To save settings to the proc.set file, use the Store Settings command. For more information, see Store Settings.

Evaluate Inputs

Syntax: EV [command]

Parameter | Description
Command | Any supported In-Sight function, or a legal string of functions, as well as general commands.
Note: Any inputs that are enclosed in quotation marks must be enclosed by quotes when sent to the vision system.

Evaluate Outputs

Note: The results of the expression are dependent on the command that is executed.

  • A status code, followed by the number of characters (in bytes) for the results, then the results in XML format.

    Status Codes | Description
    1 | The command was executed successfully.
    0 | Unrecognized command.
    -1 | The cell ID is invalid.
    -2 | The command could not be executed.
    -4 | The vision system is out of memory.
    -6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.
  • The number of characters (in bytes) contained within the output that follows.

  • The results of the expression in XML format (only shown if the status code is 1).

    Note: The results of the expression are dependent on the command that is executed.

Example: Remotely Place a Formula into a Spreadsheet Cell

The general syntax to remotely place an In-Sight formula into a spreadsheet cell using the Evaluate command is as follows:

Syntax: EV [Column][Row] [Cell state] [Formula]

Parameter Description

Column

The column letter of the cell value to set (A to Z).

Row

The row number of the cell value to set (0 to 399).

Cell state

The current state for the specified cell (0 = Disabled; 1 = Enabled). For more information, see Cell State Dialog.

Note:
  • Cell state can also reference (absolute or relative) another cell. If the referenced cell is empty, the cell state will be 0.
  • If a Controls Function, containing a text label, is inserted into the spreadsheet with the cell state specified as disabled, the GUI will only show the graphic associated with the control. The text label remains hidden in the spreadsheet until the cell state is modified within the spreadsheet. For more information, see Controls Functions.

Formula

A combination of values, functions, arguments, and operators used to create a formula.

Example: Remotely Insert Basic Functions

  1. Assume the spreadsheet is configured as follows:

    A3 = 3
    A4 = 4
    A5 = 5
    A6 = 6

    Formulas can be inserted into the In-Sight spreadsheet using a remote connection.

  2. While logged on to the vision system through a telnet client, type the following command: EV A8 1 Sum(1,2,A3:A6)

    The In-Sight responds with a status code (1) followed by the number of bytes (0) of XML data returned. This evaluate command inserts the formula Sum(1,2,A3:A6) into Cell A8.

    Note: The actual result returned by the Sum spreadsheet function, 21, is not returned by this Evaluate command as XML data; use the Get Value command to retrieve this result instead.

Example: Remotely Insert Functions with Property Sheets

Functions that contain parameters selected from a property sheet can also be remotely inserted into the spreadsheet. From the telnet client, type the following command: EV A2 1 ExtractBlobs($A$0,0,0,0,40,276,381,450,0,0,8,-1,0,0,2,1,100,100000,0)

As shown in the following image, the vision system responds with a status code (1) and the size (0) of XML data returned:

The ExtractBlobs function has successfully been inserted into cell A2 of the spreadsheet:

Example: Retrieve Information from the Vision System Using the Evaluate Command and In-Sight Functions

Syntax: EV [command]

  1. Assume that an In-Sight spreadsheet contains an IDMax data structure in cell A2 that was obtained from a ReadIDMax function. The decoded string is returned in the adjacent cell, as follows:

    A2 = ReadIDMax($A$0,0,0,0,308.750,445,67.500,73.750,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,0,0,0,2,0,0,0,1,0,0,2)

  2. Using a telnet client, log on to the vision system and type EV GetString(A2) as follows:

    The vision system returns a status code of 1, indicating that the command was executed successfully. The next line reports that 25 bytes of XML data were returned, while the final line consists of the results of the expression, formatted in XML.

Example: Retrieve In-Sight Network Settings Using the Evaluate Command

While logged on to a vision system from a telnet client, type EV GetNetwork() to retrieve the system network settings. The telnet client output is shown in the following image:

The vision system responds with a status code of 1 to indicate that the command was executed successfully. The next line contains the size (554 bytes) of the XML data to follow; the remaining lines consist of the actual XML data that was returned.

Example: Change In-Sight Settings Using the Evaluate Command

This example sets the Idle Timeout, Read Timeout, Connection Retry, Local Port, Remote Port, and Passive Transfers FTP settings on an In-Sight 8402 vision system. While logged on to the vision system from a telnet client, issue the following command: EV SetFTPSettings(120,120,1,21,21,0)

The telnet client output is shown in the following image:

The vision system responds with a status code of 1, indicating that the command successfully executed. Next, 18 represents the number of XML output bytes to follow. Finally, the actual XML data is shown.

GetCellName

GetCellValue

GetDeEnergizeOutputs

GetDiagnosticLog

GetDiscreteInput

GetDiscreteOutput

GetDiscreteOutputDelay

GetEasyBuilderTag

GetExternalLightMode

GetFTPSettings

GetHostTable

GetMSBuffer

GetNetwork

GetSerialPort

GetStartup

GetSystemConfig

GetUserList

SetCellName

SetCellValue

SetDeEnergizeOutputs

SetDiscreteInput

SetDiscreteOutput

SetDiscreteOutputDelay

SetEditRegion

SetExternalLightMode

SetFavorHostTable

SetFTPSettings

SetHostTable

SetNetwork

SetSerialPort

SetStartup

SetSystemConfig


GetCellName

Returns the cell location of a specified symbolic tag name, or the symbolic tag name of a specified cell.

GetCellName Inputs

Syntax: EV GetCellName("Name")

Parameter | Description
"Name" | The name of the symbolic tag (such as Distance_1.Distance, for example) or the cell location (A4, for example). The name must be enclosed in quotation marks.

GetCellName Outputs

Returns a status code, followed by the number of characters, and the name or cell reference of the cell. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Symbolic Tag Name

To get the symbolic tag name of cell B116, issue the following command: EV GetCellName("B116")

Issuing this command produces the following result:

The In-Sight sensor returns 1 to indicate that the command was executed successfully; the number of characters (in bytes) is followed by the Symbolic Tag name.

Note: The Distance Measurement Tool is an EasyBuilder tool.

Example: Symbolic Tag Name Cell Location

To get the cell location of a symbolically tagged Distance Measurement Tool result, issue the following command: EV GetCellName("Distance_1.Distance")

Issuing this command produces the following result:

The In-Sight sensor returns 1 to indicate that the command was executed successfully. The number of characters (in bytes) is followed by the cell location.

Note: The Distance Measurement Tool is an EasyBuilder tool.


GetCellValue

Returns the contents of a specified symbolic tag, such as an EasyBuilder fixture output, EasyBuilder Location or Inspection Tool result or Spreadsheet cell, in XML format.

Note: If a job is being built and configured in a language other than English and the Use English Symbolic Tags for EasyBuilder option is enabled (checked) in the Options Dialog, User Interface panel, any symbolic tags references that were created prior to enabling the option must be updated to the English name version.

GetCellValue

Syntax: EV GetCellValue("Symbolic Tag")

Parameter | Description
"Symbolic Tag" | The name of the symbolic tag, such as a Location or Inspection Tool result ("Distance_1.Distance", for example) or the cell reference (A4, for example). For the automatically generated EasyBuilder fixture output data, the name must be either "Job.Robot.FormatString" or "Job.FormatString", depending upon the selected Device and Protocol selected in the Communications Application Step. The name must be enclosed in quotation marks.

GetCellValue Outputs

Returns a status code, followed by the number of characters, and the contents of the cell (an integer, floating point value, or text string). The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

EasyBuilder Examples

To retrieve fixture data for vision guided robotics applications, or the result of a Location or Inspection Tool:

Fixture Example for Vision Guided Robotics Applications

There are two possible commands to issue, depending upon the selected Device and Protocol in the Communication step: EV GetCellValue("Job.Robot.FormatString") and EV GetCellValue("Job.FormatString").

EV GetCellValue("Job.Robot.FormatString") should be used in the following situations:

  • The Device selection is Robot.
  • The Device selection is Other, and the Protocol selected is either Serial Kuka or Serial Motoman.

EV GetCellValue("Job.FormatString") should be used in the following situations:

  • The Device selection is Other, and the Protocol selected is Ethernet Native, Serial Native, Serial Text or TCP/IP.

EV GetCellValue("Job.Robot.FormatString")

Issuing this command produces the following result:

The In-Sight sensor returns 1 to indicate that the command was executed successfully. The number of characters (in bytes) is followed by the value in the cell (integer, floating point, or text string).

EV GetCellValue("Job.FormatString")

Issuing this command produces the following result:

The In-Sight sensor returns 1 to indicate that the command was executed successfully. The number of characters (in bytes) is followed by the value in the cell (integer, floating point, or text string).

Location or Inspection Tool Result Example

The following example illustrates issuing a command to retrieve the result of a Distance Measurement Tool:

EV GetCellValue("Distance_1.Distance")

Issuing this command produces the following result:

The In-Sight sensor returns 1 to indicate that the command was executed successfully. The number of characters (in bytes) is followed by the value in the cell (integer, floating point, or text string).

Spreadsheet Example

To retrieve the value in a specific Spreadsheet cell, issue the following command:

EV GetCellValue("A52")

Issuing this command produces the following result:

The In-Sight sensor returns 1 to indicate that the command was executed successfully. The number of characters (in bytes) is followed by the value in the cell (integer, floating point, or text string).


GetDeEnergizeOutputs

Returns the De-Energize Outputs While Offline setting configured in the Discrete I/O Settings dialog. For more information, see Configure Discrete I/O Lines.

GetDeEnergizeOutputs Inputs

Syntax: EV GetDeEnergizeOutputs()

GetDeEnergizeOutputs Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetDeEnergizeOutputs Example

To retrieve the De-Energize Outputs While Offline setting, issue the following command: EV GetDeEnergizeOutputs()

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the De-Energize Outputs While Offline setting is returned.


GetDiagnosticLog

Returns a log of information used to diagnose errors on the In-Sight vision system.

GetDiagnosticLog Inputs

Syntax: EV GetDiagnosticLog()

GetDiagnosticLog Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetDiagnosticLog Example

To retrieve the diagnostic log of the connection status between the vision system and the CIO-MICRO, CIO-MICRO-CC, or CIO-WENET Ethernet I/O module, issue the following command: EV GetDiagnosticLog()

The In-Sight sensor responds with a status code (1), followed by the number of characters (892), in bytes. Finally, the diagnostic log is returned.


GetDiscreteInput

Returns information that is configured in the Discrete I/O Settings dialog. For more information, see Configure Discrete I/O Lines.

GetDiscreteInput Inputs

Syntax: EV GetDiscreteInput()

GetDiscreteInput Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetDiscreteInput Example

To retrieve the information configured in the Discrete I/O Settings dialog, issue the following command: EV GetDiscreteInput()

Note: Count, in the first XML tag, represents the number of discrete inputs. Each discrete input is assigned a Line ID (zero-based.)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (43). Finally, the information configured in the Discrete Input Settings dialog is returned.


GetDiscreteOutput

Returns information that is configured in the Discrete I/O Settings dialog. For more information, see Configure Discrete I/O Lines.

GetDiscreteOutput Inputs

Syntax: EV GetDiscreteOutput()

GetDiscreteOutput Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetDiscreteOutput Example

To retrieve the information configured in the Discrete I/O Settings dialog, issue the following command: EV GetDiscreteOutput()

Note: Count, in the first XML tag, represents the number of discrete outputs. Each discrete output is assigned a Line ID (zero-based.)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (637). Finally, the information configured in the Discrete I/O Settings dialog is returned.


GetDiscreteOutputDelay

Returns delay settings that are configured in the Output Details dialog. For more information, see Configure Discrete Output Details.

GetDiscreteOutputDelay Inputs

Syntax: EV GetDiscreteOutputDelay(LineID,[Model])

Parameter | Description
LineID | The output line number.

IOModule

IOModule is an optional parameter that can be used to return the Discrete Output Delay for a specific I/O Module type.

  • 0 = Direct I/O / CIO-1350
  • 1 = CIO-1450 and CIO-1460
  • 2 = CIO-1400
  • 3 = CIO-MICRO and CIO-MICRO-CC

GetDiscreteOutputDelay Outputs

Output Description
Type
  • 0 = None
  • 1 = Acquisition Delay
  • 2 = Time After Trigger
Delay
  • If Type = 0, Delay is ignored and forced to 0.
  • If Type = 1, Delay returns the number of acquisition or tracking pulses (0 to 1000) that the output is delayed after a signal pulse is received by an output Line. If this value is 0, then the In-Sight vision system updates the output line immediately on evaluating the WriteDiscrete function. If this value is > 0, then the output Line is always pulsed.
  • If Type = 2, Delay returns the amount of time (0 to 10000 ms) before the output is fired.

GetDiscreteOutputDelay Example

To retrieve the delay settings for Line 3 for a CIO-MICRO I/O Module, issue the following command: EV GetDiscreteOutputDelay(3,3)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (85). Finally, the Type (Time After Trigger) and the Delay (250 ms) are returned.


GetEasyBuilderTag

Returns the EasyBuilder Tag for the specified symbolic tag name or cell location. For more information, see EasyBuilder Tags and Tag Labels.

GetEasyBuilderTag Inputs

Syntax: EV GetEasyBuilderTag("Name")

Parameter | Description
"Name" | The name of the symbolic tag or the cell location. When the input is a symbolic tag, it must be enclosed in quotation marks. When the input is a cell location, quotation marks are optional.

GetEasyBuilderTag Outputs

Returns a status code, followed by the EasyBulder Tag name. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.

Symbolic Tag Name Example

To return the EasyBuilder Tag associated with the Acquistion.Frames_Per_Second symbolic tag, issue the following command: EV GetEasyBuilderTag("Acquisition.Frames_Per_Second")

The In-Sight sensor returns 1 to indicate that the command was executed successfully and the number of characters in bytes (34). Finally, the results are returned in XML format.

Cell Location Example

To return the EasyBuilder Tag for cell F7, issue the following command: EV GetEasyBuilderTag(F7)

The In-Sight sensor returns 1 to indicate that the command was executed successfully and the number of characters in bytes (34). Finally, the results are returned in XML format.


GetExternalLightMode

Returns the type of external strobe device connected to the In-Sight 7000 Gen2 series or 9912 vision system's LIGHT connector. For more information, see Light Settings.

GetExternalLightMode Inputs

Syntax: EV GetExternalLightMode()

GetExternalLightMode Outputs

Returns a status code, followed by the number of characters, in bytes, and the type of external strobe device connected to the vision system.

  • The status codes are:

    Status Codes | Description
    1 | The command was executed successfully.
    0 | Unrecognized command.
    -2 | The command could not be executed.
    -6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

  • Type of external strobe device:

    OutputMode | Description
    0 | Disabled
    1 | PNP (Sourcing)
    2 | NPN (Sinking)

GetExternalLightMode Example

To return the type of external strobe device connected to the vision system, issue the following command: EV GetExternalLightMode()

The In-Sight sensor responds with a status code (1), followed by the number of characters (18), in bytes. Finally, the OutputMode is returned (2), indicating that the vision system is connected to an NPN (Sinking) external strobe device.


GetFTPSettings

Returns information that is configured in the FTP Settings dialog. For more information, see FTP Settings Dialog.

GetFTPSettings Inputs

Syntax: EV GetFTPSettings()

GetFTPSettings Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetFTPSettings Example

To retrieve the information configured in the FTP Settings dialog, issue the following command: EV GetFTPSettings()

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (223). Finally, the information configured in the FTP Settings dialog is returned.


GetHostTable

Returns information contained in the In-Sight Host Table dialog. For more information, see Host Table Dialog.

GetHostTable Inputs

Syntax: EV GetHostTable()

GetHostTable Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetHostTable Example

To retrieve the information contained in the In-Sight Host Table dialog, issue the following command: EV GetHostTable()

Note: Count, in the first XML tag, represents the number of hosts in the Host Table.

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (464). Finally, the information configured in the In-Sight Host Table dialog is returned.


GetMSBuffer

Returns the Machine Status data stored in one of 8 indexed buffers (zero-based) within the Machine Status stack. If Index is 0, the current Machine Status is returned.

Note: The In-Sight 2000 series vision sensor does not support this extended native mode command, and returns -2 when issued.

GetMSBuffer Inputs

Syntax: EV GetMSBuffer(Index)

Parameter | Description
Index | Identifies which buffer to return (0 to 7).

GetMSBuffer Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetMSBuffer Example

To retrieve the Machine Status data stored in buffer 0 within the Machine Status stack, issue the following command: EV GetMSBuffer(0)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (713). Finally, the Machine Status data is returned.

Note:
  • The date and time specified for <BootTime> will only be current after the power has been cycled on an In-Sight device if the Use SNTP Services checkbox is selected and a Simple Network Time Protocol (SNTP) server is located.
  • The GetMSBuffer command can be used without the EV prefix by accessing the Machine Status Port. For more information, see Machine Status Port.


GetNetwork

Returns information that is configured in the Network Settings dialog.

GetNetwork Inputs

Syntax: EV GetNetwork()

GetNetwork Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetNetwork Example

To retrieve the information configured in the Network Settings dialog, issue the following command: EV GetNetwork

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (552). Finally, the information configured in the Network Settings dialog is returned. In this example, the sensor is configured dynamically by the DHCP server on startup. If the UseDHCP input is set to 0, the settings for static IP assignment are used.


GetSerialPort

Returns information that is configured in the Serial Port Settings dialog. A valid serial Port (1) must be specified.

GetSerialPort Inputs

Syntax: EV GetSerialPort(Port)

Input | Description
Port | Specifies which serial port's data will be returned.

GetSerialPort Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetSerialPort Example

To retrieve the information configured in the Serial Port Settings dialog, issue the following command: EV GetSerialPort(1)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (477). Finally, the information configured in the Serial Port Settings dialog is returned.

Note: If Mode is set to 1 (Unused), GetSerialPort returns -1 for the Mode output.


GetStartup

Returns information that is configured in the Startup dialog. For more information, see Startup Dialog.

GetStartup Inputs

Syntax: EV GetStartup()

GetStartup Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetStartup Examples

To retrieve the information configured in the Startup dialog, issue the following command: EV GetStartup()

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (80). Finally, the information configured in the Startup dialog is returned.


GetSystemConfig

These parameters are used in conjunction with the GetSystemConfig Evaluate Native Mode command to return system information.

  • Active Cells Limit
  • DHCP Timeout
  • Telnet Port
  • Network Supported Link Modes
  • Network Requested Link Mode
  • Services Enabled
  • Internal Temperature
  • Trigger Timestamp Mode
  • Trigger Timestamp (Single and Multiple Triggers)
  • Trigger Timestamp: Number of Inputs (Multiple Triggers)
  • Trigger Timestamp: Maximum Queue Length (Multiple Triggers)
  • Trigger Timestamp: Override Window (Multiple Triggers)
  • Trigger Timestamp Error: Faults
  • Trigger Timestamp Error: Queue Faults
  • Trigger Timestamp Error: Ignored Updates
  • Trigger Timestamp Error: Timestamps Overridden

Active Cells Limit

Returns the number of available spreadsheet cells settings configured in the Active Cells Limit dialog.

Inputs

Syntax: EV GetSystemConfig("ActiveCellLimit")

Parameter | Description
"ActiveCellLimit" | The active cell limit, in units of cells. (2048 to 10400)

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To retrieve the active cell limit of the In-Sight vision system or vision system, issue the following command: EV GetSystemConfig("ActiveCellsLimit")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (34). Finally, the current limit (6144), followed by the minimum (2048) and maximum (10400) range active cell limit ranges are returned.

DHCP Timeout

Returns DHCP Timeout information that is configured in the Network Settings dialog.

Inputs

Syntax: EV GetSystemConfig("DHCPTimeout")

Parameter | Description
"DHCPTimeout" | The time (5 to 180 seconds; default = 60) an In-Sight vision system will wait for a DHCP server to respond with an available IP address, when the vision system is configured for DHCP. If the vision system times out, network communication will be suspended. The vision system will not attempt to connect to the network again until power is cycled on the vision system.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To retrieve the DHCP Timeout information configured in the Network Settings dialog, issue the following command: EV GetSystemConfig("DHCPTimeout")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (21). Finally, the DHCP Timeout information (30) is returned.

Telnet Port

Returns Telnet Port information that is configured in the Network Settings dialog.

Inputs

Syntax: EV GetSystemConfig("TelnetPort")

Parameter | Description
"TelnetPort" | The telnet port on which the active In-Sight vision system (a TCP/IP server waiting for communication) listens for incoming requests from a remote device (a TCP/IP client that initiates communication). A valid port assignment is any unused number between 1 and 65535, excluding 21, 68, 80, 502, 1069, 1070, 1212, 2222, 44818 and 50000 (reserved for In-Sight communications).

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To retrieve the Telnet Port information configured in the Network Settings dialog, issue the following command: EV GetSystemConfig("TelnetPort")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (21). Finally, the Telnet Port information (23) is returned.

Network Supported Link Modes

Returns the Ethernet link speeds and duplex modes (half or full) supported by the vision system, as configured in the Network Settings dialog.

Inputs

Syntax: EV GetSystemConfig("Network.SupportedLinkModes")

Parameter | Description
"Network.SupportedLinkModes" | The Ethernet link speeds and duplex modes supported by the vision system.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Result | Description
0 | Auto-Negotiate
100 | 10 Mbps Half Duplex
101 | 10 Mbps Full Duplex
102 | 100 Mbps Half Duplex
103 | 100 Mbps Full Duplex
104 | 1000 Mbps Full Duplex
Note: The 1000 Mbps Full Duplex option is only available for vision systems that support 1000 Mbps Ethernet speeds. For In-Sight 5600 series vision systems, it is only available on models with 128MB non-volatile flash memory or higher.

Example

To retrieve the supported link speeds and duplex modes for the vision system, issue the following command: EV GetSystemConfig("Network.SupportedLinkModes")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (40). Finally, the supported Ethernet link speeds and duplex modes are returned.

Network Requested Link Mode

Returns the vision system's current Ethernet link speed and duplex mode (full or half), as configured in the Network Settings dialog.

Inputs

Syntax: EV GetSystemConfig("Network.RequestedLinkMode")

Parameter | Description
"Network.RequestedLinkMode" | The vision system's current Ethernet link speed and duplex mode.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Result | Description
0 | Auto-Negotiate* (default)
100 | 10 Mbps Half Duplex
101 | 10 Mbps Full Duplex
102 | 100 Mbps Half Duplex
103 | 100 Mbps Full Duplex
104 | 1000 Mbps Full Duplex
Note: The 1000 Mbps Full Duplex option is only available for vision systems that support 1000 Mbps Ethernet speeds. For In-Sight 5600 series vision systems, it is only available on models with 128MB non-volatile flash memory or higher.

Example

To retrieve the current link speed for the vision system, issue the following command: EV GetSystemConfig("Network.RequestedLinkMode")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the current link speed is returned.

Services Enabled

Returns Protocol Services information that is configured in the Network Settings dialog.

Note: The EtherNet/IP and ProfiNET services are mutually exclusive, therefore both services cannot be enabled at the same time.

Inputs

Syntax: EV GetSystemConfig("ServicesEnabled")

Parameter | Description
"ServicesEnabled" | Services currently enabled on the vision system.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

The results are: The value returned is a decimal value, converted from its binary equivalent.

Service | Binary | Decimal Equivalent
CC-Link IE Field Basic | 10000000 | 128
iQSS | 01000000 | 64
POWERLINK Note: Only supported on the In-Sight 70xx - 74xx series vision system running firmware version 4.x.x. | 00100000 | 32
SLMP Scanner | 00010000 | 16
Precision Time Protocol (IEEE 1588 PTP) | 00001000 | 8
ProfiNET | 00000100 | 4
EtherNet/IP | 00000010 | 2
Modbus Server | 00000001 | 1
None | 00000000 | 0

If more than one service is enabled, you can convert the returned decimal value to its binary equivalent to determine which services are enabled. Closed Example

Issue the following command: EV GetSystemConfig("ServicesEnabled")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the enabled service(s) (5) is returned. To determine the enabled services, convert the decimal value to its binary equivalent: 5 = 101. Based on the binary value, we know that Modbus and ProfiNET services are enabled on the vision system.

Service | ProfiNET | EtherNet/IP | Modbus
Binary | 1 | 0 | 1

Example

To retrieve the Protocol Services information configured in the Network Settings dialog, issue the following command: EV GetSystemConfig("ServicesEnabled")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the enabled service(s) (2) is returned, indicating the EtherNet/IP service is enabled.

Internal Temperature

Returns the internal temperature of the In-Sight 7000 Gen2 series, In-Sight 8000 series and In-Sight 9000 series vision system, in degrees Celsius.

Inputs

Syntax: EV GetSystemConfig("Internal.Temperature")

Parameter | Description
"Internal.Temperature" | The vision system's internal temperature, in degrees Celsius.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Returns the vision system's internal temperature, in degrees Celsius.

Example

To retrieve the vision system's current internal temperature, issue the following command: EV GetSystemConfig("Internal.Temperature")

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (23). Finally, the current temperature is returned, in degrees Celsius.

Trigger Timestamp Mode

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Returns the trigger mode, either single triggering for vision systems running on In-Sight firmware version 4.x.x, or single and multiple triggering for visions systems running firmware version 5.6.1.

Inputs

Syntax: EV GetSystemConfig("TriggerTimestampLegacyMode")

Parameter | Description
"TriggerTimestampLegacyMode" | The timestamp triggering mode.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Result | Description
0 | Single and multiple timestamp triggering in In-Sight version 5.6.1.
1 | Single timestamp triggering from firmware versions 4.x.x

Trigger Timestamp (Single and Multiple Triggers)

Note: Multiple triggers is supported only with In-Sight firmware 5.6.1 and later.

Returns the offset into the EtherNet/IP input assembly that is used to trigger the vision system for single or multiple triggers.

Inputs

Syntax: EV GetSystemConfig("TriggerTimestampInputOffset")

Parameter | Description
"TriggerTimestampInputOffset" | The offset into the EtherNet/IP output assembly for a single timestamp trigger.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Trigger Timestamp: Number of Inputs (Multiple Triggers)

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Returns the number of timestamps that the vision system can process simultaneously from one PLC user data packet. The PLC can send a maximum of four timestamps.

Inputs

Syntax: EV GetSystemConfig("TriggerTimestampNumInputs")

Parameter | Description
"TriggerTimestampNumInputs" | The number of timestamps that the vision system can process simultaneously from one PLC user data packet.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

The number of timestamps.

Trigger Timestamp: Maximum Queue Length (Multiple Triggers)

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Returns the maximum number of pending time triggers that the vision system can store simultaneously.

Inputs

Syntax: EV GetSystemConfig("TriggerTimestampMaxQueueLength")

Parameter | Description
"TriggerTimestampMaxQueueLength" | Sets the maximum number of timestamps that the vision system can store simultaneously.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

The maximum number of timestamps that the vision system can store simultaneously.

Trigger Timestamp: Override Window (Multiple Triggers)

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Returns the number of microseconds that a queued PLC timestamp has to fall within before it can override an existing timestamp on the vision system.

Inputs

Syntax: EV GetSystemConfig("TriggerTimestampOverrideWindowUs")

Parameter | Description
"TriggerTimestampOverrideWindowUs" | The number of microseconds that a queued PLC timestamp has to fall within before it can override an existing timestamp on the vision system.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

The number of microseconds that a queued PLC timestamp has to fall within before it can override an existing timestamp.

Trigger Timestamp Error: Faults

If the timestamp occurs either in the past or more than ten minutes in the future when the vision system receives it, the TimeTriggerFault is triggered and the EIP.Trigger.TimestampFaults count increments.

Inputs

Syntax: EV GetSystemConfig("Eip.TriggerTimestampFaults")

Parameter | Description
"TriggerTimestampFaults" | Timstamp occurs either in the past or more than ten minutes in the future when the vision system receives it.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Returns the number of times a timestamps that have faulted.

Trigger Timestamp Error: Queue Faults

The vision system receives more pending timestamps that are configured in the SetSystemConfig "Eip.TriggerTimestampMaxQueueLength" command. The "Eip.TriggerTimestampQueueFaults" increments.

Inputs

Syntax: EV GetSystemConfig("Eip.TriggerTimestampQueueFaults")

Parameter | Description
"TriggerTimestampQueueFaults" | The vision system receives more pending timestamps that are configured.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Returns the number of timestamps received when the timestamp queue was full.

Trigger Timestamp Error: Ignored Updates

If you try to update a timestamp within 10 milliseconds of another timestamp trigger, the vision system ignores that timestamp and the "Eip.TriggerTimestampIgnoredUpdates" increments.

Inputs

Syntax: EV GetSystemConfig("Eip.TriggerTimestampIgnoredUpdates"

Parameter | Description
"TriggerTimestampIgnoredUpdates" | The vision system ignores the timestamp.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Returns the number of ignored timestamps.

Trigger Timestamp Error: Timestamps Overridden

A timestamp sent from the PLC overrides a timestamp in the In-Sight queue. The "Eip.TriggerTimestampOverriden" increments.

Inputs

Syntax: EV GetSystemConfig("Eip.TriggerTimestampOverridden")

Parameter | Description
"TriggerTimestampOverridden" | The number of overridden timstamps.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Results

Returns the number of timestamps overridden in the In-Sight queue.


GetUserList

Returns information configured in the User List dialog. For more information, see User Access Settings Dialog.

GetUserList Inputs

Syntax: EV GetUserList()

GetUserList Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

GetUserList Results

Parameters | Description
Name | Returns the user name.

Access

Returns the access level of the user.

  • 0 = Full
  • 1 = Protected
  • 2 = Locked
View

Returns whether or not the Custom View is displayed when the user logs on.

  • 0 = Custom
  • 1 = Normal (the Spreadsheet View or EasyBuilder View is displayed).

Read

Returns whether or not the user has FTP Read privilege.

  • 0 = No
  • 1 = Yes

Write

Returns whether or not the user has FTP Write privilege.

  • 0 = No
  • 1 = Yes
SaveJobOnline

Returns whether or not the user is allowed to save jobs while Online.

  • 0 = Disabled
  • 1 = Enabled

GetUserList Example

To retrieve information configured in the User List dialog, issue the following command: EV GetUserList()

Note: Count, in the first XML tag, represents the number of users in the User List.

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (568). Finally, the information configured in the User List dialog is returned.


SetCellName

Sets the symbolic tag name of a specified cell, and optionally enables the symbolic tag to be transmitted over the OPC channel to the In-Sight OPC Server or to generate audit messages to an audit message server. Symbolic tag names can only be applied to cells that have content.

SetCellName Inputs

Syntax: EV SetCellName(Cell,"Name",[Mode])

Parameter | Description
Cell | The cell reference (A4 for example).
"Name" | The text string that you want to use as a symbolic tag name. The name must be enclosed in quotation marks.
Mode

Mode is an optional input.

  • 0 = Disable Output.
  • 2 = The symbolic tag is transmitted via the OPC channel.
  • 8 = The symbolic tag is used to generate audit messages to an audit message server.
  • 10= The symbolic tag is transmitted over the OPC channel and used to generate audit messages to an audit message server.
Note: To generate audit messages, the Enable Audit Messages checkbox must be checked.

SetCellName Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetCellName Example

To assign the symbolic tag name "Width" to the cell in B60, issue the following command: EV SetCellName(B60,"Width")

The In-Sight sensor returns 1 to indicate that the command was executed successfully and the number of characters in bytes (18). Finally, the results are returned in XML format.


SetCellValue

Sets the value of specific cell appended with an EasyBuilder Tag.

Note: The In-Sight 2000 series vision sensor does not support this extended native mode command and returns -2.

SetCellValue Inputs

Syntax: EV SetCellValue("Name",Value,[Mode])

Parameter | Description
"Name" | The EasyBuilder Tag name that is being used for that cell. The name must be enclosed in quotation marks.
Value | The value to be used in the cell: an integer, floating point value or text string. The function will return #ERR if the cell specified in "Name" input is not an EditInt, EditFloat or EditString function, or the value types do not correspond.
Mode

Mode is an optional input.

  • 0 = Disable Output. The named value is not enabled for OPC data access and exchange.
  • 1 = Output Enabled when the value of the cell changes.
  • 2 = Enable Output. The named value is enabled for OPC data access and exchange.

SetCellValue Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetCellValue Example

To set the Minimum Distance value of a Distance Measurement Tool, appended with the EasyBuilder Tag name "Distance_1.Minimum" and located in cell A116, issue the following command: EV SetCellValue("Distance_1.Minimum",62)

The In-Sight sensor returns 1 to indicate that the command was executed successfully. The number of characters (in bytes) and <Float>1</Float> follows as a second confirmation of successful command execution.


SetDeEnergizeOutputs

Configures the De-Energize Outputs While Offline setting found in the Discrete I/O Settings dialog.

Note: If the De-Energize Outputs While Offline checkbox is checked and the CIO-MICRO or CIO-MICRO-CC I/O module has an output line configured as a LifeLine signal type, the line will remain HIGH when the connected vision system is placed Offline.

SetDeEnergizeOutputs Inputs

Syntax: EV SetDeEnergizeOutputs(DeEnergizeOutputs,WriteProcSet)

Parameter Description
DeEnergizeOutputs
  • 0 = Disabled (default)
  • 1 = Enabled

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled.
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

SetDeEnergizeOutputs Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetDeEnergizeOutputs Example

To configure the sensor to de-energize outputs when placed Offline, issue the following command: EV SetDeEnergizeOutputs(1,1)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the value (1) is returned.


SetDiscreteInput

Configures input settings that are found in the Discrete I/O Settings dialog. For more information, see Discrete I/O Settings

Note:
  • When issuing this command, the In-Sight system must be Offline.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetDiscreteInput Inputs

Syntax: EV SetDiscreteInput(LineID,"Name",Type,Signal)

Note: The Online/Offline, Acquisition Trigger and Job Load Switch input types may not be used on more than one input line simultaneously.
Parameter Description
LineID

In-Sight 2000 series:

  • 0: The vision sensor is connected to the Breakout cable and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 1 to 7: The vision sensor is connected to the I/O Module cable and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.

In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 8000 series:

  • 0: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 7: The vision system is connected to the I/O Module cable and connect to a supported I/O module. For more information, see I/O Module Support.

In-Sight 70xx - 74xx series:

  • 1 to 3: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.

  • 0 to 7, 9, 10, 11: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.

In-Sight 7000 Gen2 series and In-Sight 9912 vision systems:

  • 0 to 3: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 7, 9, 10, 11: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 7: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 1 to 7: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.

In-Sight 9902L:

  • 1: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 7 and 9: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 7: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 1 to 7: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.
"Name"

The name for the input line.

Note: The "Name" input must be enclosed in quotation marks.
Type
  • 0 = User Data (default)
  • 1 = Event Trigger (1= Reset Counters if using the In-Sight 2000 series vision sensor)
  • 2 = Job ID Number (not supported on the In-Sight 2000)
  • 3 = Online/Offline
  • 4 = Acquisition Trigger (not supported on the In-Sight 2000 series vision sensors or the CIO-1400 I/O module.)
  • 5 = Job Load Switch (not supported on the In-Sight 2000)

  • 8 = Serial Receive (Direct I/O only; only valid when LineID = 1)

    Note:
    • Serial Receive is only available when connecting to an In-Sight 70xx - 74xx series vision system with In-Sight Explorer 4.7.1 or later, and using In-Sight 4.7.1 or later firmware.
    • When the SetDiscreteInput command is issued and Input Line 1 is set to Serial Receive, the vision system determines if Output Line 1 is set to Serial Transmit. If not, Input Line 1 is temporarily reset to the default input type for this line. Once the SetDiscreteOutput command is issued, and Output Line 1 is set to Serial Transmit, Input Line 1 is automatically set to Serial Receive.

  • 9 = Job Change (Pulsed)

    Note: Job Change (Pulsed) is only available when connecting to an In-Sight 2000 series vision sensor running In-Sight 5.2.3 or later firmware.
Signal
  • 0 = Rising Edge (default)
  • 1 = Falling Edge
  • 2 = Both Edges

SetDiscreteInput Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetDiscreteInput Example

To configure the following settings:

  • LineID: 4
  • "Name": Line 4
  • Type: Job ID Number
  • Signal: Rising Edge

Issue the following command: EV SetDiscreteInput(4,"LINE4",2,0)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.


SetDiscreteOutput

Configures output settings that are found in the Discrete I/O Settings dialog and the Output Details dialog. For more information, see Discrete I/O Settings and Configure Discrete Output Details.

Note:
  • When issuing this command, the In-Sight vision system must be Offline.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • If an In-Sight vision system is being used in conjunction with a CIO-1400 or CIO-1450 I/O module, do not use either the SetDiscreteOutput or SetDiscreteOutputDelay commands to change a discrete output setting over the serial port. Doing so may cause the vision system to become unresponsive. Use the Discrete I/O Settings and Output Details dialogs to make the change, or send the commands over Telnet.
  • Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetDiscreteOutput Inputs

Syntax: EV SetDiscreteOutput(LineID,"Name",Type,Pulse,PulseLen,Delay)

Parameter Description
LineID

In-Sight 2000 series:

  • 0 to 4: The vision sensor is connected to the Breakout cable and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 7: The vision sensor is connected to the I/O Module cable and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.

In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 8000 series:

  • 0, 1, 4, 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 11: The vision system is connected to the I/O Module cable and connect to a supported I/O module. For more information, see I/O Module Support.

In-Sight 70xx - 74xx series:

  • 0 to 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 13: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.

In-Sight 7000 Gen2 series and In-Sight 9912 vision systems:

  • 0 to 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 13: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 9, 12, 13: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 9: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.

In-Sight 9902L:

  • 0, 1, 4, 5: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and a Direct I/O connection has been established in the I/O Module Configuration dialog.
  • 0 to 11: The vision system is connected to the Breakout cable (CCB-PWRIO- xx or CCB-PWRIO- xxR) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 11: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and an Ethernet connection to a CIO-MICRO I/O module has been established in the I/O Module Configuration dialog.
  • 0 to 9: The vision system is connected to the I/O Module cable (CCB-PWRIO-MOD-xx) and a connection to a CIO-1400 I/O module has been established in the I/O Module Configuration dialog.
"Name"

The name for the output line. The "Name" input must be enclosed in quotation marks.
Type
  • 0 = Programmed (default)
  • 1 = High
  • 2 = Low
  • 3 = Acquisition Start
  • 4 = Acquisition End
  • 5 = Job Completed
  • 6 = System Busy
  • 7 = Job Load OK
  • 8 = Job Load Fail
  • 9 = ERR: Missed Acquisition
  • 10 = ERR: Tracking Overrun
  • 11 = ERR: Tracking Queue Full
  • 12 = Online/Offline

  • 13 = Strobe

    Note:
    • In-Sight Micro 1000 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O) or LineID = 9 (HSOUT 1 for CIO-MICRO, CIO-MICRO-CC, and CIO-WENET).
    • In-Sight 5000 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O / CIO-1350 or CIO-1400) or LineID = 9 (HSOUT 1 for CIO-1450, CIO-1460, CIO-MICRO or CIO-MICRO-CC).
    • In-Sight 70xx - 74xx series: Only valid when LineID = 0 (HSOUT 0 for Direct I/O) or LineID = 8 (HSOUT 0 for CIO-MICRO or CIO-MICRO-CC).
    • The In-Sight 7000 Gen2 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O or CIO-1400) or LineID = 9 (HSOUT 1 for CIO-MICRO).
    • In-Sight 8000 series: Only valid when LineID = 1 (HSOUT 1 for Direct I/O) or LineID = 9 (HSOUT 1 for CIO-MICRO).
    • In-Sight 9902L: Only valid when LineID = 1 (HSOUT 1 for Direct I/O).
  • 14 = I/O Module Standby (CIO-1450 and CIO-1460 only. Only valid when LineID = 0 - 7)
  • 15 = Light Control (CIO-1460 only. Only valid when LineID = 9)
  • 17 = Lifeline (CIO -MICRO & CIO-MICRO-CC Only)
  • 18 = Waveform

  • 20 = Serial Transmit (Direct I/O only; only valid when LineID = 1)

    Note:
    • Serial Transmit is only available when connecting to an In-Sight 70xx - 74xx series vision system with In-Sight Explorer 4.7.1 or later, and using In-Sight 4.7.1 or later firmware.
    • When the SetDiscreteOutput command is issued and Output Line 1 is set to Serial Transmit, the vision system determines if Input Line 1 is set to Serial Receive. If not, Output Line 1 is temporarily reset to the default output type for this line. Once the SetDiscreteInput command is issued, and Input Line 1 is set to Serial Receive, Output Line 1 is automatically set to Serial Transmit.

  • 24 = Job Pass/Fail Cell

    Note: Job Pass/Fail Cell is only supported on In-Sight 7000 Gen2 series and In-Sight 9000 series vision systems.
Pulse

  • 0 = Level Output

    Note: When Type is set to 13 (Strobe) and Pulse is set to 0, the Strobe/Light Control Trigger setting is set to Rising Edge. For more information, see Configure Discrete Output Details.

  • 1 = Pulsed Output

    Note: When Type is set to 13 (Strobe) and Pulse is set to 1, the Strobe/Light Control Trigger setting is set to Falling Edge.
PulseLen

Duration of an output pulse.

Vision System/Vision Sensor | Minimum Pulse Length |  | Maximum Pulse Length | Default Pulse Length
 | General-Purpose Output | High-Speed Output
In-Sight Micro 1000 series (except 1402, 1412 and 1500) | 10ms | 10ms | 1000ms | 10ms
In-Sight Micro 1402, 1412 and 1500 | 10ms | 1ms | 1000ms | 10ms
In-Sight 5000 series | 10ms | 10ms | 1000ms | 10ms
In-Sight 70xx - 74xx series | 10ms | 1ms | 1000ms | 10ms
In-Sight 7000 Gen2 series | 1ms | 1ms | 1000ms | 10ms
In-Sight 8000 series | 1ms | 1ms | 1000ms | 10ms
In-Sight 9902L | 1ms | 1ms | 1000ms | 10ms
In-Sight 9912 | 1ms | 1ms | 1000ms | 10ms
Note:
  • When using the CIO-Micro or CIO-Micro-CC I/O module with supported vision systems, the minimum pulse length for general-purpose outputs is limited by the Update Time setting in the I/O Module Configuration dialog. For example, if the Update Time is 20ms, the minimum pulse length cannot be set below 30ms. For more information, see I/O Module Configuration.
  • For the In-Sight 7000 Gen2 series and 8000 series vision systems, the minimum pulse length of 1ms is only supported using In-Sight firmware version 5.5.0 and higher. If using an earlier version of firmware, the minimum pulse length is 10ms.
Delay

0 to 1000

SetDiscreteOutput Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetDiscreteOutput Examples

Example 1: Job Load OK Signal Type Settings

To configure the following settings:

  • LineID: 3
  • "Name": "LINE3"
  • Type: Job Load OK
  • Pulse: Level Output
  • PulseLen: 250 ms
  • Delay: 50

Issue the following command: EV SetDiscreteOutput(3,"LINE3",7,0,250,50)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.

Example 2: Strobe Type Settings

To configure the Strobe Type settings:

  • LineID: 1
  • "Name": "LINE1"
  • Type: Strobe
  • Strobe/Light Control Trigger: Rising Edge
  • PulseLen: 10 ms
  • Delay: 50

Issue the following command: EV SetDiscreteOutput(1,"LINE1",13,0,10,50)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.

Note: To configure the Strobe Start Position, use the SetSystemConfig native mode command.


SetDiscreteOutputDelay

Configures delay settings that are found in the Output Details dialog. For more information, see Configure Discrete Output Details.

Note:
  • If the SetDiscreteOutput command is issued after the SetDiscreteOutputDelay command, the SetDiscreteOutputDelay settings are overwritten.

  • If an In-Sight vision system is being used in conjunction with a CIO-1400 or CIO-1450 I/O module, do not use either the SetDiscreteOutput or SetDiscreteOutputDelay commands to change a discrete output setting over the serial port. Doing so may cause the vision system to become unresponsive. Use the Discrete I/O Settings and Output Details dialogs to make the change, or send the commands over Telnet.

SetDiscreteOutputDelay Inputs

Syntax: EV SetDiscreteOutputDelay(LineID,Type,[Delay],[[WriteProcSet],[IOModule]])

Parameter | Description
LineID | The output line number to be modified.
Type
  • 0 = None
  • 1 = Acquisition Delay
  • 2 = Time After Trigger
Delay
  • If Type = 0, Delay is ignored and forced to 0.
  • If Type = 1, Delay is the number of acquisition or tracking pulses (0 to 1000) to delay the output after a signal pulse is received by an output Line. If this value is 0, then the In-Sight vision system updates the output line immediately on evaluating the WriteDiscrete function. If this value is > 0, then the output Line is always pulsed. For more information, see WriteDiscrete.
  • If Type = 2, Delay is the amount of time (0 to 10000 ms) to wait before the output is fired.

WriteProcSet

WriteProcSet is an optional parameter.

  • 0 = Settings are not saved in the proc.set file; the settings do not persist if the vision system is power cycled.
  • 1 = Settings are saved in the proc.set file; the settings persist after the vision system is power cycled.

IOModule

IOModule is an optional sub-parameter that can be used to set the Discrete Output Delay for a specific I/O Module type:

  • 0 = Direct I/O / CIO-1350
  • 1 = CIO-1450 and CIO-1460
  • 2 = CIO-1400
  • 3 = CIO-MICRO and CIO-MICRO-CC

SetDiscreteOutputDelay Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:
Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetDiscreteOutputDelay Example

To configure the following settings:

  • Line ID: 3
  • Type: Time After Trigger
  • Delay: 250 ms
  • WriteProcSet: 1
  • IOModule: CIO-MICRO

Issue the following command: EV SetDiscreteOutputDelay(3,2,250,1,3)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.


SetEditRegion

Configures settings for a cell that contains an EditRegion function. The Cell must already contain an EditRegion function; SetEditRegion does not create one. For more information, see EditRegion.

SetEditRegion Inputs

Syntax: EV SetEditRegion(Cell,Row,Column,High,Wide,Angle,Curve)

Parameter Description

Cell
  • Column: The column letter of the cell value to set. (A to Z)
  • Row: The row number of the cell value to set. (0 to 599)

Row

The Row offset of the origin in fixture coordinates.

Column

The Column offset of the origin in fixture coordinates.

High

The dimension along the region's x-axis.

Note: This value cannot be a negative number.

Wide

The dimension along the region's y-axis.

Note: This value cannot be a negative number.

Angle

The orientation, in fixture coordinates.

Curve

The angular deviation between the region's X-axis and the opposing boundary line.

SetEditRegion Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetEditRegion Example

  1. Insert an EditRegion function in cell A3 with the default settings. Assume cell A3 is populated as follows:

    A3 = EditRegion($A$0,0,0,0,1,1,1,1,"",0)

    An EditRegion [image] control, along with a corresponding results table is created in the adjacent cells to the right.

  2. Using the telnet client, issue the following command: EV SetEditRegion(A3,100,100,250,250,0,0)

    The EditRegion results table is updated to reflect the SetEditRegion input values.


SetExternalLightMode

Specifies the type of external strobe device connected to the In-Sight 7000 Gen2 series or 9912 vision system's LIGHT connector. For more information, see Light Settings.

SetExternalLightMode Inputs

Syntax: EV SetExternalLightMode(OutputMode)

Parameter

Description

OutputMode
  • 0 = Disabled
  • 1 = PNP (Sourcing) (default)
  • 2 = NPN (Sinking)

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

SetExternalLightMode Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetExternalLightMode Example

To specify that an NPN (sinking) external strobe device is connected to the vision system and to save the setting to the proc.set file, issue the following command: EV SetExternalLightMode(2,1)

The vision system responds with a status code (1), indicating the command was successfully executed, followed by the number of characters, in bytes (18). Finally, the float value (0) is returned.


SetFavorHostTable

Enables or disables the Favor Host Table over DNS option found in the In-Sight Host Table. For more information, see Host Table Dialog.

Note: Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetFavorHostTable Inputs

Syntax: EV SetFavorHostTable(FavorHostTable)

Parameter | Description
FavorHostTable | 0 = Disabled (default) 1 = Enabled

SetFavorHostTable Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetFavorHostTable Example

To enable the Favor Host Table over DNS option, issue the following command: EV SetFavorHostTable(1)

After issuing the SetFavorHostTable command, the In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results in XML format.


SetFTPSettings

Configures settings that are found in the FTP Settings dialog. For more information, see FTP Settings Dialog.

Note: Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetFTPSettings Inputs

Syntax: EV SetFTPSettings(IdleTimeout,ReadTimeout,ConnectionRetry,LocalPort,RemotePort,Passive)

Parameter | Description
IdleTimeout | (0 to 10000), 120*
ReadTimeout | (0 to 10000), 120*
ConnectionRetry | (1 to 10), 1*
LocalPort | (1 to 65535), 21*
RemotePort | (1 to 65535), 21*
Passive | 0 = Disabled* 1 = Enabled
* denotes default value

SetFTPSettings Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetFTPSettings Example

To configure the following settings:

  • IdleTimeout: 180
  • ReadTimeout: 180
  • ConnectionRetry: 1
  • LocalPort: 21
  • RemotePort: 21
  • Passive: 0

Issue the following command: EV SetFTPSettings(180,180,1,21,21,0)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.


SetHostTable

Configures settings that are found in the In-Sight Host Table dialog. For more information, see Host Table Dialog.

Note: Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetHostTable Inputs

Syntax: EV SetHostTable(HostID,"Name","IPAddress")

Parameter | Description
HostID | 0 to 31 First Host Name in table = 0, Second Host Name in table = 1, ... sequentially up to 31.
"Name" | The In-Sight sensor host name.
"IPAddress" | The In-Sight sensor IP address.

SetHostTable Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Add a Host Table Entry

To add a sensor with the host name of "PRODUCTION1" and the IP Address of "192.168.1.1" as the first entry in the Host Table, issue the following command: EV SetHostTable(0,"PRODUCTION1","192.168.1.1".

To add a sensor with the host name of "PRODUCTION2" and the IP Address of "192.168.1.3" as the second entry in the Host Table, issue the following command: EV SetHostTable(1,"PRODUCTION2","192.168.1.3").

Edit a Host Table Entry

To edit the IP address of the second Host Table entry, issue the following command: EV SetHostTable(1,"PRODUCTION2","192.168.1.2")


SetNetwork

Configures settings that are found in the Network Settings dialog.

Note: Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetNetwork Inputs

Syntax: EV SetNetwork(UseDHCP,"HostName","IPAddress","SubnetMask","DefaultGateway","DNSServer","DomainName")

Parameter | Description
UseDHCP | 0 = Disabled 1 = Enabled
"HostName" | The In-Sight sensor host name.
"IPAddress" | The In-Sight sensor IP address.
"SubnetMask" | The In-Sight sensor subnet mask.
"DefaultGateway" | The In-Sight sensor default gateway.
"DNSServer" | The IP address of the gateway host.
"DomainName" | The network domain for the In-Sight sensor.
Note: The IPAddress, SubnetMask, DefaultGateway, DNSServer, and DomainName parameters modify the static fields, not the current fields, as shown in the returns from the GetNetwork command.

SetNetwork Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetNetwork Example

To configure the following settings:

  • UseDHCP: 0
  • "HostName": is8402_010203
  • "IPAddress": 192.168.0.1
  • "SubnetMask": 255.255.255.0
  • "DefaultGateway": 192.168.0.254
  • "DNSServer": 192.168.0.2
  • "DomainName": yourdomain.com

Issue the following command: EV SetNetwork(0,"is8402_010203","192.168.0.1","255.255.255.0","192.168.0.254","192.168.0.2","yourdomain.com")

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.


SetSerialPort

Configures settings that are found in the Serial Port Settings dialog. For more information, see Serial Port Settings Dialog.

Note:
  • The In-Sight system must be Offline.
  • DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
  • The CIO-WENET Ethernet I/O module does not support serial communication.
  • Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetSerialPort Inputs

Syntax: EV SetSerialPort(SerialPortNum,Mode,BaudRate,DataBits,StopBits,Parity,Handshake,InputPacketSize,OutputPacketSize,
InputTerminator,OutputTerminator,FixedInputMode,FixedInputLength,DeviceNetTrigger)

Parameter Description
SerialPortNum

1
Mode
  • 1 = Unused (Closed)
  • 6 = Text
  • 7 = Native*
  • 8 = DeviceNet
  • 9 = Motoman
  • 10 = Kuka
BaudRate
  • 1200
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 57600
  • 115200*
DataBits
  • 4 = 7 Data Bits
  • 8 = 8 Data Bits*
StopBits
  • 1 = 1 Stop Bit*
  • 4 = 2 Stop Bits
Parity
  • 256 = None*
  • 512 = Odd
  • 1024 = Even
Handshake
  • 0 = None*
  • 1 = Hardware
  • 2 = Xon/Xoff
InputPacketSize (DeviceNet Only)

1 to 255, 1*
OutputPacketSize (DeviceNet Only)

1 to 255, 1*
InputTerminator (Text and Native Only)

1 to 255, 13*
OutputTerminator (Text and Native Only)
  • -1 = CRLF
  • 0 = No terminator
  • 1 to 255, 13*
FixedInputMode (Text and Native Only)
  • 0 = Disabled*
  • 1 = Enabled
FixedInputLength (Text and Native Only)

1 to 255, 1*
DeviceNetTrigger (DeviceNet Only)
  • 0 = Disabled
  • 1 = Enabled*
* denotes default value

SetSerialPort Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetSerialPort Example

To configure the following settings:

  • SerialPortNum: 1
  • Mode: 7
  • BaudRate: 115200
  • DataBits: 8
  • StopBits: 1
  • Parity: 256
  • Handshake: 0
  • InputPacketSize: 0
  • OutputPacketSize: 0
  • InputTerminator: 13
  • OutputTerminator: 13
  • FixedInputMode: 0
  • FixedInputLength: 0
  • DeviceNetTrigger: 1

Issue the following command: EV SetSerialPort(1,7,115200,8,1,256,0,0,0,13,13,0,0,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.


SetStartup

Configures settings that are found in the Startup dialog. For more information, see Startup Dialog.

Note: Use the Store Settings (TS) native mode command to save changes to the proc.set file. If not saved to the proc.set file, the changes will be lost after power-cycling the In-Sight vision system. For more information, see Store Settings.

SetStartup Inputs

Syntax: EV SetStartup("JobName",Online)

Parameter | Description
"JobName" | The name of job to load automatically on startup.
Online | 0 = Start Offline* 1 = Start Online
* denotes default value

SetStartup Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

SetStartup Example

To configure the sensor load the job "Sorting.job" on startup and boot into Online mode, issue the following command: EV SetStartup("Sorting.job",1)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (18). Finally, the results are returned in XML format.


SetSystemConfig

These parameters are used in conjunction with the SetSystemConfig Evaluate Native Mode command to configure system parameters.

Note: Any inputs enclosed in quotation marks must be enclosed by quotes when sent to the In-Sight vision system.

Active Cells Limit

Adjust ExtractBlobs Memory Allocation

Audit Enable Settings

Audit IP Settings

Default Focus Position

DHCP Timeout

Increase Image Buffers

Live Image

Network Requested Link Mode

Online Image

PulseJobChangeTiming

Serial Hello Message on Startup

Services Enabled

Strobe Start Position

Telnet Port

Trigger Timestamp Mode

Trigger Timestamp: Single and Multiple Triggers

Trigger Timestamp: Number of Inputs (Multiple Triggers)

Trigger Timestamp: Maximum Queue Length (Multiple Triggers)

Trigger Timestamp: Override Window (Multiple Triggers)


Active Cells Limit

Configures the number of available spreadsheet cells settings that are found in the Active Cells Limit dialog. For more information, see Active Cells Limit Dialog.

Inputs

Syntax: EV SetSystemConfig("ActiveCellLimit",Limit,WriteProcSet)

Parameter

Description

"ActiveCellLimit"

References the Active Cells Limit dialog settings.

Limit

The active cell limit, in units of cells. 2048 to 10400, 6144 (default)

Note: The active cell limit for the In-Sight 5000 vision system is 4,096 cells and cannot be modified.

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:
Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To specify an active cell limit of 8,192, issue the following command: EV SetSystemConfig("ActiveCellsLimit",8192,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, a result code is returned that either contains a 1, indicating that the limit was set, or a 0, indicating the limit was not set. The In-Sight vision system must be power cycled for the changes to take effect.


Adjust ExtractBlobs Memory Allocation

Allows the memory allocation for the ExtractBlobs function to be set manually. When using this setting, the value specified should be no more than half the number of pixels in the ExtractBlobs function's region of interest (ROI). For more information, see ExtractBlobs.

CAUTION: Apply this setting only if an ExtractBlobs function is returning #ERR due to a lack of memory. When assigning the amount of memory to the function, be conservative. Over allocating memory to the ExtractBlobs function may cause memory problems for the entire In-Sight vision system.

Inputs

Syntax: EV SetSystemConfig("ExtractBlobsMemory",k)

Parameter | Description
"ExtractBlobsMemory" | Sets the amount of memory that will be allocated to the vision system at startup for the ExtractBlobs function.
k | Specifies the amount of memory that will be allocated to the vision system for the ExtractBlobs function; the value of “k” depends upon the size of the ROI being used, as well as the quality of the image. Begin with a smaller value, and then increment above that value. For example, with a ROI <= 640 x 480 and a speckled image, begin with a value of 8,000 and increment the value by 1,000; with a ROI <= 1600 x 1200, begin with a value of 32,000 and increment the value by 1,000; or with a ROI <= 2448 x 2048, begin with a value of 128,000 and increment the value by 1,000. Note: To restore the default memory allocation for ExtractBlobs, enter 0.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


Audit Enable Settings

Enables or disables automatic audit messages for the active vision system and specifies the types of events for which audit messages will be generated. For more information, see Audit Message Settings Dialog.

Inputs

Syntax: EV SetSystemConfig("AuditEnableSettings",Enabled,SystemEvents,TaggedCells,SystemSettings,WriteProcSet)

Parameter

 Description

"AuditEnableSettings"

References the Audit Enable Settings.

Enabled
  • 0 = Disable automatic audit messages for the active vision system. (default)
  • 1 = Enable automatic audit messages for the active vision system.

SystemEvents
  • 0 = Disable.
  • 1 = If an In-Sight system event occurs (logging on or off of a vision system, loading or saving a job file, transitioning from Online to Offline mode, system startup and firmware updates), an audit message is generated. (default)

TaggedCells
  • 0 = Disable.
  • 1 = If a symbolically tagged cell is edited (e.g., changes are made to the cell's formula or interactive control value) using In-Sight Explorer, a custom application, VisionView or a PLC, an audit message is generated. (default)

SystemSettings
  • 0 = Disable.

    1 = If a system setting (any setting stored in the proc.set file) is modified, an audit message is generated. (default)

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To enable audit messages for the active vision system. generate audit messages when system settings are changed, and save the settings to the proc.set file, issue the following command: EV SetSystemConfig("AuditEnableSettings",1,0,0,1,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the results are returned in XML format.


Audit IP Settings

Specifies the IP address and TCP/IP port of the audit message server. For more information, see Audit Message Settings Dialog.

Inputs

Syntax: EV SetSystemConfig("AuditIPSettings","IPAddress",Port,WriteProcSet)

Parameter

 Description

"AuditIPSettings"

References the Audit IP Settings.

"IPAddress"

 Specifies the IP address of the audit message server.

Port

 Specifies the TCP/IP port of the audit message server. (default = 5753)
Note: A valid port assignment is any unused number between 1 and 65535, except for ports reserved for In-Sight communications. For more information, see In-Sight Ports.

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To specify the IP address and TCP/IP port of the audit message server and save the settings to the proc.set file, issue the following command: EV SetSystemConfig("AuditIPSettings","192.168.0.13",5753,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the results are returned in XML format.


Default Focus Position

Allows the In-Sight 7000 series vision system to save a focus position in the vision system's proc.set file.

Note: The DefaultFocusPosition function is used to save a focus position value only, and does not move the lens.

Inputs

Syntax: EV SetSystemConfig("DefaultFocusPosition",Position,Apply,WriteProcSet)

Parameter

 Description

"DefaultFocusPosition"

Sets the default focus position that the vision system will use at startup.

Position

 Specifies the default focus position, 0 to 100; to disable this setting, set the variable to -1.

Apply
  • 0 = Settings are applied after the In-Sight vision system is power cycled. (default)
  • 1 = Settings are applied immediately.

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


DHCP Timeout

Configures the DHCP Timeout settings that are found in the Network Settings dialog. For more information, see Network Settings Dialog.

Inputs

Syntax: EV SetSystemConfig("DHCPTimeout",Timeout,WriteProcSet)

Parameter

Description

"DHCPTimeout"

References the DHCP Timeout settings.

Timeout

(5 to 180), 60 (default)

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:
Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To specify a DHCP Timeout of 30 seconds, issue the following command: EV SetSystemConfig("DHCPTimeout",30,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (21). Finally, the DHCP Timeout setting (30) is returned.


Increase Image Buffers

Allows the default number of image buffers allocated to an In-Sight vision system to be increased, based on the vision system resolution and RAM size. After issuing the command, the vision system must be power cycled for the changes to take effect. For more information, see Image Buffers Dialog.

Inputs

Syntax: EV SetSystemConfig("StartupImageBuffers",NumberofBuffers,WriteProcSet)

Parameter

 Description

"StartupImageBuffers"

Sets the number of image buffers that will be allocated to the vision system at startup.

NumberofBuffers

Specifies the number of buffers that will be allocated to the vision system.

Note: If NumberofBuffers is set to 0, the default number of buffers will be used.

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


Live Image

Configures the Live Acquisition settings that are found in the Image Settings dialog. For more information, see Image Settings Dialog.

Note: The Eighth resolution option is not supported for color vision systems.

Inputs

Syntax: EV SetSystemConfig("LiveImage",Resolution,MaxFrameRate)

Parameter

Description

"LiveImage"

References the LiveImage settings.

Resolution
  • 1 = Full
  • 0 or 2= Half (default)
  • 3 = Quarter
  • 4 = Eighth

MaxFrameRate

0.016 to 100, 0 (default)

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To configure the vision system to use half resolution for live images with a maximum rate of 0.064 frames/sec, issue the following command: EV SetSystemConfig("LiveImage",1,0.064)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (26). Finally, the Live Acquisition settings (1 0.064) are returned.


Network Requested Link Mode

Configures the Link Speed setting found in the Network Settings dialog. After the command is issued, the vision system must be rebooted for the changes to take effect. For more information, see Network Settings Dialog.

CAUTION: If the network device is not configured to support the specified link speed, the vision system will not be reachable; configure the network device's Ethernet settings to match that of the vision system.

Inputs

Syntax: EV SetSystemConfig("Network.RequestedLinkMode",LinkSpeed,WriteProcSet)

Parameter

Description

"Network.RequestedLinkMode"

 References the Link Speed Settings.
LinkSpeed
  • 0 = Auto-Negotiate (default)
  • 100 = 10 Mbps Half Duplex
  • 101 = 10 Mbps Full Duplex
  • 102 = 100 Mbps Half Duplex
  • 103 = 100 Mbps Full Duplex
  • 104 = 1000 Mbps Full Duplex

WriteProcSet

1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.
Note:
  • The 1000 Mbps Full Duplex option is only available for vision systems that support 1000 Mbps Ethernet speeds. For In-Sight 5600 series vision systems, it is only available on models with 128MB non-volatile flash memory or higher.
  • Use the GetSystemConfig command to determine the link speeds and duplex modes supported by the vision system. For more information, see GetSystemConfig.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To configure the vision system to use 100 Mbps Full Duplex, issue the following command: EV SetSystemConfig("Network.RequestedLinkMode",103,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (22). Finally, the current link speed (103)is returned.


Online Image

Configures the Online Resolution settings that are found in the Image Settings dialog. For more information, see Image Settings Dialog.

Note:
  • For vision system running In-Sight firmware 4.x.x, Optimized returns a full size image with a Manual trigger, and a half resolution image with a Camera or Continuous trigger. For vision systems running In-Sight firmware 5.1.0 and later, Optimized optimizes the resolution of the image sent to In-Sight Explorer for speed.
  • The Eighth resolution option is not supported for color vision systems.

Inputs

Syntax: EV SetSystemConfig("OnlineImage",Resolution,MaxFrameRate)

Parameter

Description

"OnlineImage"

References the OnlineImage settings.

Resolution
  • 0 = Optimized (default)
  • 1 = Full
  • 2 = Half
  • 3 = Quarter
  • 4 = Eighth

MaxFrameRate

0.016 to 100, 0 (default)

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To configure the vision system to use half resolution for Online images with a maximum rate of 0.064 frames/sec, issue the following command: EV SetSystemConfig("OnlineImage",2,0.064)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (26). Finally, the Live Acquisition settings (2 0.064) are returned.


PulseJobChangeTiming

Specifies the widths of the input pulses for changing the job on the In-Sight 2000 series sensor via discrete input line 0, when configured as a Job Change (Pulsed) signal type. The job change is initiated based on the detection of input pulses, differentiated by the width of the pulses. The pulses are generated by an external device (such as a PLC), and sent to the In-Sight 2000 sensor. First, the external device issues a start pulse. Next, the external device issues count pulses, with a pulse gap between each count pulse. Finally, the external devices issues a stop pulse. When all pulses and pulse gaps match the specified pulse lengths, the job change request is successful and the job is loaded to the sensor. If any of the conditions fail (i.e., an incorrect pulse or incorrect pulse gap timing), the job change request will fail and no job change will take place.

Inputs

Syntax: EV SetSystemConfig("PulseJobChangeTiming",StartPulse,StopPulse,CountPulse,PulseGap,Tolerance,WriteProcSet)

Parameter

 Description
"PulseJobChangeTiming" Specifies the Job Change (Pulsed) timing.
StartPulseWidth

Specifies the width of the start pulse. 1ms - 22000ms (default = 20 ±1ms)
StopPulseWidth

Specifies the width of the stop pulse. 1ms - 22000ms (default = 20 ±1ms)
CountPulseWidth

Specifies the width of the count pulse(s). 1ms - 22000ms (default = 10 ±1ms)
PulseGapWidth

Specifies the width of the pulse gap. 1ms - 22000ms (default = 10 ±1ms)
Tolerance

Specifies the pulse width tolerance. >0ms

WriteProcSet
  • 0 = Settings are not saved in the proc.set file; the settings do not persist if the In-Sight sensor is power cycled. (default)
  • 1 = Settings are saved in the proc.set file; the settings persist after the In-Sight sensor is power cycled.
Note: Issuing EV SetSystemConfig(“PulseJobChangeTiming”) returns the current pulse width values.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Specify Pulse Width Values

To specify the pulse job change timing and save the settings to the proc.set file, issue the following command:

EV SetSystemConfig("PulseJobChangeTiming",15000,15000,10000,1000,100,1)

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the results are returned in XML format.

Example: Retrieve Current Pulse Width Values

To retrieve the current pulse width values, issue the following command: EV SetSystemConfig("PulseJobChangeTiming")

The In-Sight sensor responds with a status code (1), followed by the number of characters, in bytes (45). Finally, the results are returned in XML format.


Serial Hello Message on Startup

Configures the In-Sight vision system and vision sensor to issue a hello message over the serial connection to alert a device that the vision system/sensor has finished the initialization and is ready to use.

To send a serial hello message to a device that is listening, you need the following conditions:

  • Set the serial hello message on the vision system/sensor.
  • Connect the vision system/sensor through serial to a device listening to the message (such as a PC that runs HyperTerm).

  • Set the vision system/sensor's serial port to Text or Native Mode. By default, the serial port is set to Native Mode. For more information, see Serial Port Settings Dialog.

    Note: The Serial Port Setting dialog displays only in the Spreadsheet view. If you use an EasyBuilder-only model, you cannot change the Serial Port settings, and the serial port is always set to Native Mode.

After you set the serial hello message and then restart the vision system/sensor, the listening device detects the message at the end of startup sequence. It can take several minutes.

Inputs

Syntax:EV SetSystemConfig("Comms.Serial.Hello","Message",PortNumber,WriteProcSet)

Parameter | Description
"Comms.Serial.Hello" | Sets the In-Sight vision system/sensor to issue a hello message on startup over the serial connection.
"Message" | Specifies your hello message (for example, "I'm here").
PortNumber | Specifies the serial port number. The number is always "1."
WriteProcSet | 1 = Settings are saved in the proc.set file; the settings persist after the In-Sight sensor is power cycled. For this command, the value is always 1 because a serial hello message only takes effect after the vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Examples

In the following examples, you will set, retrieve, and disable a hello message over telnet.

Set a Hello Message and Serial Port

To set a hello message ("I.m here") and save the settings to the proc.set file, issue the following command: EV SetSystemConfig("Comms.Serial.Hello","I'm here",1,1)

The In-Sight vision system/sensor responds with a status code (1), followed by the number of characters in bytes (20). Finally, the In-Sight vision system/sensor returns the results in XML format.

Note: If successful, this command overwrites the previous hello message settings.

Retrieve the Hello Message and Serial Port

To retrieve the hello message, issue the following command: EV SetSystemConfig("Comms.Serial.Hello")

The In-Sight vision system/sensor responds with a status code (1), followed by the number of characters, in bytes (46). Finally, the In-Sight vision system/sensor returns the message (&quot;I&apos;m here&quot;) and the serial port number (1) in XML format.

Disable the Hello Message and Serial Port

To disable the hello message ("I'm here") and save the settings to the proc.set file, issue the following command: EV SetSysetmConfig("Comms.Serial.Hello","",0,1)

Note: Empty quotes ("") will clear the hello message settings.

The In-Sight vision system/sensor responds with a status code (1), followed by the number of characters in bytes (20). Finally the In-Sight vision system/sensor returns the results in XML format.


Services Enabled

Configures the Protocol Services settings that are found in the Network Settings dialog. For more information, see Network Settings Dialog.

Note: The EtherNet/IP and ProfiNET services are mutually exclusive, therefore both services cannot be enabled at the same time.

Inputs

Syntax: EV SetSystemConfig("ServicesEnabled",Services,Mask)

Parameter

Description

"ServicesEnabled"

References the ProtocolServices settings.

Services

Specifies all services to be enabled on the vision system. The Services parameter is a binary value that is converted into its decimal equivalent.

Service | Binary | Decimal Equivalent
CC-Link IE Field Basic | 10000000 | 128
iQSS | 01000000 | 64
POWERLINK Note: Only supported on the In-Sight 70xx - 74xx series vision system running firmware version 4.x.x. | 00100000 | 32
SLMP Scanner | 00010000 | 16
Precision Time Protocol (IEEE 1588 PTP) | 00001000 | 8
ProfiNET | 00000100 | 4
EtherNet/IP | 00000010 | 2
Modbus Server | 00000001 | 1
None | 00000000 | 0

To enable more than one service, determine the binary value for the enabled services , then convert the value to its decimal equivalent. Closed Example

No services are currently enabled, and you want to enable Modbus and ProfiNET services.

  1. Determine the binary value used to enable the services.

    Service ProfiNET EtherNet/IP Modbus

    Binary

    1

    0

    1

  2. Convert the binary value to its decimal equivalent.

    101 = 5

  3. Determine the binary value used to modify the services.

    Service ProfiNET EtherNet/IP Modbus

    Binary

    1

    0

    1

  4. Convert the binary value to its decimal equivalent. This gives you the Mask parameter value.

    101 = 5

  5. Issue the following command: EV SetSystemConfig("ServicesEnabled",5,5)

    The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the enabled service(s) (5) are returned.

Mask

Specifies the services to be modified on the vision system. The Mask parameter is a binary value that is converted into its decimal equivalent.

Service | Binary | Decimal Equivalent
CC-Link IE Field Basic | 10000000 | 128
iQSS | 01000000 | 64
POWERLINK Note: Only supported on the In-Sight 70xx - 74xx series vision system running firmware version 4.x.x. | 00100000 | 32
SLMP Scanner | 00010000 | 16
Precision Time Protocol (IEEE 1588 PTP) | 00001000 | 8
ProfiNET | 00000100 | 4
EtherNet/IP | 00000010 | 2
Modbus Server | 00000001 | 1
None | 00000000 | 0

To modify more than one service, determine the binary value for the services to be modified, then convert the value to its decimal equivalent. Closed Example

The ProfiNET service is currently the only enabled service. You want to enable the EtherNet/IP service and disable the ProfiNET service. Since we are only enabling the EtherNet/IP service, we know that the Service parameter is 2.

  1. Determine the binary value used to modify the services. This gives you the Mask parameter value.

    Service ProfiNET EtherNet/IP Modbus

    Binary

    1

    1

    0

  2. Convert the binary value to its decimal equivalent.

    110 = 6

  3. Issue the following command: EV SetSystemConfig("ServicesEnabled",2,6)

    The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the enabled service(s) (2) are returned.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Enable and Modify a Single Service

If no services are currently enabled, and you want to enable the ProfiNET service. Issue the following command: EV SetSystemConfig("ServicesEnabled",4,4)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the enabled service(s) (4) are returned.

Example: Disable All Services

Since we want all services to be disabled, we know that the Service parameter is 0.

  1. Determine the binary value used to modify the services.

    Service

    ProfiNET

    EtherNet/IP

    Modbus

    Binary

    1

    1

    1

  2. Convert the binary value to its decimal equivalent. This gives you the Mask parameter value

    111 = 7

  3. Issue the following command: EV SetSystemConfig("ServicesEnabled",0,7)

    The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the enabled service(s) (0) are returned.


Strobe Start Position

Configures the Strobe Start Position setting that are found in the Output Details dialog. For more information, see Configure Discrete Output Details.

Note: To configure the Strobe/Light Control Trigger setting, use the SetDiscreteOutput native mode command (refer to the Example 2).

Inputs

Syntax: EV SetSystemConfig("StrobeStartPosition",Position,WriteProcSet)

Parameter

 Description

"StrobeStartPosition"

Specifies when the strobe should begin.

Position
  • 0 = Acquisition Start. The strobe will pulse as the In-Sight vision system begins its acquisition. Supported on all vision system models except the In-Sight 8405 vision system. (default)
  • 1 = Camera Trigger. The strobe will pulse upon receiving a camera trigger event. Supported on all vision system models except the In-Sight 8405 vision system.
  • 2 = All Rows Exposed. The strobe will pulse only when all pixel rows are exposed. Supported on the In-Sight 8405 vision system only.
Note: If using a strobe with the In-Sight 8405 vision system, a minimum Exposure value of 72ms is recommended for a full frame image capture, to ensure that all pixel rows are exposed when the strobe is pulsed. For more information, see In-Sight 8405 Rolling Shutter Operation.

WriteProcSet
  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To specify that the strobe will begin as the In-Sight vision system begins its acquisition, issue the following command: EV SetSystemConfig("StrobeStartPosition",0,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the results are returned in XML format.


Telnet Port

Configures the Telnet Port settings that are found in the Network Settings dialog. For more information, see Network Settings Dialog.

Inputs

Syntax: EV SetSystemConfig("TelnetPort",Port,WriteProcSet)

Parameter | Description
"TelnetPort" | References the Telnet Port Settings.
Port | 1 to 65535, 23 (default)
WriteProcSet | 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system is power cycled.
Note:
  • A valid port assignment is any unused number between 1 and 65535, excluding 21, 68, 80, 502, 1069, 1070, 1212, 2222, 44818 and 50000 (reserved for In-Sight communications). For more information, see In-Sight Ports.
  • The vision system must be rebooted before the Telnet Port settings take effect.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To specify a Telnet Port of 2000, issue the following command: EV SetSystemConfig("TelnetPort",2000,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (23). Finally, the Telnet Port setting (2000) is returned.


Trigger Timestamp Mode

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Enables the legacy mode for single timestamp user data format and triggering. You only need to issue this command if migrating from a vision system running 4.5.0 – 4.10.x firmware to a vision system running 5.6.1 firmware or later and need to reuse the existing PLC logic.

Inputs

Syntax: EV SetSystemConfig("Eip.TriggerTimestampLegacyMode",TriggerMode)

Parameter

 Description

"Eip.TriggerTimestampLegacyMode"

Sets whether to use In-sight firmware version 4.x.x mode of single triggering or the In-Sight firmware version firmware 5.6.1 mode of single and multiple timestamp triggering.

TriggerMode
  • 0 = Use single and multiple timestamp triggering in In-Sight version 5.6.1 and later. (default)
  • 1 = Use single timestamp triggering from firmware versions 4.x.x


Trigger Timestamp: Single and Multiple Triggers

Note: Multiple triggers is supported only with In-Sight firmware 5.6.1 and later.

If an In-Sight vision system is configured to communicate over CIP-Sync and the Precision Time Protocol (PTP), the SetSystemConfig command is used to set the system configuration variable, "EIP.TriggerTimestampInputOffset", to the offset in the user data field, where the PLC writes the timestamps.

Inputs

Syntax: EV SetSystemConfig("Eip.TriggerTimestampInputOffset",Offset)

Parameter

 Description

"Eip.TriggerTimestampInputOffset"

Sets the offset into the EtherNet/IP output assembly, which is used to trigger the vision system.

If you are running In-Sight firmware version 4.x.x, this captures the 64-bit timestamp in microseconds, followed by a 64-bit system time offset in microseconds (for a total of 16 bytes), which is used to trigger the vision system.

If you are running In-Sight firmware version 5.6.1, this captures the 64-bit system time offset in microseconds, followed by the 64-bit timestamps in microseconds.

Offset

 0 (default) to 488 (or less depending on the number of timestamps sent) . To disable the setting, set the value to -1.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


Trigger Timestamp: Number of Inputs (Multiple Triggers)

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Sets the number of timestamps the vision system can process simultaneously from one PLC user data packet. The PLC can send a maximum of four timestamps.

Inputs

Syntax: EV SetSystemConfig("Eip.TriggerTimestampNumInputs",Timestamps)

Parameter | Description
"Eip.TriggerTimestampNumInputs" | Sets the number of timestamps the vision system can process simultaneously from one PLC user data packet.
Timestamps | 1 to 4. Default is 4.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


Trigger Timestamp: Maximum Queue Length (Multiple Triggers)

Sets the maximum number of pending time triggers that the vision system can store simultaneously.

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Inputs

Syntax: EV SetSystemConfig("Eip.TriggerTimestampMaxQueueLength",Timestamps)

Parameter | Description
"Eip.TriggerTimestampMaxQueueLength" | Sets the maximum number of timestamps that the vision system can store simultaneously.
Timestamps | 1 to 10. Default is 10.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


Trigger Timestamp: Override Window (Multiple Triggers)

Note: This command is supported with In-Sight firmware version 5.6.1 and later.

Sets the number of microseconds that a pending PLC time stamp has to fall within before it can override an existing timestamp on the vision system.

Inputs

Syntax: EV SetSystemConfig("Eip.TriggerTimestampOverrideWindowUs",Microseconds)

Parameter | Description
"Eip.TriggerTimestampOverrideWindowUs" | Sets the number of microseconds that a pending PLC timestamp has to fall before it can override an existing timestamp on the vision system.
Microseconds | 0 to 10,000. Default is 1,000.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-2 | The command could not be executed.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.


Modbus TCP Communications

Modbus is a serial client/server protocol developed by Modicon for industrial automation systems. It is one of the oldest industry standard methods for the transfer of discrete and analog I/O information and register data between industrial protocol and monitoring devices.

There are multiple layers of Modbus TCP (= Modbus protocol with a TCP interface that runs on Ethernet) implementations in In-Sight, and available implementations are varied depending on the firmware versions running on the In-Sight vision systems/sensors. Refer to the table below for the detailed information on each implementation.

Supported Firmware Versions

Note: For a complete list of models and supported firmware versions, see Firmware Versions.
Modbus TCP Implementations | Firmware Version 4.x.x or Earlier | Firmware Version 5.1.0 - 5.2.x | Firmware Version 5.3.0 or Later
Modbus TCP Server (5.3.0 and later)- spreadsheet and EasyBuilder1 For more information, see Modbus TCP Server Settings Dialog, Modbus TCP Factory Interface (5.3.0 or later), or Configuring In-Sight Vision Systems for Modbus TCP Communications. | Not Supported | Not Supported | Supported
TCPDevice (client and server) - spreadsheet only | Supported | Supported | Supported
Direct Cell Access | Supported | Not Supported | Not Supported
ReadModbusBuffer and WriteModbusBuffer functions using input and output buffers (server only) - spreadsheet and EasyBuilder1 | Supported | Not Supported | Replaced by ReadUserDataBuffer and WriteResultsBuffer. For more information, see ReadUserDataBuffer or WriteResultsBuffer.
1 For more information, see Help Menu: EasyBuilder View

Modbus TCP Commands (5.3.0 or Later)

Note: For more information on this Modbus TCP implementation, see Modbus TCP Factory Interface (5.3.0 or later).
Code | Description | Address Space
0x01 | Read Coils: This function code is used to read the state of 1 to 2000 contiguous coils in a remote device. This command would be used by a PLC to read data from the vision system/sensor. | Coil
0x05 | Write Single Coil: This function code is used to write a single output coil to either ON or OFF in a remote device. This command would be used by a PLC to write data to the vision system/sensor. | Coil
0x0F | Write Multiple Coils: This function code is used to write a sequence of 1 to 1968 coils to either ON or OFF in a remote device. This command would be used by a PLC to write data to the vision system/sensor. | Coil
0x02 | Read Discrete Inputs: This function is used to read the state of 1 to 2000 contiguous discrete inputs in a remote device. This command would be used by a PLC to read data from the vision system/camera. | Discrete Input
0x03 | Read Holding Registers: This function is used to read the contents of a contiguous block of 1 to 125 holding registers in a remote device. This command would be used by a PLC to read data from the vision system/sensor. | Holding Register
0x10 | Write Multiple Registers: This function code is used to write from 1 to 123 contiguous registers in a remote device. This command would be used by a PLC to write data to the vision system/sensor. | Holding Register
0x04 | Read Input Registers: This function code is used to read from 1 to 125 contiguous input registers in a remote device. This command would be used by a PLC to read data from the vision system/sensor. | Input Register

TCP/IP Modbus Commands (4.x.x)

The following Modbus commands are supported:

Read Multiple Registers (Modbus Function Code 03)

Reads the values of multiple cells from the In-Sight spreadsheet, which are returned as 16-bit integers. Error code 02 (ILLEGAL DATA ADDRESS) is returned if any of the cells contain a non-integer value.

Note: When using the WriteModbusBuffer function, the remote client that is reading from the In-Sight vision system must use Registers 30010 – 30137.
Reference Number | Defines which cells to read. The high 6 bits (bits 15 through 10) of the Modbus Reference Number define the cell column (A-Z), and the low 10 bits (bits 9 through 0) define the cell row (0-399). For more information, Modbus Reference Number Examples.
Word Count | Defines how many cells will be read. For multiple cells, the values returned start at the cell defined by the Reference Number and are incremented by column. If the message requests more values than there are remaining columns in the current row, the server continues reading values from the first cell below the start row.

Closed Read Multiple Registers Example

Example: Read Multiple Registers - reading data from 3 In-Sight spreadsheet cells (G273-G275).

When the Modbus request is received, In-Sight returns the data contained in cells G273-G275.

Byte | Value (Decimal) | Description
0 | 0 | Modbus Header
1 | 0
2 | 0
3 | 0
4 | 0
5 | 6 | Bytes to follow
6 | 0 | Unit ID
7 | 3 | Modbus Function Code (03 for Read Multiple Registers)
8 | 25 | Modbus Reference Number (In-Sight spreadsheet cell reference)
9 | 17
10 | 0 | Number of Cells (Including starting cell)
11 | 3

Write Multiple Registers (Modbus Function Code 16)

Writes data into an In-Sight spreadsheet cell that contains an EditInt function. Error code 02 (ILLEGAL DATA ADDRESS) is returned if any of the cells do not contain an EditInt function.

Note: When using the ReadModbusBuffer function, the remote client that is writing to the In-Sight vision system must use Registers 50000 – 50127.
Reference Number | Defines which cells to write. The first 6 bits (bits 15 through 10) of the Modbus Reference Number define the cell column (A-Z), and the last 10 bits (bits 9 through 0) define the cell row (0-399). For more information, Modbus Reference Number Examples.
Word Count | Defines how many cells will be written into the spreadsheet. For multiple cells, the values to be written start at the cell defined by the Reference Number and are incremented by column. If the message writes more values than there are remaining columns in the current row, the server continues writing values into the first cell below the start row.

Closed Write Multiple Registers Example

Example: Write Multiple Registers - writing to In-Sight spreadsheet cell E9.

In the spreadsheet, create an EditInt function in cell E9 to accept the data. When the Modbus command is sent, cell E9 will then contain the value of 65.

Byte | Value (Decimal) | Description
0 | 0 | Modbus Header
1 | 0
2 | 0
3 | 0
4 | 0
5 | 9 | Bytes to follow
6 | 0 | Unit ID
7 | 16 | Modbus Function Code (16 for Write Multiple Registers)
8 | 16 | Modbus Reference Number (In-Sight spreadsheet cell reference)
9 | 9
10 | 0 | Number of Cells (Including starting cell)
11 | 1
12 | 2 | Byte Count
13 | 00 | Data
14 | 65

Write Coil (Modbus Function Code 05)

Initiates events in the In-Sight spreadsheet. Writing a non-zero value to Coils 0 through 7 will trigger Soft Events 0 through 7 in the spreadsheet. Writing a non-zero value to Coil 8 will trigger an acquire. Error code 02 (ILLEGAL DATA ADDRESS) is returned if the coil number is not in the valid range (0 to 8).

Closed Write Coil Example

Example: Write Coil - Triggering an acquisition in In-Sight.

Byte | Value (Decimal) | Description
0 | 0 | Modbus Header
1 | 0
2 | 0
3 | 0
4 | 0
5 | 6 | Bytes to follow
6 | 0 | Unit ID
7 | 5 | Modbus Function Code (05 for Write Coil)
8 | 0 | Coil Number*
9 | 8
10 | 255 | ON. A remote device output can either be ON (255) or OFF (0).
11 | 0 | Always Zero

* Coils are indicated using bytes 8 and 9.

Coil Number | Byte 8 Value (Decimal) | Byte 9 Value (Decimal) | Description
0 | 0 | 0 | Specifies Soft Trigger 0
1 | 0 | 1 | Specifies Soft Trigger 1
2 | 0 | 2 | Specifies Soft Trigger 2
3 | 0 | 3 | Specifies Soft Trigger 3
4 | 0 | 4 | Specifies Soft Trigger 4
5 | 0 | 5 | Specifies Soft Trigger 5
6 |  | 6 | Specifies Soft Trigger 6
7 | 0 | 7 | Specifies Soft Trigger 7
8 | 0 | 8 | Acquire an image and update the spreadsheet. This option requires the AcquireImage functions Trigger argument to be set to External or Manual.

For more information, see Communicating with a Mitsubishi Automation Controller on a CC-Link Network via an Anybus X-gateway, Communicate with a Siemens PLC on a PROFIBUS Network, or Anybus X-gateway.


Configuring In-Sight Vision Systems for Modbus TCP Communications

This topic describes how to connect an In-Sight vision system running firmware version 5.3.0 or later to a PLC using Modbus TCP communications.

Note:
  • This topic covers Modbus TCP communications for the In-Sight vision systems/sensors running firmware version 5.3.0 or later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Refer to Modbus TCP Communications for available Modbus TCP implementations on different In-Sight firmware versions.
  • Modbus TCP Factory Interface (5.3.0 or later) contains the detailed information about mapping the In-Sight vision system's inputs and outputs into process memory.

Establishing Modbus TCP Communications

Before Modbus TCP communications can be established with an In-Sight vision system, the vision system must be configured to enable Modbus TCP Server, using the Network Settings dialog of the vision system. Once enabled, the Modbus TCP Server Settings dialog is used to configure the connection to PLC.

  1. Open In-Sight Explorer and connect to the desired In-Sight vision system.
  2. From the Sensor menu, open the Network Settings dialog.
  3. In the Industrial Ethernet Protocols section of the dialog, select Modbus TCP Server and press the Settings button to launch the Modbus TCP Server Settings dialog.
  4. Configure the Max Connections and Idle Timeout controls.
  5. Restart the In-Sight vision system, and the Modbus TCP Server service will be enabled upon completion of the power cycle.

Configuring the In-Sight Vision System to Receive Image Acquisition Triggers

It is possible to trigger the vision system to acquire images from the PLC. Setting the Trigger parameter in the AcquireImage function to Industrial Ethernet enables the PLC to trigger the vision system when Modbus TCP Server communication is enabled.

  1. Open the AcquireImage function's property sheet.
  2. Set the Trigger parameter to Industrial Ethernet.
  3. Place the In-Sight vision system Online.

  4. An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Vision Control Block, or by monitoring the Trigger Ready, Trigger Ack and Missed Acq bits in the Vision Status Block.

    Note: The Modbus TCP Factory Interface (5.3.0 or later) topic contains detailed information about mapping the In-Sight vision system's inputs and outputs into process memory.

Getting Data From an In-Sight Vision System

In order to get data from the In-Sight Explorer spreadsheet to a PLC, the data must be pushed into the Modbus TCP stack by using the WriteResultsBuffer function. This function takes a buffer of data created by the FormatOutputBuffer function and writes the data to the configured Modbus TCP stack. The PLC can then read the data with Modbus TCP read commands.

  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatOutputBuffer dialog, click on the Add button. From the Select Output Data dialog, select the data item to output.
  3. If there is additional data to be sent, again, from the FormatOutputBuffer dialog, click on the Add button. Select the additional data to transfer.
  4. Close the FormatOutputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteResultsBuffer function, from the right pane, to insert it into the spreadsheet.
  6. Set the WriteResultsBuffer function's Protocol parameter to 3 = Modbus TCP Server, and the Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.
  7. Optionally, set the Result Code parameter as a cell reference to a cell in the spreadsheet to retrieve the result code with the inspection results.

Sending Data to an In-Sight Vision System

In order to send data from the PLC to the In-Sight Explorer spreadsheet, the data must be pulled from the Modbus TCP stack by using the ReadUserDataBuffer function. This function takes the data format created within the FormatInputBuffer function, reads the data received from the PLC, and formats this data into the In-Sight Explorer spreadsheet.

Note: In order to trigger the In-Sight vision system to read the user data from the PLC, the Set User Data bit in the Vision Control Block must be triggered from the PLC.
  1. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.
  2. From the FormatInputBuffer dialog, click on the Add button and add the data items desired to the list.
  3. Close the FormatInputBuffer dialog by clicking the OK button.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadUserDataBuffer function, from the right pane, to insert it into the spreadsheet .
  5. Set the ReadUserDataBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.

  6. Set the ReadUserDataBuffer function's Protocol parameter to 3 = Modbus TCP Server.

  7. Once the functions have been implemented, place the In-Sight vision system Online to test the configuration.


Modbus TCP Factory Interface (5.3.0 or later)

This topic covers the Modbus TCP communication protocol for In-Sight vision systems/sensors running firmware version 5.3.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

Modbus TCP Data Blocks

The defined data blocks allow you to control where the vision system is reading and writing data to and from the PLC. For easier application setup, the various control and status bits required for command functionality are grouped into contiguous blocks, which can be processed together.

Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Vision Control | 0 | Set Offline | Reserved |  | Execute Command | Inspection Results Ack | Buffer Results Enable | Trigger | Trigger Enable
 | 1 | Reserved
 | 2 | Reserved |  |  |  | Clear Exposure Complete | Clear Error | Initiate String Command | Set User Data
 | 3 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
Vision Status | 0 | Online | Offline Reason |  |  | Missed Acq | Reserved | Trigger Ack | Trigger Ready
 | 1 | Error | Command Failed | Command Completed | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | System Busy
 | 2 | Reserved |  |  | Job Pass | Exposure Complete | String Command Error | String Command Ack | Set User Data Ack
 | 3 | Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0
Block | Word |
Input | 0 | Command
 | 1 - 2000 | User Data
Output | 0 | Current Job ID
 | 1 | Error Code
 | 2 | Acquisition ID
 | 3 | Inspection ID
 | 4 | Inspection Result Code
 | 5 - 2004 | Inspection Results
String Command | 0 | String Command Length
 | 1 - 960 | String Command
String Command Result | 0 | Result Code
 | 1 | String Command Result Length
 | 2 - 961 | String Command Result

Vision Control Block

Byte 0

Bit | Name | Description
7 Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.
6-5 | Reserved | Unused.
4 | Execute Command | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.
3 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit is set by the PLC to acknowledge that it has received the Inspection Count, Inspection Result Code and Inspection Results data. The next set of inspection results is then sent to the PLC. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty.
2 | Buffer Results Enable | When this bit is set, the Inspection Count, Inspection Result Code and Inspection Results fields are held constant until they are acknowledged by setting the Inspection Results Ack bit. Up to eight inspections are held in the In-Sight vision system's buffer. The vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack bit is cleared and there is a new set of results sent to the PLC, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the PLC, the Results Valid bit remains cleared.
1 Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.

  • The AcquireImage function's Trigger parameter is set to External, Network or Industrial Ethernet.

    Note: The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.
0 | Trigger Enable | This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

Byte 1

Bit | Name | Description
7-1 | Reserved | Unused.

Byte 2

Bit | Name | Description
7-4 | Reserved | Unused.
3 | Clear Exposure Complete | While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.
2 | Clear Error | When this bit is set, it will clear the Error and Error Code signals; the Clear Error bit should be held high until the Error bit has been cleared. If an error has been queued, clearing this bit will cause the Error and Error Code signals to be set to the next queued error code.
1 | Initiate String Command | When this bit is set, it will read the data from the String Command field and execute the string command. Upon reading the command, the String Cmd Ack bit will be set. This bit should be held High until the vision system sets the String Cmd Ack bit to ensure that the vision system has received the command.
0 | Set User Data | This command is used by the PLC to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

Byte 3

Bit | Name | Description
7 | Soft Event 7 | Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.
6 | Soft Event 6
5 | Soft Event 5
4 | Soft Event 4
3 | Soft Event 3
2 | Soft Event 2
1 | Soft Event 1
0 | Soft Event 0

Vision Status Block

Byte 0

Bit | Name | Description
7 | Online | This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.
6-4 Offline Reason This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:
Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.
3 Missed Acq Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
2 | Reserved | Unused.
1 Trigger Ack Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.
Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.
0 Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet, and the vision system is not currently acquiring an image.

The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

Byte 1

Bit | Name | Description
7 | Error | This bit is set when an error has occurred, which is defined in the Error Code field.
6 | Command Failed | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
5 | Command Completed | When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.
4 | Command Executing | This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.
3 Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.
2 Results Buffer Overrun

This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer. The ninth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.
1 | Inspection Completed | This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.
0 System Busy

Set when the vision system is running a job, loading a job or responding to user input.

Byte 2

Bit | Name | Description
7-5 | Reserved | Unused.
4 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
3 | Exposure Complete | This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.
2 | String Command Error | This bit indicates whether or not the result of the previous string command returned a failure code.
1 | String Command Ack | This bit is set when the vision system completes processing of a command and generates a response to the command. After the vision system has set this bit, the PLC can safely read the string command response data. The bit will be reset after the PLC clears the Initiate String Command bit. The PLC should clear the Initiate String Command bit and wait for the String Command Ack bit to return to a Low state before initiating a new command.
0 | Set User Data Ack | This bit is set to acknowledge completion of the Set User Data command.

Byte 3

Bit | Name | Description
7 | Soft Event Ack 7 | These bits are used to indicate that the Soft Event command was received.
6 | Soft Event Ack 6
5 | Soft Event Ack 5
4 | Soft Event Ack 4
3 | Soft Event Ack 3
2 | Soft Event Ack 2
1 | Soft Event Ack 1
0 | Soft Event Ack 0

Output Block

Note: Data defined in the Format Output Buffer dialog will appear in the "Inspection Results" field (Word 5 - 2000) of the Output Block. For more information, see Format Input/Output Buffer Dialogs.

Word 0

Name | Description
Current Job ID | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Word 1

Name Description
Error Code

A 16-bit numeric representation of the error that has occurred:

Code | Error | Description
0x0000 | No Error | No error occurred.
0x0100 | Trigger set while disabled | Occurs when the Trigger bit is set while the Trigger Enable bit is cleared or the AcquireImage function's Trigger parameter is not set to External, Network or Industrial Ethernet.
0x0101 | Trigger set while Offline | Occurs when the Trigger bit is set while the vision system is Offline.
0x0400 | Already Executing Error | Occurs when the Execute Command bit is set and the Executing bit is still High.
0x0401 | Job load requested while Online | Occurs when a Job Load command is issued while the vision system is Online.
0x0402 | Job load requested does not exist on the camera | Occurs when a JobID sent in the Command field does not exist as a prefix for any job in the camera file system. For example, if you send Command = 123 and no job on the camera contains 123xxxxx.job.

Word 2

Name | Description
Acquisition ID | This ID increments at the beginning of an acquisition and when the Trigger Ack bit is set; can be used to synchronize an acquisition with its Inspection Results.

Word 3

Name | Description
Inspection ID | The acquisition ID associated with this set of results.

Word 4

Name | Description
Inspection Result Code | The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Word 5 - 2004

Name | Description
Inspection Results | Inspection result data written from the spreadsheet, using the WriteResultsBuffer function. For more information, see WriteResultsBuffer.

Input Block

Note: Data defined in the Format Input Buffer dialog will appear in the "User Data" field (Word 1 - 2000) of the Input Block.

Word 0

Name | Description
Command | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.

Word 1 - 2000

Name | Description
User Data | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function. For more information, see ReadUserDataBuffer and ReadLatchedUserDataBuffer.

String Command Block

Word 0

Name | Description
String Command Length | The length of the Native Mode command. For more information, see Native Mode Commands.

Word 1 - 960

Name | Description
String Command | The Native Mode command to be processed by the vision system. For more information, see Native Mode Commands.

String Command Result Block

Word 0

Name Description
Result Code

The response code for the Native Mode command, which can be used to determine if the command was successful, or failed.

Note: Each Native Mode command returns a 1 for a successful execution, while each command has specific error codes for cases of failure. Review the individual Native Mode command topics for more information about the failure codes. For more information, see Native Mode Commands.

Word 1

Name | Description
String Command Result Length | The length of the Native Mode command's Response Data, in bytes.

Word 2 - 961

Name | Description
String Command Result | The Native Mode command's result string, an ASCII string representation of the data returned by the command.

Modbus TCP Address Map

Note:
  • The Vision Control Block, Vision Status Block, Output Block and String Command Result Block are mapped to 2 separate locations. The reason for this double-mapping is that some PLCs can only access the Holding Register portion of the address space (i.e. they only support function codes 3 and 16). The double-mapping allows those PLCs that can only access Holding Registers to successfully access all signals and data. However, PLCs that support the full function code set can access these blocks in their optimal address map locations. Please note that you should access either the optimal block location or the Holding Register location, but not both.
  • Natively, the Modbus TCP protocol uses zero based offsets for addressing. The address map diagram below shows the block locations using zero based offset. If your PLC uses Schneider form addressing, simply add the zero based offsets shown in the address map to the base Schneider address. For example, to access the "Input Block" using Schneider form addressing, you must add the "Input Block" offset (2000) to the Schneider base address for Holding Registers (400000). Therefore, in Schneider form, the Input Block starts at 402000.

Modbus TCP supports 4 distinct address spaces. There are 2 bit address space and 2 word (16-bit) address spaces.

  • Coil: Bit type address space. Output from PLC, input to vision system/sensor
  • Discrete Input: Bit type address space. Input to PLC, output from vision system/sensor
  • Holding Register: Word type address space. Both Input & Output from vision system/sensor
  • Input Register: Word type address space. Input to PLC, output from vision system/sensor
Block Name | Address Space | Offset | Schneider Form Addressing | Quantity
Vision Control | Coil | 0 | 000000 – 000031 | 1 – 32
 | Holding Register | 0 | 400000 – 400001 | 1 – 2
Vision Status | Discrete Input | 0 | 100000 – 100031 | 1 – 32
 | Holding Register | 100 | 400100 – 400101 | 1 – 2
Input | Holding Register | 2000 | 402000 – 404000 | 1 – 2001
Output | Holding Register | 7000 | 407000 – 409004 | 1 – 2005
 | Input Register | 2000 | 302000 – 304004 | 1 – 2005
String Command | Holding Register | 1000 | 401000 – 401999 | 1 – 1000
String Command Result | Input Register | 1000 | 301000 – 301999 | 1 – 1000
 | Holding Register | 6000 | 406000 – 406999 | 1 – 1000
Address (000000)
Coil Read / Write
(0x01 ,0x05, 0x0F) 		Address (100000)
Discrete Input Read
(0x02) 		Address (400000)
Holding Read / Write
(0x03 ,0x10) 		Address (300000)
Input Register Read
(0x04)

Supported Modbus TCP Commands

Code | Description | Address Space
0x01 | Read Coils: This function code is used to read the state of 1 to 2000 contiguous coils in a remote device. This command would be used by a PLC to read data from the vision system/sensor. | Coil
0x05 | Write Single Coil: This function code is used to write a single output coil to either ON or OFF in a remote device. This command would be used by a PLC to write data to the vision system/sensor. | Coil
0x0F | Write Multiple Coils: This function code is used to write a sequence of 1 to 1968 coils to either ON or OFF in a remote device. This command would be used by a PLC to write data to the vision system/sensor. | Coil
0x02 | Read Discrete Inputs: This function is used to read the state of 1 to 2000 contiguous discrete inputs in a remote device. This command would be used by a PLC to read data from the vision system/camera. | Discrete Input
0x03 | Read Holding Registers: This function is used to read the contents of a contiguous block of 1 to 125 holding registers in a remote device. This command would be used by a PLC to read data from the vision system/sensor. | Holding Register
0x10 | Write Multiple Registers: This function code is used to write from 1 to 123 contiguous registers in a remote device. This command would be used by a PLC to write data to the vision system/sensor. | Holding Register
0x04 | Read Input Registers: This function code is used to read from 1 to 125 contiguous input registers in a remote device. This command would be used by a PLC to read data from the vision system/sensor. | Input Register


Modbus Reference Number Examples

Note: Direct Cell Access is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. Refer to Firmware Versions for a complete list of models and supported firmware versions.

To reference a cell within the In-Sight spreadsheet from a Modbus device, the cell must be converted to a 2-byte Modbus Reference Number, as follows:

  • High 6 bits (Bits 11 to 15) = Column (A-Z)
  • Low 10 bits (Bits 0 to 10) = Row (0-399)

Example 1

To reference cell G273, the Reference Number would be converted as follows:

  1. Convert the cell's column and row to a decimal number.

    G = 06 {A = 0, B = 1, C = 2, ..., X = 23, Y = 24, Z = 25}

    273 = 273

  2. Convert the decimal numbers to binary (read right-to-left)

    Note: If the binary number is not 6 bits long for the column or 10 bits long for the row, the remaining bits in the final data byte must be filled with zeros (toward the high order end of the byte).

    G = 06 = 000110 (6 bits)

    273 = 273 = 0100010001 (10 bits)

    Bit

    15

    14

    13

    12

    11

    10

    9

    8

    7

    6

    5

    4

    3

    2

    1

    0

    0

    0

    0

    1

    1

    0

    0

    1

    0

    0

    0

    1

    0

    0

    0

    1

  3. This forms a 16-bit word, which is split into two 8-bit values.

    00011001 00010001

  4. Convert these two 8-bit values to their decimal equivalent.

    00011001 = 25

    00010001 = 17

  5. You now have the high byte (25 decimal) and the low byte (17 decimal) reference number.

Example 2

To reference cell N23, the Reference Number would be converted as follows:

  1. Convert the cell's column and row to a decimal number.

    N = 13

    23 = 23

  2. Convert the decimal numbers to binary (read right-to-left).

    N = 13 = 001101

    23 = 23 = 0000010111

    Bit

    15

    14

    13

    12

    11

    10

    9

    8

    7

    6

    5

    4

    3

    2

    1

    0

    0

    0

    1

    1

    0

    1

    0

    0

    0

    0

    0

    1

    0

    1

    1

    1

  3. This forms a 16-bit word, which is split into two 8-bit values.

    00110100 00010111

  4. Convert these two 8-bit values to their decimal equivalent.

    00110100 = 52

    00010111 = 23

  5. You now have the high byte (52 decimal) and the low byte (23 decimal) reference number.

Example 3

To reference cell Z399, the Reference Number would be converted as follows:

  1. Convert the cell's column and row to a decimal number.

    Z = 25

    399 = 399

  2. Convert the decimal numbers to binary (read right-to-left)

    N = 25 = 011001

    399 = 399 = 0110001111

    Bit

    15

    14

    13

    12

    11

    10

    9

    8

    7

    6

    5

    4

    3

    2

    1

    0

    0

    1

    1

    0

    0

    1

    0

    1

    1

    0

    0

    0

    1

    1

    1

    1

  3. This forms a 16-bit word, which is split into two 8-bit values.

    01100101 10001111

  4. Convert these two 8-bit values to their decimal equivalent.

    01100101 = 101

    10001111 = 143

  5. You now have the high byte (101 decimal) and the low byte (143 decimal) reference number.


Job Load by Name Using Modbus TCP Factory Interface

Note: The Job load by name feature is only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  1. Place the camera offline by setting the Set Offline bit high.

    Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Vision

    Control

             0

    Set

    Offline

             Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

    Initiate

    String

    Command

    Set

    User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0

    Vision

    Status

             0 Online Offline Reason

    Missed

    Acq

             Reserved

    Trigger

    Ack

    Trigger

    Ready
    1 Error

    Command

    Failed

    Command

    Completed

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    2 Reserved

    Job

    Pass

    Exposure

    Complete

    String

    Command

    Error

    String

    Command

    Ack

    Set

    User

    Data

    Ack
    3

    Soft

    Event

    Ack 7

    Soft

    Event

    Ack 6

    Soft

    Event

    Ack 5

    Soft

    Event

    Ack 4

    Soft

    Event

    Ack 3

    Soft

    Event

    Ack 2

    Soft

    Event

    Ack 1

    Soft

    Event

    Ack 0

    Vision Control Block

    Byte 0

    Bit Name Description
    7 Set Offline

    When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.

  2. Write the Job Load by Name command into Word 0 of the Input block. The Job Load by Name command is value 0x4000.

    Block | Word

    Input

             0 Command
    1 - 2000 | User Data

    Output

             0 Current Job ID
    1 | Error Code
    2 | Acquisition ID
    3 | Inspection ID
    4 | Inspection Result Code
    5 - 2004 | Inspection Results

    String

    Command

             0 String Command Length
    1 - 960 | String Command

    String

    Command

    Result

             0 Result Code
    1

    String Command Result Length
    2 - 961 | String Command Result

    Input Block

    Word 0

    Name Description
    Command

    This is a 16-bit integer used to either indicate the Job ID number (0-999). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate.

  3. Write the job name to Word 1 - 2000 (UserData) of the Input block. The job name must be null terminated (i.e. a 0 must be in the byte immediately following the job name).

    Block | Word

    Input

             0 Command
    1 - 2000 | User Data

    Output

             0 Current Job ID
    1 | Error Code
    2 | Acquisition ID
    3 | Inspection ID
    4 | Inspection Result Code
    5 - 2004 | Inspection Results

    String

    Command

             0 String Command Length
    1 - 960 | String Command

    String

    Command

    Result

             0 Result Code
    1

    String Command Result Length
    2 - 961 | String Command Result

    Input Block

    Word 1 - 2000

    Name | Description
    User Data | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

  4. Set the Execute Command bit in the Vision Control block.

    Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Vision

    Control

             0

    Set

    Offline

             Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

    Initiate

    String

    Command

    Set

    User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0

    Vision

    Status

             0 Online Offline Reason

    Missed

    Acq

             Reserved

    Trigger

    Ack

    Trigger

    Ready
    1 Error

    Command

    Failed

    Command

    Completed

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    2 Reserved

    Job

    Pass

    Exposure

    Complete

    String

    Command

    Error

    String

    Command

    Ack

    Set

    User

    Data

    Ack
    3

    Soft

    Event

    Ack 7

    Soft

    Event

    Ack 6

    Soft

    Event

    Ack 5

    Soft

    Event

    Ack 4

    Soft

    Event

    Ack 3

    Soft

    Event

    Ack 2

    Soft

    Event

    Ack 1

    Soft

    Event

    Ack 0

    Vision Control Block

    Byte 0

    Bit | Name | Description
    4 | Execute Command | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.

  5. Wait for Command Complete or Command Failed to be set before clearing the Execute Command bit and the Offline bit.

    Block | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Vision

    Control

             0

    Set

    Offline

             Reserved

    Execute

    Command

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

             Trigger

    Trigger

    Enable
    1 | Reserved
    2 Reserved

    Clear

    Exposure

    Complete

    Clear

    Error

    Initiate

    String

    Command

    Set

    User

    Data
    3

    Soft

    Event

    7

    Soft

    Event

    6

    Soft

    Event

    5

    Soft

    Event

    4

    Soft

    Event

    3

    Soft

    Event

    2

    Soft

    Event

    1

    Soft

    Event

    0

    Vision

    Status

             0 Online Offline Reason

    Missed

    Acq

             Reserved

    Trigger

    Ack

    Trigger

    Ready
    1 Error

    Command

    Failed

    Command

    Completed

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    2 Reserved

    Job

    Pass

    Exposure

    Complete

    String

    Command

    Error

    String

    Command

    Ack

    Set

    User

    Data

    Ack
    3

    Soft

    Event

    Ack 7

    Soft

    Event

    Ack 6

    Soft

    Event

    Ack 5

    Soft

    Event

    Ack 4

    Soft

    Event

    Ack 3

    Soft

    Event

    Ack 2

    Soft

    Event

    Ack 1

    Soft

    Event

    Ack 0

    Vision Status Block

    Byte 1

    Bit | Name | Description
    6 | Command Failed | This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
    5 Command Completed When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.
    Note: The camera clears the Command Completed bit when the Execute Command bit goes low.
    4 | Command Executing | This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.


POWERLINK Communications

Note:
  • POWERLINK is only supported by In-Sight 70xx - 74xx series vision systems running In-Sight firmware version 4.7.2 or later, and In-Sight Explorer software version 4.7.2 or later. It is not supported with firmware version 5.1.0 or later.
  • POWERLINK is not supported on the following In-Sight 70xx - 74xx series color vision systems: In-Sight 7010C, In-Sight 7200C, In-Sight 7400C and In-Sight 7402C.
  • In-Sight vision systems are only supported in B&R Automation Studio, version 3.090 or later, and on Automation Runtime version 3.08 or later.

POWERLINK and In-Sight Vision Systems

POWERLINK is an industrial Ethernet protocol for use in time-critical systems. The POWERLINK Ethernet protocol utilizes a Managing Node (MN), such as a PLC or industrial PC, to divide the Ethernet bandwidth into fixed time cycles (200 µs to 10000 µs). The other devices operating on the network, such as an In-Sight vision system, are operated as Controlled Nodes (CN) and are only allowed to transmit data in response to a message from the MN.

During each cycle, the MN produces data destined for each CN and each CN responds with the data destined for other devices on the network. The data is transferred between nodes using Isochronous Messaging (messaging with guaranteed determinism), and Asynchronous Messaging (messaging without a guarantee of determinism). After all the devices on the network have been synchronized, an asynchronous period is initiated by the MN, which allows one device to send standard TCP/IP traffic on the network.

Note: When connecting POWERLINK nodes together, because the devices never compete for network bandwidth, it is recommended that standard Ethernet hubs are used instead of switches, due to their reduced latency.

Every device on a POWERLINK network is identified by a node ID number (1-240). The MN is always node ID 240, and the CNs may have any of the other node IDs from 1 to 239. The node ID number is combined with the fixed IP subnet of 192.168.100.<NodeID>, which assigns each device on the network a fixed IP address within the POWERLINK network. This IP address can also be used to communicate with other devices outside of the POWERLINK network.

Note:
  • If a POWERLINK enabled vision system is taken off the POWERLINK network and placed on a standard Ethernet network, Ethernet communications may lock up and bandwidth may be limited to 1Mbps. To edit a job, disable POWERLINK communications while on the standard Ethernet network.
  • If an In-Sight vision system is on a POWERLINK network and connected to In-Sight Explorer, attempting to download a change to the PLC, or performing a software reboot of the PLC, may cause the vision system to no longer be able to connect to In-Sight Explorer. It is recommended that you disconnect the vision system from In-Sight Explorer before performing any changes or rebooting the PLC. Power cycle the vision system if this situation has been encountered to restore the connection to In-Sight Explorer.

POWERLINK Cycle

The POWERLINK network is divided into fixed time slices, which are called "cycles" (200 µs to 10000 µs). Each cycle includes a period of Isochronous message transfer, and, if time permits, Asynchronous message transfer. At the beginning of each cycle, the MN broadcasts a Start of Cycle (SoC) message to the network, indicating that the Isochronous phase of the cycle is beginning. After sending the SoC message, the MN proceeds to send a Poll Request (PReq) to each configured CN on that cycle. Each CN responds with a Poll Response (PRes) message. The PReq and PRes messages are used to produce data on the network.

On a POWERLINK network, CNs can perform cross-traffic communication, i.e. exchanging process data with each other, without having to first go through the MN. This type of configuration allows one PLC to be the POWERLINK MN, while a second PLC acts as a CN and controls the In-Sight vision system's acquisition. In-Sight firmware supports cross-traffic communication from two CNs, beside the MN, and is capable of receiving up to 100 bytes of data from each node.

Note: Cross-traffic support requires In-Sight 4.8.0 or later firmware.

After every CN's data has been transferred, the MN sends a Start of Asynchronous (SoA) message to the network, indicating that the Asynchronous phase of the cycle is beginning. During this time, one node (indicated by data contained in the SoA frame) is allowed to transmit one packet to the network. If that node has more data to transmit than the cycle's period has capacity for, the transmission will be spread out over the Asynchronous phase of several cycles.

Asynchronous Data Transfer

The Asynchronous data transfer capabilities of the POWERLINK network are critically important to the In-Sight vision system. The Asynchronous phase is used to perform the following tasks:

  • Configuring and monitoring a vision system using In-Sight Explorer
  • Transferring images and data to In-Sight Explorer or a Cognex VisionView while Online
  • Transferring images to an FTP server via the WriteImageFTP function

The two configuration settings for the POWERLINK network that have the greatest affect on Asynchronous data throughput are the Maximum Transmission Unit (MTU) setting and the Cycle Time.

MTU

The MTU for Asynchronous Packets on a POWERLINK network ranges from 300 bytes to 1500 bytes. By default, B&R PLCs set the MTU to 300 bytes. Increasing the default MTU requires that additional time be reserved in each cycle for Asynchronous data transfers. For example, the default MTU requires that 27 µs be reserved for Asynchronous data transfer, while the maximum size (1500 bytes) would require that 123 µs be reserved.

Note: If the MTU value for Asynchronous Packet transfers is not set to the same MTU value being used by the POWERLINK network, TCP/IP communications will not function correctly.

Cycle Time

The Cycle Time also limits Asynchronous data transfers. The POWERLINK network is configured such that only one Asynchronous packet can be transferred per cycle, so decreasing the Cycle Time allows more Asynchronous packets to be transferred on the network. One of the most common POWERLINK network configurations has a 400 µs Cycle Time, which translates into 2500 cycles per second, or 2500 possible Asynchronous frames transferred per second.

Ideal MTU and Cycle Time Settings for In-Sight Vision Systems

Due to the fact that POWERLINK relies upon Ethernet to transmit data, especially the asynchronous portion, understanding how to calculate the total bandwidth available on the POWERLINK network is an important determinant in establishing optimal performance. The total bandwidth is shared between all CNs communicating via asynchronous transfers on the POWERLINK network.

A general formula for calculating the total bandwidth available on the POWERLINK network is:

  • Bandwidth (Mbps) = MTU * 8/Cycle Time (µs)

Cognex has determined that optimal settings for an In-Sight vision system on the POWERLINK network require an MTU of 1500 bytes, and a Cycle Time of 400 µs. Any significant decrease in the MTU size or an increase in the Cycle Time will result in substantially reduced performance (for the three bullets, listed in the above section). Please consult the B&R Microsoft Excel spreadsheet (powerlink_cycletime_calculations.xls) for calculating Cycle Time, included with the B&R Automation Studio application.

Note:

The following In-Sight application parameters may impact the performance of the connection:

  • Acquired image and image update settings, such as acquiring full images or sending and recording full resolution images. Within a limited bandwidth environment, the goal is to reduce the rate at which images are acquired. This can be accomplished by:
    • Setting the AcquireImage function's Start Row and Number of Rows parameters to create partial acquisitions. For more information, see AcquireImage.

    • From the Record tab of the Record/Playback Options dialog, setting the Image Resolution parameter to Half or Quarter. For more information, see Record/Playback Options Dialog: Spreadsheet View.

      Configuring the settings in this manner will create more bandwidth for background services, if necessary.

  • Sending images with the WriteImageFTP or WriteImageSFTP functions, regardless of the image resolution settings, will reduce bandwidth available for In-Sight Explorer. For more information, see WriteImageFTP and WriteImageSFTP.

  • If the POWERLINK Cycle Time is set to less than 500µs, this will limit the number of available User Data channels to 16 and the Inspection Results to 24. If the Cycle Time setting is too low, or too much data is configured to be transmitted, the POWERLINK connection will fail.

POWERLINK Network Gateway and In-Sight Vision Systems

B&R PLCs have the ability to act as a gateway for TCP/IP traffic between devices on the POWERLINK network and devices connected through the standard Ethernet port. In-Sight Explorer has the ability to add the POWERLINK network into the In-Sight Network pane. The Explorer Remote Subnet List dialog (accessible from the System menu) can be used to add the POWERLINK network and configure the subnet information. After establishing this configuration, the In-Sight Network pane will display the In-Sight vision systems on the POWERLINK subnet.

Configure In-Sight Vision Systems for POWERLINK Communications

This section describes how to connect a B&R PLC to an In-Sight vision system using POWERLINK communications.

Note:
  • These steps assume that the In-Sight vision system has a job loaded that contains data ready to be transmitted via the POWERLINK network.
  • For application development, Cognex recommends connecting directly to the In-Sight vision system installed on the factory line. This will allow for faster image updates, which makes it easier to adjust focus, align the image and set up the application. Once the application has been developed, save the job and then enable POWERLINK and add a remote subnet. The remote subnet will allow the vision system to be monitored from In-Sight Explorer for potential troubleshooting and additional application development.

Enable POWERLINK Communications on an In-Sight Vision System

Before the In-Sight vision system can be placed on the POWERLINK network, the vision system must be configured to enable POWERLINK, using the Network Settings dialog of the In-Sight vision system.

Note: These steps assume that the POWERLINK network is already functioning, with other devices on the network, and that the MN is a B&R PLC.
  1. Connect the In-Sight vision system to be placed on the POWERLINK network directly to the PC running In-Sight Explorer.
  2. Open In-Sight Explorer and connect to the desired In-Sight vision system.
  3. From the Sensor menu, open the Network Settings dialog.
  4. In the Industrial Ethernet Protocols section of the dialog, select POWERLINK and click the Settings button to launch the POWERLINK Settings dialog.
  5. The POWERLINK Settings dialog is used to define the Node ID of the In-Sight vision system.
  6. At the message prompt, restart the In-Sight vision system, and afterward the POWERLINK protocol will be enabled upon the completion of the power cycle.
  7. Disconnect the vision system from the PC and connect the vision system to the POWERLINK network.

Establish a Cyclic Connection to an In-Sight Vision System

To help integrate In-Sight vision systems onto the POWERLINK network, Cognex has created the In-Sight-7000.xdd file (0000031D_In-Sight-7000.xdd), to import into Automation Studio. The In-Sight-7000.xdd file describes the network interface of the In-Sight vision system to a POWERLINK Master Node, to facilitate the transfer of data over a POWERLINK network.

  1. From within Automation Studio, go to the Tools menu and select the Import Fieldbus Device option.
  2. Navigate to the .xdd file, included with In-Sight Explorer 4.7.1 (e.g., C:\Program Files\Cognex\In-Sight\In-Sight Explorer 4.7.1\XDD), and import the file (0000031D_In-Sight-7000.xdd).

  3. After the In-Sight-7000.xdd file has been imported, the In-Sight vision system will need to be added to the POWERLINK network and assigned a Node ID.

    Note: Please consult the B&R Automation Studio Help Explorer POWERLINK Help Contents for specific information about adding 3rd-party devices to Automation Studio.
  4. Once the In-Sight vision system has been successfully added, enable the Channels that will be transmitted cyclically on the POWERLINK network. Set the Cyclic transmission Value to Write (for output to the vision system) or Read (for input from the vision system) to transfer the data in the Channel once communications with the In-Sight vision system are established.

  5. The enabled Channels can be mapped to system variables, as well.

    Note: Bit-level data, such as the Control and Status blocks, must be accessed by appending the bit position designator to the double-integer variable name. Direct mapping of the bit variables is not possible in this release.
  6. With the project properly configured, it is downloaded to the B&R PLC, and the PLC initiates the cyclic transfer of data with the In-Sight vision system.
  7. Verify that the In-Sight vision system is performing correctly by going into Monitor mode in Automation Studio, opening the I/O mapping of the vision system and validate that the ModuleOK channel is TRUE.

Configure the AcquireImage Trigger Parameter

With the In-Sight vision system integrated into the POWERLINK network, it is possible to trigger the vision system to acquire images over the POWERLINK network. Setting the Trigger parameter in the AcquireImage function to Industrial Ethernet enables a hardware assisted trigger mode when POWERLINK is enabled. For more information, see AcquireImage.

  1. Open the AcquireImage function's property sheet.
  2. Set the Trigger parameter to Industrial Ethernet.
  3. Place the In-Sight vision system Online.
  4. An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Control field of the Inspection Control Object, or monitored through the Trigger Ready, Trigger Ack, Acquiring and Missed Acq bits in the Status structure of the Inspection Status Object.
  5. While in Automation Studio, from the Inspection Control Channel, set the Trigger Enable bit to True and toggle the Trigger bit from False to True, while the Trigger Ready bit is set to True.

Get Data from an In-Sight Vision System

To get data from the In-Sight Explorer spreadsheet to a B&R PLC, the data must be written to the POWERLINK network by using the WriteResultsBuffer function. This function takes a buffer of data created by the FormatOutputBuffer function and writes the data to the configured data table of the B&R PLC. This data is then transferred during the next update cycle, which is synchronized, at most, every 4ms, regardless of the Cycle Time.

The following steps explain how to format the data that will be sent from an In-Sight vision system to a B&R PLC:

  1. To begin, using In-Sight Explorer, create a new job.
  2. From the Palette's Snippets tab, add these two Snippets to the spreadsheet: Acquisition > AcqCounter and Math & Logic > Random.
  3. Open the AcquireImage cell and set the Trigger parameter to Continuous.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  5. From the FormatOutputBuffer dialog, click the Add button. This will initiate the cell selection mode; select the Scaled random number cell of the Random snippet.

  6. From the FormatOutputBuffer dialog, click the Add button again. This will initiate the cell selection mode; select the count cell of the AcqCounter snippet.

  7. Click the OK button to close the FormatOutputBuffer dialog.
  8. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click the Input/Output category, then double-click the WriteResultsBuffer function, from the right pane, to insert it into the spreadsheet.
  9. Set the WriteResultsBuffer function's Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.
  10. Place the In-Sight vision system Online.
  11. Verify that the In-Sight vision system is performing correctly by going into Monitor mode in Automation Studio, opening the I/O mapping of the vision system and validate that the ModuleOK channel is TRUE.

Send Data to an In-Sight Vision System

In order to send data from the B&R PLC to the In-Sight Explorer spreadsheet, the data must be pulled from the POWERLINK protocol stack by using the ReadUserDataBuffer function. This function takes the data format created within the FormatInputBuffer function, reads the data received from the B&R PLC, and formats this data into the In-Sight Explorer spreadsheet. In order to trigger the In-Sight vision system to read the user data from the B&R PLC, the Set User Data bit in the Control block must be triggered from the PLC. For more information, see Inspection Control Object (0x2000).

EXAMPLE: Send Data to an In-Sight Vision System

For this example, create a new job within In-Sight Explorer and then perform the following steps to configure the data that will be received by the B&R PLC.

  1. Open the AcquireImage cell and set the Trigger parameter to Continuous.

    Note: Continuous trigger mode is intended for demonstration purposes only. In Continuous trigger mode, the vision system acquires as many images as possible, and once an event is initiated from the PLC, the data transfer from the PLC to the vision system can be immediately observed. Once you are ready to deploy the vision system for run time operation, you will need to reconfigure the Trigger parameter based on the source of the image acquisition trigger.
  2. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.

  3. From the FormatInputBuffer dialog, click the Add button and add a 32-bit float and a 32-bit integer to the list.

  4. Click the OK button to close the FormatInputBuffer dialog.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click the Input/Output category, then double-click the ReadUserDataBuffer function, from the right pane, to insert it into the spreadsheet .
  6. Set the ReadUserDataBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  7. The Vision Data Access functions will automatically be added to the spreadsheet based on the fields added to the FormatInputBuffer function.
  8. Place the In-Sight vision system Online.
  9. Verify that the In-Sight vision system is performing correctly by going into Monitor mode in Automation Studio, and forcing data into the UserData fields.
  10. Set the Set User Data bit in the Control field of the Inspection Control Object.
  11. Clear the Set User Data bit in the Control field of the Inspection Control Object. Since the vision system is in Continuous trigger mode, the vision system is acquiring images, allowing the data transfer to be observed.

Add a POWERLINK Network to the In-Sight Network

Follow these steps to add a POWERLINK network to the In-Sight Network pane.

  1. On the System menu, click Remote Subnets.
  2. In the Explorer Remote Subnet List dialog, click the Add button to launch the Add Subnet dialog.
  3. In the Name field, enter a descriptive name for the subnet that will be added.
  4. In the IP Address field, the IP address should match the "POWERLINK NAT subnet" IP address programmed in the PLC for the POWERLINK network.
  5. In the Mask field, enter 255.255.255.0.
  6. If the network infrastructure is incapable of routing to the POWERLINK network, check the Use Custom Gateway option, and set the Gateway field to the IP address of the PLC on the standard Ethernet network. This will establish a route to the remote subnet in the PC's routing table.
  7. Click the OK button to accept the changes and close the Add Subnet dialog.
  8. The newly configured remote subnet will appear in the Explorer Remote Subnet List dialog. Click the OK button to close the dialog.
  9. The POWERLINK network will now be displayed in the In-Sight Network pane.

Disable POWERLINK Communications on an In-Sight Vision System

Follow these steps to disable an In-Sight vision system that was configured to operate on a POWERLINK network.

  1. From a PC running In-Sight Explorer, connect the In-Sight vision system to an available Ethernet port, set to DHCP, on the PC.
  2. On the System menu, click Add Sensor/Device to Network.
  3. In the Add Sensor/Device to Network dialog, select the In-Sight vision system, select the Obtain IP Address Automatically (DHCP) option and then click the Apply button.
  4. After a message prompt altering the successful change of the settings, the vision system should appear in the In-Sight Network pane.
  5. Open a connection to the vision system in either the Spreadsheet or EasyBuilder development environments.
  6. On the Sensor menu, click Network Settings to launch the Network Settings dialog.
  7. For the Industrial Ethernet Protocols, select None and then click the OK button.
  8. Restart the vision system to apply the changes.

POWERLINK Factory Interface


POWERLINK Factory Interface

POWERLINK Factory Interface

Note: POWERLINK is only supported by In-Sight 70xx - 74xx series vision systems running In-Sight firmware version 4.7.2 or later, and In-Sight Explorer software version 4.7.2 or later. It is not supported with firmware version 5.1.0 or later.

The data transferred between the POWERLINK Master Node and an In-Sight vision system during the isochronous phase is organized into five data channels. The Channels described below are mappable to the Process Data Object (PDO) for cyclic transfer over a POWERLINK network during the isochronous phase. The Channels from the POWERLINK Factory Interface provide a communication path to specific In-Sight vision system data buffers, for the exchange of data and vision system job management, acquisition and inspection control and status data.

Inspection Control Object (0x2000)

The Inspection Control Object is a pre-defined double-integer that enables the PLC to issue certain common In-Sight vision system commands, such as triggering the vision system, changing the vision system's job file and initiating Soft Events.

Index | Name | Type | Access | Notes
1 | Control | 32-bit integer | RW | The 32-bit Control field is mapped into the Control structure, which is described in the Control Structure Table, below.
2 | JobLoadID | 16-bit integer | RW | The ID number (1-999) of the job to load when the Initiate Job Load bit is set by the PLC.

Control Structure

When the Control field of the Inspection Control Object is configured for cyclic transfer, the individual bits of the Control Structure will be accessible in the PLC.

Note: In the current release, the Control field is exposed as a DWORD only (without bitwise labels).
Bit Name Description

0

Trigger Enable

This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

1

Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.

  • The AcquireImage function's Trigger parameter is set to Industrial Ethernet.

    Note: The Trigger parameter settings of Network or External may also be used, but they will add additional latency.

2

Buffer Results Enable

When this bit is set, the Inspection Count, Inspection Result Code and Inspection Results fields are held constant until they are acknowledged by setting the Inspection Results Ack bit. Up to eight inspections are held in the In-Sight vision system's buffer. The vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack bit is cleared and there is a new set of results sent to the PLC, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the PLC, the Results Valid bit remains cleared.

3

Inspection Results Ack

When the Buffer Results Enable bit is set, the Inspection Results Ack bit is set by the PLC to acknowledge that it has received the Inspection Count, Inspection Result Code and Inspection Results data. The next set of inspection results is then sent to the PLC. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty.

4

Initiate Job Load

When set, the vision system loads the job ID specified in the Job Load ID field.

Note: Do not set the Initiate Job Load bit while the In-Sight vision system is Online. Take the vision system Offline before setting the Initiate Job Load bit; otherwise the Job Load Failed bit will not be set.

5 -6

Reserved

Reserved for future implementations.

7

Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.

8 - 15

Reserved

 Reserved for future implementations.

16

Set User Data

This command is used by the PLC to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

17 - 18

Reserved

 Reserved for future implementations.

19

Clear Exposure Complete

While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.

20 - 23

Reserved

 Reserved for future implementations.

24 - 31

Soft Event 0 - 7

Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.

Inspection Status Object (0x2001)

The Inspection Status Object is also a pre-defined double integer block, which informs the PLC about the status of the In-Sight vision system, such as Trigger Ready, Inspecting, and Inspection Complete, for example, and provides additional diagnostic information, such as error statuses, Online/Offline status or missed acquisitions.

Index | Name | Type | Access | Notes
1 | Status | 32-bit integer | R | The 32-bit Control field is mapped into the Status structure, which is described in the Status Structure Table, below.
2 | CurrentJobID | 16-bit integer | R | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.
3 | AcquisitionID | 16-bit integer | R | The identifier is associated with the current acquisition. This identifier is set to the Acquisition ID when the Trigger Ack signal is asserted for an acquisition triggered using the Trigger bit.

Status Structure

When the Status field of the Inspection Status Object is configured for cyclic transfer, the individual bits of the Status Structure will be accessible in the PLC.

Note: In the current release, the Control field is exposed as a DWORD only (without bitwise labels).
Bit Name Description

0

Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Network Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Industrial Ethernet and the vision system is not currently acquiring an image.

The Trigger parameter settings of Network or External may also be used, but they will add additional latency.

1

Trigger Ack

Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared.

2

Acquiring

Set when an In-Sight vision system is currently acquiring an image, regardless how the acquisition was triggered.

3

Missed Acq

Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.

4 - 6

Offline Reason

This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:

Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.

7

Online

This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.

8

Inspecting

This bit is set when an In-Sight vision system is running a job.

9

Inspection Completed

This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.

10

Results Buffer Overrun

 This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results by setting the Inspection Results Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer, and will overwrite the eighth inspection in the buffer. The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.

11

Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.

12

Job Loading

This bit is set when a job load was initiated through this protocol.

13

Job Load Complete

This bit is toggled on the completion of a job load operation initiated by this protocol.

14

Job Load Failed

 This bit is set when the last job load attempt failed. It is cleared after a successful job load, initiated by the MN.

15

Reserved

 Reserved for future implementations.

16

Set User Data Ack

 This command is used by the PLC to indicate to the In-Sight vision system that it should transfer the User Data field into a holding buffer for consumption by the vision system.

17 -18

Reserved

 Reserved for future implementations.

19

Exposure Complete

This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.

20 Job Pass

This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

21 - 23

 Reserved Reserved for future implementations.

24 - 31

 Soft Event Ack 0 - 7

These bits are used to indicate that the Soft Event command was received.

Inspection Results (0x2010)

The Inspection Results provide the acquisition ID and the length of the data in the Inspection Results Data block.

Index | Name | Type | Access | Notes
1 | InspectionID | 32-bit integer | R | The acquisition ID associated with this set of results.
2 | InspectionResultCode | 16-bit integer | R | Currently unused; always 0.
3 | InspectionResultLength | 16-bit integer | R | The length of the inspection results data.

Inspection Results Data (0x2011)

The Inspection Results Data Channel is a configurable series of registers that are used for communicating data from the vision inspection to the PLC. For example, the PLC may want to know what the overall "Pass/Fail" result, the result of a measurement, the X, Y and angle position of a part or the result of a bar code. This data is sent via the Inspection Results Data Channel.

Index | Name | Type | Access | Notes
1 - 64 | InspectionResultsNN | 32-bit integer | R | Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.

User Data (0x2021)

The User Data Channel is a configurable series of registers used for sending values from the PLC to the In-Sight vision system. For example, a tolerance setting can be sent from the PLC to the vision system, so that it applies the applicable tolerance when inspecting a certain part.

The User Data Channel can also be used to write individual 32-bit integer values to the User Data Block, or assign them to the Process Data Object (PDO) for cyclical transfer.

Index | Name | Type | Access | Notes
1 - 64 | UserDataNN | 32-bit integer | RW | Data buffer which can be read into the spreadsheet using the ReadUserDataBuffer or ReadLatchedUserDataBuffer function.

POWERLINK/In-Sight Vision System Mapping

The following modules allow access to the various subsystems in the In-Sight vision system.

Typical Acquisition Sequence

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Control field of the Inspection Control Object, or by monitoring the Trigger Ready, Trigger Ack, Acquiring and Missed Acq bits in the Status structure of the Inspection Status Object.

While in Automation Studio, from the Inspection Control Channel, set the Trigger Enable bit to True and toggle the Trigger bit from False to True, while the Trigger Ready bit is set to True.

Sample In-Sight Vision System Acquisition Sequence

On initial start-up, the Trigger Enable bit will be False, and must be set to True to enable triggering. When the vision system is ready to accept triggers, the Trigger Ready bit in the Control field of the Inspection Control Object will be set to True.

While the Trigger Enable and Trigger Ready bits are True, each time the vision system sees the Trigger bit change from False to True, an image acquisition will be initiated. The Trigger bit should be held on until the Trigger Ack bit of the Status structure of the Inspection Status Object changes to False (this is a necessary handshake to guarantee that the change has been seen by the vision system).

During an image acquisition, the Trigger Ready bit in the Control field of the Inspection Control Object will be cleared and the Acquiring bit will be set to True. When the acquisition is completed, the Acquiring bit will be cleared and the Trigger Ready bit will again be set to True, indicating that the vision system is ready to begin a new image acquisition.

To force a reset of the trigger mechanism, set the Trigger Enable bit to False until the Acquisition Status register is True. Then the Trigger Enable bit can be set to True and acquisitions re-enabled.

Closed Example - Typical Acquisition Sequence

Closed Example - Acquisition Faster Than Inspection Sequence

Inspection/Result Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. While the vision system is processing the image, the Inspecting bit of the Status structure is set. When the vision system has finished processing the image, the Inspecting bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit of the Control Structure determines how inspection results are handled by the vision system. If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Control Structure and the Results Valid bit is set to True. If the Buffer Results Enable bit is set to True, the new results are queued. The earlier inspection results remain in the Control Structure until the PLC sets the Inspection Results Ack bit to True, acknowledging receipt of the results. After the Results Valid bit is cleared, the PLC should set the Inspection Results Ack bit back to False to allow the queued results to be placed into the Status Structure (this is a necessary handshake to ensure that the results are received by the PLC).

Inspection Status Signal Behavior

Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
Inspecting | Set when processing an image. | Set when processing an image.
Inspection Complete | Toggled on completion of image processing. | Toggled on completion of image processing.
Results Buffer Overflow | Remains set to 0. | Set when the inspection results could not be queued because the PLC failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.
Results Valid | Set when new results are placed in the Inspection Resultsand Inspection Results Data channels. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True. | Set when new results are placed in the Inspection Results and Inspection Results Data channels. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.
Job Pass | Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. Note: The Job Pass bit will be valid prior to toggling the Inspection Completed bit. | Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared. Note: The Job Pass bit will be valid prior to the Results Valid bit being set.

Results Buffering

A queue for inspection results may be enabled. If enabled, this allows a finite number of inspection data results to be queued until the PLC has time to read them. This is a useful feature for smoothing out data flows if different parts of the system (including the external PLC) slow down for short periods of time.

In general, if inspections are occurring faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded. If buffering is not enabled, the most recent results are kept, and the earlier result that the PLC was unable to read is lost. Essentially, the most recent result will simply overwrite the earlier result. If buffering is enabled (and the queue becomes full), the most recent results are discarded until room becomes available in the results queue.

Closed Example - Results Overflow Sequence

Soft Events

In addition to sending data to an In-Sight vision system from a PLC, soft events can be sent to control job specific behavior. Each soft event has a trigger (bits 24-31 in the Inspection Control Object) and acknowledgment bit (bits 24-31 in the Inspection Status Object) associated with it. The rising edge of the trigger bit causes the In-Sight vision system to process the action associated with the soft event. Upon initiation of the soft event, the vision system will set the Soft Event Ack bit to High. This bit will be held High until the PLC resets the trigger bit, and the processing of the action associated with the soft event has been completed. If the soft event could not be triggered, the general fault bit will be set to High; this bit will remain High until an event is successfully triggered.

Closed Example - Soft Event Triggering

Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

POWERLINK/In-Sight Vision System LED Behavior

When utilizing a POWERLINK-enabled In-Sight vision system, the vision system's LEDs are used to convey POWERLINK-specific behavior status updates. User 1 LED (red) is the POWERLINK error LED, and User 2 LED (green) is the POWERLINK status LED; these states cannot be modified in the Discrete I/O Settings dialog.

Note: User 1 LED will turn on when the vision system, as a Node on the POWERLINK network, detects an error condition on the POWERLINK network, and will turn off once normal operation resumes.
User 2 LED State | LED Behavior | Description
LED OFF | Constantly OFF | POWERLINK is initializing.
LED Flickering | Blinking at 10Hz | POWERLINK is in basic Ethernet mode (i.e. a POWERLINK Master Node has not been detected on the network).
LED Single Flash | One short flash (200ms), followed by a long OFF phase (1000ms) | The vision system has detected a Master Node on the POWERLINK network, however, isochronous communications have not been detected.
LED Double Flash | Two short flashes, followed by a long OFF phase | The POWERLINK network has begun isochronous communications, but the vision system has not been configured to participate.
LED Triple Flash | Three short flashes, followed by a long OFF phase | The Node device has completed configuration, and is awaiting a signal from the Master Node to begin isochronous communications.
LED ON | Constantly ON | The Node device is communicating on the POWERLINK network.
LED Blinking | Blinking at 2.5Hz | The POWERLINK Node has stopped due to an error.


PROFINET Communications

Distributed I/O (Remote I/O) is connected through PROFINET IO. In this configuration, which retains the I/O view of PROFIBUS, user data from field devices are periodically transmitted into the process model of the control system.

PROFINET IO describes a device model, which consists of insertion places (slots) and groups of I/O channels (subslots). The technical characteristics of the field devices are described by the GSD (General Station Description) on an XML basis.

PROFINET IO distinguishes between the three following device types:

  • IO-Controller: Controller on which the automation program is run.
  • IO-Device: A remotely assigned field device, which is assigned to an IO-Controller.
  • IO-Supervisor: A programming device (PC), which runs commissioning and diagnostic functions.

The PROFINET IO engineering process is similar to PROFIBUS: Decentralized field buses are assigned to one or more control systems during configuration; the IO-Device is configured to the actual system expansion, based on the content in the GSD file; and the IO-Device is simultaneously integrated, appropriately parameterized and configured into the PROFINET topology (1).

After the engineering process has been completed, the expansion data is loaded into the IO-Controller (2). The IO-Controller independently takes over the data exchange with the IO-Device (3).

The In-Sight system supports PROFINET IO connections from two controllers (or supervisors) at any given time. The steps provided below describe how to use PROFINET IO to transfer data between In-Sight vision systems and a Siemens PLC.


PROFINET Communications with an In-Sight Vision System

This section describes how to connect a Siemens PLC to an In-Sight vision system, using PROFINET IO communications. PROFINET IO allows an In-Sight vision system's inputs and outputs to be mapped into process memory in the Siemens PLC. Once these values have been established, they are synchronized at an interval defined by the update rate of the PROFINET IO system.

The examples in this section were written assuming that you are using the following components:

  • Siemens S7-300 or S7-400 series PLC with PROFINET option
  • Siemens Step 7 programming software, version 5.3 with SP3 or newer

The steps for configuring the connection depend on the In-Sight firmware version running on the In-Sight vision system. For more information, see Transferring Data With an In-Sight Vision System via PROFINET - In-Sight 4.x.x Firmware or Transferring Data With an In-Sight Vision System via PROFINET - In-Sight 5.x.x Firmware.

Transferring Data with an In-Sight Vision System via PROFINET - In-Sight 4.x.x Firmware

Transferring Data with an In-Sight Vision System via PROFINET - In-Sight 5.x.x Firmware

Job Load by Name Using PROFINET IO Module


Transferring Data With an In-Sight Vision System via PROFINET - In-Sight 4.x.x Firmware

This topic covers the transfer of data to and from an In-Sight vision system running In-Sight 4.x.x firmware, and a Siemens PLC.

Enabling PROFINET Communications on an In-Sight Vision System

Before PROFINET communications can be established with an In-Sight vision system, the vision system must be configured to enable PROFINET, using the Network Settings of the In-Sight vision system.

  1. Open In-Sight Explorer and connect to an In-Sight vision system.
  2. From the Sensor menu, open the Network Settings dialog.

  3. In the Protocol Services section of the dialog, select PROFINET and press the Settings button to enable and configure the vision system's Station Name, as seen by the Siemens PLC, using the PROFINET Settings dialog.

    Note: If the Station Name is not set, the PLC will see the host name, which may not be identical to the vision system's host name, because the PROFINET protocol will translate characters it does not support to characters it does support.
  4. Back in the Network Settings dialog, press OK.
  5. Restart the In-Sight vision system, and the PROFINET service will be enabled upon completion of the power cycle.

Setting Up the Connection

To set up a PROFINET I/O connection between an In-Sight vision system and a Siemens controller, the In-Sight vision system must first be added to the controller's hardware configuration, using the Siemen's HW Config tool:

  1. Open the SIMATIC manager and load the PLC's project.

  2. Select the SIMATIC 300 or SIMATIC 400 node, then double-click on the Hardware node in the object list.

  3. The HW Config tool will now appear. In order to add PROFINET IO nodes to the controller, a PROFINET IO system must be present in the hardware configuration diagram; if there isn't a PROFINET IO system in the diagram, complete the following steps:

    • Ensure that the PROFINET IO interface on the CPU has been assigned a subnet address; to verify this, double-click on the PROFINET IO module on the CPU. If the PROFINET IO module's Networked status indicates "No," then click the Properties button and add a new subnet.
    • Once the PROFINET IO interface on the CPU has been assigned a subnet, add a PROFINET IO system to the hardware configuration diagram by right-clicking the PROFINET IO module in the PLC configuration and selecting Insert PROFINET IO System.

  4. If this is the first In-Sight vision system to be added to the PROFINET network, the In-Sight GSD file (version 2.3, provided by Cognex) will need to be installed. To install the In-Sight GSD file, follow these steps:

    • From the HW Config tool, select Options > Install GSD Files from the menu.
    • Press the Browse button and select the GSD folder from this location: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.1.0\Factory Protocol Description\GSD.
    • Press the Select All button, then click the Install button to install the hardware description for the In-Sight vision systems.

    To add an In-Sight vision system to a PROFINET network, browse to the In-Sight node of the Hardware Catalog (PROFINET IO > Additional Field Devices > Sensors > Cognex Vision Sensors), and then drag an instance of the In-Sight vision system into the PROFINET IO System in the hardware configuration.

  5. Set the device name to the exact name of the In-Sight vision system being connected to.

    Note: If an underscore was used in the In-Sight vision system's name, the underscore will have to be replaced by a hyphen when the vision system's name is input in PROFINET. For example, if the camera was named "Camera_Top" in In-Sight Explorer, it will need to be renamed to "Camera-Top" in PROFINET.

  6. The In-Sight vision system should now be displayed as a device on the PROFINET IO system, along with the In-Sight vision system's various modules supported by the particular PROFINET IO implementation.

    Note:

    Once the In-Sight vision system has been added as a device on the PROFINET IO system, to prevent the PLC from assigning the vision system a new IP address, disable the Assign IP address via IO controller checkbox in the vision system's Properties dialog. To open the Properties dialog and disable the checkbox (which is checked by default), either double-click the vision system device or right-click it and select Object Properties.

    Closed If using Siemens Step 7 software to configure your PLC, click here.
    Tip: The Siemens Step 7 software will assign default I/O addresses to each of the modules added for the In-Sight vision system based on the definitions of each module in the In-Sight GSD file (see the above figure). It is allowed to change any or all of these I/O addresses. All of the modules that map out discrete bit data (acquisition control and status, inspection control and status, and soft event control) must be assigned addresses that are within the process-image input and output memory areas of the PLC. Most newer firmware on Siemens S7 series PLCs allow the sizes of this memory area to be changed (default size is 256 bytes, I0.0 - I255.7, Q0.0 - Q255.7). Other older firmware or models that are not configurable (consult Siemens PLC documentation) have a fixed size, usually 256 bytes. This can be seen in the picture above where each of the discrete bit data modules are mapped into I/O addresses starting at 0 and the byte/word modules are assigned addresses starting just above the process-image input and output memory areas of the PLC (256 and higher).
    A typical use case would be a configuration as shown in the figures below, which keeps each In-Sight vision systems' I/O addresses in a more contiguous block than what the Step 7 software assigns. In order for the PLC logic to access the new I/O bit addresses, open the HW configurator in Step 7 software, open the properties of the PLC (CPU), go to the Cycle/Clock Memory tab of the dialog and the Size of the process-image input area and Size of the process-image output area. In the example the sizes of the input and output areas should be changed to 912 to so that the discrete bit data for the In-Sight vision system is accessible using the PLC's I and Q addresses for the vision system. If these process-image sizes are not changed, the bit values will not be read or written to correctly, although byte/word values will update correctly. Refer to the Siemens PLC documentation for the additional memory overhead required when these process image sizes are changed.

    All of the available modules for the In-Sight vision system are automatically added to the hardware configuration. These modules allow access to the various subsystems in the In-Sight vision system. The default User Data and Inspection Results modules are 64 bytes in size. In order to change the sizes of the modules, delete them from the list and drag the appropriately sized module from under the In-Sight Data Modules folder in the Catalog tree to the Slot in the list.

  7. Once the In-Sight vision system has been added to the PROFINET system in the HW Config utility, the cyclic transfer rate can be adjusted by opening the properties window of the PROFINET IO System. This can be done by double-clicking on the PROFINET IO System in the hardware configuration diagram. The cyclic update time can be set for the entire PROFINET IO System, or for each device, separately.

    Note: If the update time is left at the default value of 1 ms, a significant reduction in vision tool performance may be observed when the PLC is connected to an In-Sight vision system. This reduction can be alleviated by increasing the cyclic update time to either 8 ms or 16 ms.

EXAMPLE: Setting Up a Connection

This example assumes that an In-Sight vision system has been added as an input/output device in a Siemens project. After the project has been downloaded to the controller, cyclic data transfers will be initiated, at the requested update time. To verify a proper I/O connection, follow these steps:

  1. While working Offline, perform the Siemens configuration steps, which were outlined in the Setting Up the Connection section.
  2. Download the completed project to the Siemens controller and set the Operating Mode to Run.
  3. Open the HW Config tool online. The In-Sight vision system should show no errors, which indicates that the I/O connection was completed successfully.
  4. To verify the correct, 2-way transfer of I/O data between an In-Sight vision system and a Siemens controller, connect to the In-Sight vision system using In-Sight Explorer. From the In-Sight vision system's Spreadsheet View, open the AcquireImage property sheet and set the Trigger parameter to either External or Industrial Ethernet. Next, place the vision system Online.

  5. From the HW Config tool, with the In-Sight vision system selected, right-click on the Acquisition Control Module and select Monitor/Modify.

  6. Next, change Input bit 0 from false to true; this enables the Acquisition Trigger Enable bit.

  7. After this bit has been set, whenever Input bit 1 (Acquisition Trigger) is changed from false to true, the In-Sight vision system will acquire an image.
  8. From the Monitor/Modify window of the Inspection Status module, if the Run conditionally checkbox is checked for Monitor, the Inspection Completed bit (Bit 1) can be observed changing state when the inspection completes by repeating step 7.

Getting Data From an In-Sight Vision System

In order to get data from the In-Sight Explorer spreadsheet on an In-Sight vision system running In-Sight 4.x.x firmware to a Siemens PLC, the data must be pushed into the PROFINET stack by using the WriteProfinetBuffer function. This function takes a buffer of data created by the FormatOutputBuffer function and writes the data to the inspection results area in the PROFINET Inspection Results module. This data is then transferred during the next update cycle.

EXAMPLE: Getting Data From an In-Sight Vision System

The following steps explain how to format the data that will be sent from an In-Sight vision system to a Siemens PLC.

  1. To begin, using In-Sight Explorer, create a new job.
  2. From the Palette's Snippets tab, add these two Snippets to the spreadsheet: Acquisition > AcqCounter and Math & Logic > Random.
  3. Open the AcquireImage cell and set the Trigger parameter to Continuous.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  5. The first 4 bytes of data will automatically be added to the PROFINET buffer, which will define the InspectionID and InspectionResultCode (as 16 bit integers), but these will not appear in the FormatOutputBuffer list
  6. From the FormatOutputBuffer dialog, click on the Add button. This will initiate the cell selection mode; select the "Scaled random number" cell of the Random snippet.

  7. From the FormatOutputBuffer dialog, click on the Add button again. This will initiate the cell selection mode; select the count cell of the AcqCounter snippet.

  8. Close the FormatOutputBuffer dialog by clicking the OK button.
  9. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteProfinetBuffer function, from the right pane, to insert it into the spreadsheet.
  10. Set the WriteProfinetBuffer function's Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.
  11. Place the In-Sight vision system Online.
  12. In the Simatic Manager, create a new Variable Table by right-clicking on your PLC and selecting Variable Table from the Insert New Object menu. Open the new Variable Table.

  13. Add two items to the table.

    Offset Address Display Format Description

    0

    PID 257

    FLOATING_POINT

    Random Number

    +4

    PID 261

    DEC

    Acquisition ID
    Note: The addresses assume that the Inspection Results Module is at input address 253 (the first four bytes of the module are for the Inspection ID and Inspection Result Code). If the Inspection Results Module is at a different address, apply the specified offset to the input address to set the correct address.
  14. In the Simatic Manager, open Configured PLC from the PLC > Connect To menu, and then select Monitor from the Variable menu; the values displayed should be identical to those displayed in the In-Sight Explorer spreadsheet.

Sending Data to an In-Sight Vision System

In order to send data from the Siemens PLC to the In-Sight Explorer spreadsheet, the data must be pulled from the PROFINET stack by using the ReadProfinetBuffer function. This function takes the data format created within the FormatInputBuffer function, reads the data from the data area of the PROFINET User Data module, and formats this data into the In-Sight Explorer spreadsheet. This data will be received from the PLC every update cycle.

EXAMPLE: Sending Data to an In-Sight Vision System

For this example, create a new job within In-Sight Explorer and then perform the following steps to configure the data that will be received by the Siemens PLC.

  1. Open the AcquireImage cell and set the Trigger parameter to Continuous.
  2. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.

  3. From the FormatInputBuffer dialog, click on the Add button and add a 32-bit float and a 32-bit integer to the list.

  4. Close the FormatInputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadProfinetBuffer function, from the right pane, to insert it into the spreadsheet .
  6. Set the ReadProfinetBuffer function's Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  7. The Vision Data Access functions will automatically be added to the spreadsheet based on the fields added to the FormatInputBuffer function.
  8. Place the In-Sight vision system Online.
  9. In the Simatic Manager, create a new Variable Table by right-clicking on your PLC and selecting Variable Table from theInsert New Object menu. Open the new Variable Table.

  10. Add two items to the table.

    Offset Address Display Format

    0

    PQD 257

    FLOATING_POINT

    +4

    PQD 261

    DEC
    Note: The addresses assume that the User Data Module is at output address 257. If the User Data Module is at a different address, apply the specified offset to the output address to set the correct address.
  11. In the Simatic Manager, click on the PLC > Connect To > Configured PLC menu.

  12. Enter values for the two items added to the Variable Table and then select the Activate Modify Values from the Variable menu.

  13. The values in the In-Sight Explorer spreadsheet should change to the entered values.


Transferring Data With an In-Sight Vision System via PROFINET - In-Sight 5.x.x Firmware

This topic covers the transfer of data to and from an In-Sight vision system running In-Sight 5.1.0 and later firmware, and a Siemens PLC.

Enabling PROFINET Communications on an In-Sight Vision System

Before PROFINET communications can be established with an In-Sight vision system, the vision system must be configured to enable PROFINET , using the Network Settings of the In-Sight vision system.

  1. Open In-Sight Explorer and connect to an In-Sight vision system.
  2. From the Sensor menu, open the Network Settings dialog.

  3. In the Protocol Services section of the dialog, select PROFINET and press the Settings button to enable and configure the vision system's Station Name, as seen by the Siemens PLC, using the PROFINET Settings dialog.

    Note: If the Station Name is not set, the PLC will see the host name, which may not be identical to the vision system's host name, because the PROFINET protocol will translate characters it does not support to characters it does support.
  4. Back in the Network Settings dialog, press OK.
  5. Restart the In-Sight vision system, and the PROFINET service will be enabled upon completion of the power cycle.

Setting Up the Connection

To set up a PROFINET I/O connection between an In-Sight vision system and a Siemens controller, the In-Sight vision system must first be added to the controller's hardware configuration, using the Siemen's HW Config tool:

  1. Open the SIMATIC manager and load the PLC's project.

  2. Select the SIMATIC 300 or SIMATIC 400 node, then double-click on the Hardware node in the object list.

  3. The HW Config tool will now appear. In order to add PROFINET IO nodes to the controller, a PROFINET IO system must be present in the hardware configuration diagram; if there isn't a PROFINET IO system in the diagram, complete the following steps:

    • Ensure that the PROFINET IO interface on the CPU has been assigned a subnet address; to verify this, double-click on the PROFINET IO module on the CPU. If the PROFINET IO module's Networked status indicates "No," then click the Properties button and add a new subnet.
    • Once the PROFINET IO interface on the CPU has been assigned a subnet, add a PROFINET IO system to the hardware configuration diagram by right-clicking the PROFINET IO module in the PLC configuration and selecting Insert PROFINET IO System.

  4. If this is the first In-Sight vision system to be added to the PROFINET network, the In-Sight GSD file (version 2.3, provided by Cognex) will need to be installed. To install the In-Sight GSD file, follow these steps:

    • From the HW Config tool, select Options > Install GSD Files from the menu.
    • Press the Browse button and select the GSD folder from this location: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.1.0\Factory Protocol Description\GSD.
    • Press the Select All button, then click the Install button to install the hardware description for the In-Sight vision systems.

    To add an In-Sight vision system to a PROFINET network, browse to the In-Sight node of the Hardware Catalog (PROFINET IO > Additional Field Devices > Sensors > Cognex Vision Sensors), and then drag an instance of the In-Sight vision system into the PROFINET IO System in the hardware configuration.

  5. Set the device name to the exact name of the In-Sight vision system being connected to.

    Note: Make sure to select the device that reflects the In-Sight firmware that your system is running (for example, In-Sight 7xxx for 4.x.x firmware and In-Sight 79xx-75xx for 5.x.x firmware).
    Note: If an underscore was used in the In-Sight vision system's name, the underscore will have to be replaced by a hyphen when the vision system's name is input in PROFINET. For example, if the camera was named "Camera_Top" in In-Sight Explorer, it will need to be renamed to "Camera-Top" in PROFINET.

  6. The In-Sight vision system should now be displayed as a device on the PROFINET IO system, along with the In-Sight vision system's various modules supported by the particular PROFINET IO implementation.

    Note:

    Once the In-Sight vision system has been added as a device on the PROFINET IO system, to prevent the PLC from assigning the vision system a new IP address, disable the Assign IP address via IO controller checkbox in the vision system's Properties dialog. To open the Properties dialog and disable the checkbox (which is checked by default), either double-click the vision system device or right-click it and select Object Properties.

    Closed If using Siemens Step 7 software to configure your PLC, click here.
    Tip: The Siemens Step 7 software will assign default I/O addresses to each of the modules added for the In-Sight vision system based on the definitions of each module in the In-Sight GSD file (see the above figure). It is allowed to change any or all of these I/O addresses. All of the modules that map out discrete bit data (acquisition control and status, inspection control and status, and soft event control) must be assigned addresses that are within the process-image input and output memory areas of the PLC. Most newer firmware on Siemens S7 series PLCs allow the sizes of this memory area to be changed (default size is 256 bytes, I0.0 - I255.7, Q0.0 - Q255.7). Other older firmware or models that are not configurable (consult Siemens PLC documentation) have a fixed size, usually 256 bytes. This can be seen in the picture above where each of the discrete bit data modules are mapped into I/O addresses starting at 0 and the byte/word modules are assigned addresses starting just above the process-image input and output memory areas of the PLC (256 and higher).

    A typical use case would be a configuration as shown in the figures below, which keeps each In-Sight vision system's I/O addresses in a more contiguous block than what the Step 7 software assigns. In order for the PLC logic to access the new I/O bit addresses, open the HW Config in the Step 7 software, open the properties of the PLC (CPU), go to the Cycle/Clock Memory tab of the dialog and the Size of the process-image input area and Size of the process-image output area. In the example, the sizes of the input and output areas should be changed to 912, so that the discrete bit data for the In-Sight vision system is accessible using the PLC's I and Q addresses for the vision system. If these process-image sizes are not changed, the bit values will not be read or written to correctly, although byte/word values will update correctly. Refer to the Siemens PLC documentation for the additional memory overhead required when these process image sizes are changed.

    All of the available modules for the In-Sight vision system are automatically added to the hardware configuration. These modules allow access to the various subsystems in the In-Sight vision system. The default UserData and InspectionResults modules are 64 bytes in size. In order to change the sizes of the modules, delete them from the list and drag the appropriately sized module from under the In-Sight Data Modules folder in the Catalog tree to the Slot in the list.

  7. Once the In-Sight vision system has been added to the PROFINET system in the HW Config utility, the cyclic transfer rate can be adjusted. To adjust the rate, double-click the vision system and set the update time to a value in the range of 16 ms. If the update time is left at the default value of 1 ms, a significant reduction in vision tool performance may be observed when the PLC is connected to an In-Sight vision system. This reduction can be alleviated by increasing the cyclic update time to either 8 ms or 16 ms.

EXAMPLE: Setting Up a Connection

This example assumes that an In-Sight vision system has been added as an input/output device in a Siemens project. After the project has been downloaded to the controller, cyclic data transfers will be initiated, at the requested update time. To verify a proper I/O connection, follow these steps:

  1. While working Offline, perform the Siemens configuration steps, which were outlined in the Setting Up the Connection section.
  2. Download the completed project to the Siemens controller and set the Operating Mode to Run.
  3. Open the HW Config tool online. The In-Sight vision system should show no errors, which indicates that the I/O connection was completed successfully.
  4. To verify the correct, 2-way transfer of I/O data between an In-Sight vision system and a Siemens controller, connect to the In-Sight vision system using In-Sight Explorer. From the In-Sight vision system's Spreadsheet View, open the AcquireImage property sheet and set the Trigger parameter to either External or Industrial Ethernet. Next, place the vision system Online.

  5. From the HW Config tool, with the In-Sight vision system selected, right-click on the Acquisition Control Module and select Monitor/Modify.

  6. Next, change Input bit 0 from false to true; this enables the Acquisition Trigger Enable bit.

  7. After this bit has been set, whenever Input bit 1 (Acquisition Trigger) is changed from false to true, the In-Sight vision system will acquire an image.
  8. From the Monitor/Modify window of the Inspection Status module, if the Run conditionally checkbox is checked for Monitor, the Inspection Completed bit (Bit 1) can be observed changing state when the inspection completes by repeating step 7.

Getting Data From an In-Sight Vision System

In order to get data from the In-Sight Explorer spreadsheet on an In-Sight vision system running In-Sight 5.1.0 and later firmware to a Siemens PLC, the data must be pushed into the PROFINET stack by using the WriteResultsBuffer function. This function takes a buffer of data created by the FormatOutputBuffer function and writes the data to the inspection results area in the PROFINET Inspection Results module. This data is then transferred during the next update cycle.

EXAMPLE: Getting Data From an In-Sight Vision System

The following steps explain how to format the data that will be sent from an In-Sight vision system to a Siemens PLC.

  1. To begin, using In-Sight Explorer, create a new job.
  2. From the Palette's Snippets tab, add these two Snippets to the spreadsheet: Acquisition > AcqCounter and Math & Logic > Random.
  3. Open the AcquireImage cell and set the Trigger parameter to Continuous.
  4. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatOutputBuffer function, from the right pane, to insert it into the spreadsheet.
  5. The first 4 bytes of data will automatically be added to the PROFINET buffer, which will define the InspectionID and InspectionResultCode (as 16 bit integers), but these will not appear in the FormatOutputBuffer list.
  6. From the FormatOutputBuffer dialog, click on the Add button. This will initiate the cell selection mode; select the "Scaled random number" cell of the Random snippet.

  7. From the FormatOutputBuffer dialog, click on the Add button again. This will initiate the cell selection mode; select the count cell of the AcqCounter snippet.

  8. Close the FormatOutputBuffer dialog by clicking the OK button.
  9. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the WriteResultsBuffer function, from the right pane, to insert it into the spreadsheet.
  10. Set the WriteResultsBuffer function's Protocol parameter to PROFINET, and the Buffer parameter as a cell reference to the recently created FormatOutputBuffer function's Buffer data structure.
  11. Place the In-Sight vision system Online.
  12. In the Simatic Manager, create a new Variable Table by right-clicking on your PLC and selecting Variable Table from the Insert New Object menu, and then open the new table.

  13. Add four items to the table.

    Offset Address Display Format Description

    0

    PID 257

    FLOATING_POINT

    Random Number

    +4

    PID 261

    DEC

    Acquisition ID
    Note: The addresses assume that the Inspection Results Module is at input address 253 (the first four bytes of the module are for the Inspection ID and Inspection Result Code). If the Inspection Results Module is at a different address, apply the specified offset to the input address to set the correct address.
  14. In the Simatic Manager, open Configured PLC from the PLC > Connect To menu, and then select Monitor from the Variable menu; the values displayed should be identical to those displayed in the In-Sight Explorer spreadsheet.

Sending Data to an In-Sight Vision System

In order to send data from the Siemens PLC to the In-Sight Explorer spreadsheet, the data must be pulled from the PROFINET stack by using the ReadUserDataBuffer function. This function takes the data format created within the FormatInputBuffer function, reads the data from the data area of the PROFINET User Data module, and formats this data into the In-Sight Explorer spreadsheet. This data will be received from the PLC every update cycle.

EXAMPLE: Sending Data to an In-Sight Vision System

For this example, create a new job within In-Sight Explorer and then perform the following steps to configure the data that will be received by the Siemens PLC.

  1. Open the AcquireImage cell and set the Trigger parameter to Continuous.
  2. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the FormatInputBuffer function, from the right pane, to insert it into the spreadsheet.

  3. From the FormatInputBuffer dialog, click on the Add button and add a 32-bit float and a 32-bit integer to the list.

  4. Close the FormatInputBuffer dialog by clicking the OK button.
  5. Right-click an empty cell and select Insert Function to open the Insert Function dialog. From the left pane, click on the Input/Output category, then double-click the ReadUserDataBuffer function, from the right pane, to insert it into the spreadsheet .
  6. Set the ReadUserDataBuffer function's Protocol parameter to PROFINET, and the Buffer parameter as a cell reference to the recently created FormatInputBuffer function's Buffer data structure.
  7. The Vision Data Access functions will automatically be added to the spreadsheet based on the fields added to the FormatInputBuffer function.
  8. Place the In-Sight vision system Online.
  9. In the Simatic Manager, create a new Variable Table by right-clicking on your PLC and selecting Variable Table from the Insert New Objectmenu, and then open the new table.

  10. Add four items to the table, two for the sent user data, and the last two for SetUserData and SetUserDataAck:

    Offset | Address | Display Format

    0

    PQD 257

    FLOATING_POINT

    +4

    PQD 261

    DEC
    Q1.2 | BOOL
    I4.7 | BOOL
    Note: The addresses assume that the User Data Module is at output address 257. If the User Data Module is at a different address, apply the specified offset to the output address to set the correct address.
  11. In the Simatic Manager, click on the PLC > Connect To > Configured PLC menu.
  12. Enter values for the four items added to the Variable Table and then select the Activate Modify Values from the Variable menu.

  13. After entering the values, set the SetUserData bit, then wait for the SetUserDataAck bit to be set, and then clear the SetUserData bit.

  14. The values in the In-Sight Explorer spreadsheet should change to the entered values.


Job Load by Name Using PROFINET IO Module

Note: The Job load by name feature is only available on In-Sight vision systems running In-Sight firmware 5.5.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

  1. Place the camera offline by setting the Set Offline bit high.

    Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Acquisition

    Control

             0x101 0

    Set

    Offline

             Reserved

    Clear

    Exposure

    Complete

             Trigger

    Trigger

    Enable

    Acquisition

    Status

             0x201 0 Online Offline Reason

    Missed

    Acq

    Exposure

    Complete

    Trigger

    Ack

    Trigger

    Ready
    1..2 | Acquisition ID

    Inspection

    Control

             0x102 0

    Clear

    Error

             Reserved

    Execute

    Command

    Set User

    Data

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

    Inspection

    Status

             0x203 0

    Set User

    Data Ack

    Command

    Failed

    Command

    Complete

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    1 Error Reserved Reserved

    Job

    Pass
    2..3 | Error Code

    Command

    Control

    Input

             0x107 0..1 Command (16-bit)

    Command

    Control

    Output

             0x107 0..1 Current Job ID (16-bit)

    Soft Event

    Control Input

             0x106 0

    Soft Event

    7

    Soft Event

    6

    Soft Event

    5

    Soft Event

    4

    Soft Event

    3

    Soft Event

    2

    Soft Event

    1

    Soft Event

    0

    Soft Event

    Control Output

             0x106 0

    Soft Event

    Ack 7

    Soft Event

    Ack 6

    Soft Event

    Ack 5

    Soft Event

    Ack 4

    Soft Event

    Ack 3

    Soft Event

    Ack 2

    Soft Event

    Ack 1

    Soft Event

    Ack 0

    User Data

    0x301(16)

    0x302(32)

    0x303(64)

    0x304(128)

    0x305(254)

             0.. User Data

    Inspection Results

    0x401(16)

    0x402(32)

    0x403(64)

    0x404(128)

    0x405(250)

             0..1 Inspection ID
    2..3 | Inspection Results Code
    4.. | Inspection Results

    Acquisition Control Module

    Bit Name Description

    7

    Set Offline

    When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.

  2. Write the Job Load by Name command into bytes 0 and 1 of the Command Control Input Module. The Job Load by Name command is value 0x4000.

    Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Acquisition

    Control

             0x101 0

    Set

    Offline

             Reserved

    Clear

    Exposure

    Complete

             Trigger

    Trigger

    Enable

    Acquisition

    Status

             0x201 0 Online Offline Reason

    Missed

    Acq

    Exposure

    Complete

    Trigger

    Ack

    Trigger

    Ready
    1..2 | Acquisition ID

    Inspection

    Control

             0x102 0

    Clear

    Error

             Reserved

    Execute

    Command

    Set User

    Data

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

    Inspection

    Status

             0x203 0

    Set User

    Data Ack

    Command

    Failed

    Command

    Complete

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    1 Error Reserved Reserved

    Job

    Pass
    2..3 | Error Code

    Command

    Control

    Input

             0x107 0..1 Command (16-bit)

    Command

    Control

    Output

             0x107 0..1 Current Job ID (16-bit)

    Soft Event

    Control Input

             0x106 0

    Soft Event

    7

    Soft Event

    6

    Soft Event

    5

    Soft Event

    4

    Soft Event

    3

    Soft Event

    2

    Soft Event

    1

    Soft Event

    0

    Soft Event

    Control Output

             0x106 0

    Soft Event

    Ack 7

    Soft Event

    Ack 6

    Soft Event

    Ack 5

    Soft Event

    Ack 4

    Soft Event

    Ack 3

    Soft Event

    Ack 2

    Soft Event

    Ack 1

    Soft Event

    Ack 0

    User Data

    0x301(16)

    0x302(32)

    0x303(64)

    0x304(128)

    0x305(254)

             0.. User Data

    Inspection Results

    0x401(16)

    0x402(32)

    0x403(64)

    0x404(128)

    0x405(250)

             0..1 Inspection ID
    2..3 | Inspection Results Code
    4.. | Inspection Results

    Command Control Input Module

    Byte | Name | Description
    0 - 1 | Command | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.

  3. Write the job name to User Data Module. The job name must be null terminated (i.e. a 0 must be in the byte immediately following the job name).

    Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Acquisition

    Control

             0x101 0

    Set

    Offline

             Reserved

    Clear

    Exposure

    Complete

             Trigger

    Trigger

    Enable

    Acquisition

    Status

             0x201 0 Online Offline Reason

    Missed

    Acq

    Exposure

    Complete

    Trigger

    Ack

    Trigger

    Ready
    1..2 | Acquisition ID

    Inspection

    Control

             0x102 0

    Clear

    Error

             Reserved

    Execute

    Command

    Set User

    Data

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

    Inspection

    Status

             0x203 0

    Set User

    Data Ack

    Command

    Failed

    Command

    Complete

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    1 Error Reserved Reserved

    Job

    Pass
    2..3 | Error Code

    Command

    Control

    Input

             0x107 0..1 Command (16-bit)

    Command

    Control

    Output

             0x107 0..1 Current Job ID (16-bit)

    Soft Event

    Control Input

             0x106 0

    Soft Event

    7

    Soft Event

    6

    Soft Event

    5

    Soft Event

    4

    Soft Event

    3

    Soft Event

    2

    Soft Event

    1

    Soft Event

    0

    Soft Event

    Control Output

             0x106 0

    Soft Event

    Ack 7

    Soft Event

    Ack 6

    Soft Event

    Ack 5

    Soft Event

    Ack 4

    Soft Event

    Ack 3

    Soft Event

    Ack 2

    Soft Event

    Ack 1

    Soft Event

    Ack 0

    User Data

    0x301(16)

    0x302(32)

    0x303(64)

    0x304(128)

    0x305(254)

             0.. User Data

    Inspection Results

    0x401(16)

    0x402(32)

    0x403(64)

    0x404(128)

    0x405(250)

             0..1 Inspection ID
    2..3 | Inspection Results Code
    4.. | Inspection Results

  4. Set the Execute Command bit in the Inspection Control Module.

    Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Acquisition

    Control

             0x101 0

    Set

    Offline

             Reserved

    Clear

    Exposure

    Complete

             Trigger

    Trigger

    Enable

    Acquisition

    Status

             0x201 0 Online Offline Reason

    Missed

    Acq

    Exposure

    Complete

    Trigger

    Ack

    Trigger

    Ready
    1..2 | Acquisition ID

    Inspection

    Control

             0x102 0

    Clear

    Error

             Reserved

    Execute

    Command

    Set User

    Data

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

    Inspection

    Status

             0x203 0

    Set User

    Data Ack

    Command

    Failed

    Command

    Complete

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    1 Error Reserved Reserved

    Job

    Pass
    2..3 | Error Code

    Command

    Control

    Input

             0x107 0..1 Command (16-bit)

    Command

    Control

    Output

             0x107 0..1 Current Job ID (16-bit)

    Soft Event

    Control Input

             0x106 0

    Soft Event

    7

    Soft Event

    6

    Soft Event

    5

    Soft Event

    4

    Soft Event

    3

    Soft Event

    2

    Soft Event

    1

    Soft Event

    0

    Soft Event

    Control Output

             0x106 0

    Soft Event

    Ack 7

    Soft Event

    Ack 6

    Soft Event

    Ack 5

    Soft Event

    Ack 4

    Soft Event

    Ack 3

    Soft Event

    Ack 2

    Soft Event

    Ack 1

    Soft Event

    Ack 0

    User Data

    0x301(16)

    0x302(32)

    0x303(64)

    0x304(128)

    0x305(254)

             0.. User Data

    Inspection Results

    0x401(16)

    0x402(32)

    0x403(64)

    0x404(128)

    0x405(250)

             0..1 Inspection ID
    2..3 | Inspection Results Code
    4.. | Inspection Results

    Inspection Control Module

    Bit | Name | Description
    3 | Execute Command | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.

  5. Wait for Command Complete or Command Failed to be set before clearing the Execute Command bit and the Offline bit.

    Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0

    Acquisition

    Control

             0x101 0

    Set

    Offline

             Reserved

    Clear

    Exposure

    Complete

             Trigger

    Trigger

    Enable

    Acquisition

    Status

             0x201 0 Online Offline Reason

    Missed

    Acq

    Exposure

    Complete

    Trigger

    Ack

    Trigger

    Ready
    1..2 | Acquisition ID

    Inspection

    Control

             0x102 0

    Clear

    Error

             Reserved

    Execute

    Command

    Set User

    Data

    Inspection

    Results

    Ack

    Buffer

    Results

    Enable

    Inspection

    Status

             0x203 0

    Set User

    Data Ack

    Command

    Failed

    Command

    Completed

    Command

    Executing

    Results

    Valid

    Results

    Buffer

    Overrun

    Inspection

    Completed

    System

    Busy
    1 Error Reserved Reserved

    Job

    Pass
    2..3 | Error Code

    Command

    Control

    Input

             0x107 0..1 Command (16-bit)

    Command

    Control

    Output

             0x107 0..1 Current Job ID (16-bit)

    Soft Event

    Control Input

             0x106 0

    Soft Event

    7

    Soft Event

    6

    Soft Event

    5

    Soft Event

    4

    Soft Event

    3

    Soft Event

    2

    Soft Event

    1

    Soft Event

    0

    Soft Event

    Control Output

             0x106 0

    Soft Event

    Ack 7

    Soft Event

    Ack 6

    Soft Event

    Ack 5

    Soft Event

    Ack 4

    Soft Event

    Ack 3

    Soft Event

    Ack 2

    Soft Event

    Ack 1

    Soft Event

    Ack 0

    User Data

    0x301(16)

    0x302(32)

    0x303(64)

    0x304(128)

    0x305(254)

             0.. User Data

    Inspection Results

    0x401(16)

    0x402(32)

    0x403(64)

    0x404(128)

    0x405(250)

             0..1 Inspection ID
    2..3 | Inspection Results Code
    4.. | Inspection Results

    Inspection Status Module

    Bit Name Description

    4

    Command Executing

    This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.

    5

    Command Completed

    When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.

    Note: The camera clears the Command Completed bit when the Execute Command bit goes low.

    6

    Command Failed

    This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.


PROFINET IO Module Reference

The topics in this section cover the PROFINET IO Module reference table. The module layout exposed via PROFINET depends on the In-Sight firmware running on the In-Sight vision system. For more information, see PROFINET IO Module Reference Table - In-Sight 4.x.x Firmware or PROFINET IO Module Reference Table - In-Sight 5.x.x Firmware.

PROFINET IO Module Reference Table - In-Sight 4.x.x Firmware

PROFINET IO Module Reference Table - In-Sight 5.x.x Firmware


PROFINET IO Module Reference Table - In-Sight 4.x.x Firmware

This topic covers the PROFINET IO Module reference table and the signals contained in the table for In-Sight vision systems running In-Sight 4.x.x firmware, in conjunction with the GSD file, version 2.3. For a complete list of models and supported firmware versions, see Firmware Versions.

PROFINET IO Module Reference Table and Module Descriptions

PROFINET IO Module Reference Table - In-Sight Firmware Version 4.10.x

Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Acquisition Control | 0x101 | 0 | Set Offline | Reserved |  |  |  |  | Trigger | Trigger Enable
Acquisition Status | 0x201 | 0 | Online | Offline Reason |  |  | Missed Acq | Acquiring | Trigger Ack | Trigger Ready
 |  | 1..2 | Acquisition ID
Inspection Control | 0x102 | 0 | Reserved |  |  |  | Execute Command | Set User Data | Inspection Results Ack | Buffer Results Enable
Inspection Status | 0x202 | 0 | Set User Data Ack | Command Failed | Command Complete | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | Inspecting
 |  | 1 | Reserved |  |  |  |  |  | TestRun Ready | Job Pass
Job Control Input | 0x103 (default) | 0 | Job Load ID (8-bit) (default) Note: TestRun is not supported on the 8-bit module. By default, the 8-bit module will be loaded. In order to use TestRun, the 8-bit module must be manually removed and replaced with the 16-bit module.
Command Control Input | 0x107 | 0..1 | Command (16-bit) This value indicates the TestRun sequence to execute or the ID number (1-999) of the job to load when the Execute Command bit is set by the PLC. 0x1007 = Execute TestRun 0x0000 – 0x03E7 = Job IDs
Job Control Output | 0x103 (default) | 0 | Current Job ID (8-bit) (default)
Command Control Output | 0x107 | 0..1 | Current Job ID (16-bit)
Soft Event Control Input | 0x105 | 0 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
User Data | 0x301(16) 0x302(32) 0x303(64) 0x304(128) 0x305(254) | 0.. | User Data
Inspection Results | 0x401(16) 0x402(32) 0x403(64) 0x404(128) 0x405(250) | 0..1 | Inspection ID
 |  | 2..3 | Inspection Result Code
 |  | 4.. | Inspection Results

PROFINET IO Module Reference Table - In-Sight Firmware Version 4.9.x and earlier

Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Acquisition Control | 0x101 | 0 | Set Offline | Reserved |  |  |  |  | Trigger | Trigger Enable
Acquisition Status | 0x201 | 0 | Online | Offline Reason |  |  | Missed Acq | Acquiring | Trigger Ack | Trigger Ready
 |  | 1..2 | Acquisition ID
Inspection Control | 0x102 | 0 | Reserved |  |  |  |  | Set User Data | Inspection Results Ack | Buffer Results Enable
Inspection Status | 0x202 | 0 | Set User Data Ack | Job Load Failed | Job Load Complete | Job Loading | Results Valid | Results Buffer Overrun | Inspection Completed | Inspecting
 |  | 1 | Reserved |  |  |  |  |  |  | Job Pass
Job Control Input | 0x103 | 0 | Job Load ID (8-bit)
Job Control Output | 0x103 | 0 | Current Job ID (8-bit)
Soft Event Control Input | 0x105 | 0 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
User Data | 0x301(16) 0x302(32) 0x303(64) 0x304(128) 0x305(254) | 0.. | User Data
Inspection Results | 0x401(16) 0x402(32) 0x403(64) 0x404(128) 0x405(250) | 0..1 | Inspection ID
 |  | 2..3 | Inspection Result Code
 |  | 4.. | Inspection Results

Acquisition Control Module

The Acquisition Control Module and Acquisition Status Module bits allow the PLC to trigger an acquisition on the In-Sight vision system, determine when an acquisition has completed and place the vision system into an Offline status where it will no longer accept acquisition triggers.

Controls image acquisition and Online/Offline status for In-Sight vision systems.

Bit Name Description

0

Trigger Enable

This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

1

Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The AcquireImage function's Trigger parameter is set to Network or External.

2 - 6

Reserved

Unused.

7

Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.

Acquisition Status Module

Indicates the image acquisition and Online/Offline status for In-Sight vision systems.

Bit Name Description

0

Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger. This field is true when the vision system is Online, the TriggerEnable bit is set and the vision system is not currently acquiring an image.

1

Trigger Ack

Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared.

2

Acquiring

Set when an In-Sight vision system is currently acquiring an image; set by either the Trigger bit being set or by an external trigger.

3

Missed Ack

Set when an In-Sight vision system misses an acquisition trigger; cleared when an acquisition is successfully triggered.

4 - 6

Offline Reason

This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:

Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.

7

Online

This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.

8 - 23

Acquisition ID

This ID increments on the completion of every acquisition regardless of the trigger source, and can be used to synchronize an Acquisition with its Inspection Results.

Typical Acquisition Sequence

Note: If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Acquisition Control Module, or by monitoring the Trigger Ready, Trigger Ack, Acquiring and Missed Acq bits in the Acquisition Status Module.

On initial start-up, the Trigger Enable bit will be False, and must be set to True to enable triggering. When the vision system is ready to accept triggers, the Trigger Ready bit in the Acquisition Status Module will be set to True.

While the Trigger Enable and Trigger Ready bits are True, each time the vision system sees the Trigger bit change from 0 to 1, an image acquisition will be initiated. The Trigger bit should be held in the new state until that same state value has been seen in the Trigger Ack bit of the Acquisition Status Module (which is a necessary handshake to guarantee that the change has been seen by the vision system).

During an acquisition, the Trigger Ready bit in the Acquisition Status Module will be cleared and the Acquiring bit will be set to True. When the acquisition is completed, the Acquiring bit will be cleared and the Trigger Ready bit will again be set to True once the vision system is ready to begin a new image acquisition.

To force a reset of the trigger mechanism, set the Trigger Enable bit to False until the Acquisition Status Module is 0. Then the Trigger Enable bit can be set to True and acquisitions re-enabled.

Inspection Control Module

The Inspection Status Module and Inspection Control Module modules allow the PLC to monitor the vision processing portion of the In-Sight vision system to determine when new results are available, and to request that the vision system queue any new results.

Controls job execution and handling inspection results.

Bit | Name | Description

0

Buffer Results Enable

When this bit is set, the Inspection ID, Inspection Result and Inspection Results fields are held constant until the Inspection Results Ack field has acknowledged them and been set. Up to eight inspections are held in the vision system's buffer. The In-Sight vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared and there is a new set of rules sent to the PLC, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the PLC, the Results Valid bit remains cleared.

1

Inspection Results Ack

When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the InspectionID, Inspection Result and Inspection Result data. The next set of inspection results is then sent to the PLC. Clearing the Inspection Results Ack bit causes the vision system to set the ResultsValid bit if the buffer is not empty.
2 Set User Data

The rising edge of this signal will latch the User Data Holding Buffer into the User Data field to give the vision system access to the user data. To guarantee that the vision system received the command, the bit should be held high in the PLC until the Set User Data Ack bit is asserted in the Inspection Status Module. The User Data Holding Buffer can be written to by using the Profinet Write Record command. If the Set User Data signal is asserted while the User Data Module is configured on the Profinet connection, a module alarm will be asserted.
3 Execute Command (4.10.x)

When using TestRun, the rising edge of this signal will execute command to start the TestRun. Signal must be held high until Command Completed signal is toggled. The falling edge of this signal (prior to Command Complete) is interpreted as an abort request.

Note: TestRun is supported only on the 16-bit Job Control module. If the 8-bit module is used and the Execute Command signal executes command to start the TestRun, Command Failed signal fires and the Command Complete signal is toggled to indicate the error.
Reserved (4.9.x and earlier) | Unused.

4 - 7

Reserved

Unused.

Inspection Status Module

Indicates the status of job execution and inspection results.

Bit | Name | Description

0

Inspecting

This bit is set when an In-Sight vision system is running a job.

1

Inspection Completed

This bit is toggled upon the completion of an inspection. Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are valid.

2

Results Buffer Overrun

This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results, and in turn set the InspectionResults Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer, and will overwrite the eighth inspection in the buffer. The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.

3

Results Valid

Set when the Inspection Count, Inspection Result Code and Inspection Results fields are valid.

4

 Command Executing (4.10.x)

This bit is set to 1 when TestRun or Job Load is started. Cleared when TestRun execution completes. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.

Note: When the 8-bit module is used, the job load operation executes as soon as the JobID is written to the vision system. When the 16-bit module is used, the job load operation will not execute until the Execute Command is signaled.

Job Loading (4.9.x and earlier)

This bit is set when loading a new job.

Note: This bit only functions when the job load was initiated by the PLC using PROFINET.

5

 Command Completed (4.10.x)

This bit is toggled to indicate that the TestRun execution or Job Load has completed.

Note: An attempt to execute TestRun on a Job without a TestRun configuration will result in the Command Completed being toggled and the Command Failed being set. TestRun should not be executed if TestRun Ready is not set.

Job Load Complete (4.9.x and earlier)

This bit is toggled upon the completion of a job load operation.

Note: This bit only functions when the job load was initiated by the PLC using PROFINET.

6

 Command Failed (4.10.x) This bit is set to 1 to indicate that the TestRun execution or Job Load has failed to run to completion. It is cleared when a new TestRun sequence is executed or a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change.

Job Load Failed (4.9.x and earlier)

This bit is set when the last job load attempt failed. It is cleared the next time a job is successfully loaded.

Note: This bit only functions when the job load was initiated by the PLC using PROFINET.

7

Set User Data Ack

This bit is set to acknowledge completion of the Set User Data command.
8 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
9 TestRun Ready (4.10.x)

This bit is set to 1 when the Vision System has a valid TestRun configuration. This signal is cleared while TestRun executes (regardless of the TestRun initiator) and returns to 1 after execution completes.

Note: This bit is signaled regardless of whether the vision system is online or offline.
Reserved(4.9.x and earlier) | Unused.
10 - 15 | Reserved | Unused.

Inspection/Result Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. While the vision system is processing the image, the Inspecting bit of the Inspection Status Module is set. When the vision system has finished processing the image, the Inspecting bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit of the Inspection Control Module determines how inspection results are handled by the vision system. If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Inspection Results Module and the Results Valid bit is set to True. If the Buffer Results Enable bit is set to True, the new results are queued. The PLC sets the Inspection Results Ack bit and the Results Valid bit is True, if there are still results to acknowledge. After the Results Valid bit is cleared, the PLC should set the Inspection Results Ack bit back to False to allow the queued results to be placed into the Inspection Results Module (this is a necessary handshake to ensure that the results are received by the PLC).

Inspection Status Module Behavior

Bit | Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
0 | Inspecting | This bit is set when an In-Sight vision system is running a job. | This bit is set when an In-Sight vision system is running a job.
1 | Inspection Complete | Toggled on completion of an inspection. | Toggled on completion of an inspection.
2 | Results Buffer Overflow | Remains set to 0. | Set when the inspection results could not be queued because the PLC failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.
3 | Results Valid | Set when new results are placed in the Inspection Results Module.Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True. | Set when new results are placed in the Inspection Results Module. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

Results Buffering

A queue for inspection results may be enabled. If enabled, this allows a finite number of inspection data results to be queued until the PLC has time to read them. This is a useful feature for smoothing out data flows if different parts of the system (including the external PLC) slow down for short periods of time.

In general, if inspections are occurring faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded. If buffering is not enabled, the most recent results are kept, and the earlier result that the PLC was unable to read is lost. Essentially, the most recent result will simply overwrite the earlier result. If buffering is enabled (and the queue becomes full), the most recent results are discarded until room becomes available in the results queue.

Job Control Input/Output Module

The input byte of this module indicates the current job ID (the default Job ID prefix is 0, indicating that the job will not be changed) of the In-Sight vision system, or 255 if the current job has no ID. Setting the output byte while the In-Sight vision system is Offline will cause the job with the same ID to be loaded. Valid job ID numbers are 1 through 254.

Note:

  • Do not use a Job ID prefix of 255. When a job without a Job ID prefix is loaded via In-Sight Explorer, an input byte of 255 will be returned to the PLC. Therefore, it would be unclear if a job with a Job ID prefix of 255 is loaded, or a job without a Job ID prefix is loaded.

  • For In-Sight vision systems running In-Sight 4.10.x firmware, a 16-bit Job Control Input/Output Module is added to support TestRun. By default, the 8-bit module will be loaded. In order to use TestRun, the 8-bit module must be manually removed and replaced with the 16-bit module.

  • When using the 16-bit Job Control Module, valid job ID numbers are from 0 through 999, excluding 255.

Soft Event Control Module

Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.

Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

User Data Module

This data can be read from the In-Sight spreadsheet, using the ReadProfinetBuffer function.

Inspection Results Module

This is the data that is written from the In-Sight spreadsheet, using the WriteProfinetBuffer function. If the Buffer Results Enable bit of the Inspection Control Module is set, then the inspection results will remain unchanged until acknowledged by pulsing the InspectionResults Ack bit.

Byte Name Description

0 - 1

Inspection ID

The acquisition ID associated with this set of results.

2 - 3

 Inspection Result Code (4.10.x)

Indicates the result of the latest TestRun execution. If all tests pass, the bit 0 will be set. If one or more tests do not pass, or if there is a problem with the Setup or Cleanup during the TestRun, the bit 0 will be cleared.

  • This field is only valid following a successful TestRun.
  • The results in this field can become invalidated if a Job without a TestRun is loaded, another TestRun job is executed, a TestRun is in progress, TestRun or job load has failed or a TestRun is aborted.
  • If the camera is currently set to Online, the content of this field is driven by the spreadsheet and does not have any TestRun meaning.

Inspection Result Code (4.9.x and earlier)

Currently unused; always 0.

4 - 253

Inspection Results

Inspection result data written from the spreadsheet, using the WriteProfinetBuffer function.

PROFINET Timing Diagrams - With Buffering and Without Buffering

The following timing diagrams help illustrate the relationships between the acquisition control, inspection control, acquisition status, inspection status and inspection results.

PROFINET Acquisition and Inspection Timing Diagram without Buffering Enabled

PROFINET Acquisition and Inspection Timing Diagram with Buffering Enabled

Copyright © 1999 - 2019 | Cognex Corporation | All Rights Reserved.

In-Sight® Explorer Help | 2019 August 02 | Revision: 5.7.3.6


PROFINET IO Module Reference Table - In-Sight 5.x.x Firmware

This topic covers the PROFINET IO Module reference table and the signals contained in the table for In-Sight vision systems running In-Sight 5.1.0 and later firmware, in conjunction with the GSD file, version 2.3. For a complete list of models and supported firmware versions, see Firmware Versions.

PROFINET IO Module Reference Table and Module Descriptions

Module | ID | Byte | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Acquisition Control | 0x101 | 0 | Set Offline | Reserved |  |  |  | Clear Exposure Complete | Trigger | Trigger Enable
Acquisition Status | 0x201 | 0 | Online | Offline Reason |  |  | Missed Acq | Exposure Complete | Trigger Ack | Trigger Ready
 |  | 1..2 | Acquisition ID
Inspection Control | 0x102 | 0 | Clear Error | Reserved |  |  | Execute Command | Set User Data | Inspection Results Ack | Buffer Results Enable
Inspection Status | 0x203 | 0 | Set User Data Ack | Command Failed | Command Completed | Command Executing | Results Valid | Results Buffer Overrun | Inspection Completed | System Busy
 |  | 1 | Error | Reserved |  |  |  | Reserved | Reserved (5.1.0 - 5.5.x) | Job Pass
 |  |  |  |  |  |  |  |  | TestRun Ready (5.6.0 and later)
 |  | 2..3 | Error Code
Command Control Input | 0x107 | 0..1 | Command (16-bit)
Command Control Output | 0x107 | 0..1 | Current Job ID (16-bit)
Soft Event Control Input | 0x106 | 0 | Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
Soft Event Control Output | 0x106 | 0 | Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0
User Data | 0x301(16) 0x302(32) 0x303(64) 0x304(128) 0x305(254) | 0.. | User Data
Inspection Results | 0x401(16) 0x402(32) 0x403(64) 0x404(128) 0x405(250) | 0..1 | Inspection ID
 |  | 2..3 | Inspection Results Code
 |  | 4.. | Inspection Results

Acquisition Control Module

The Acquisition Control Module and Acquisition Status Module bits allow the PLC to trigger an acquisition on the In-Sight vision system, determine when an acquisition has completed and place the vision system into an Offline status where it will no longer accept acquisition triggers.

Bit Name Description

0

Trigger Enable

This field is set to enable triggering via the Trigger bit. Clear this bit to disable the network triggering mechanism.

1

Trigger

Setting this bit triggers an acquisition when the following conditions are met:

  • The In-Sight vision system is Online.
  • The Trigger Enable bit is set.
  • The AcquireImage function's Trigger parameter is set to External or Industrial Ethernet.
    • The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

2

Clear Exposure Complete

While this signal is High, the Exposure Complete status will remain reset. Once this signal is set to Low, the Exposure Complete status will be set to High on the next exposure completion.

3 - 6

Reserved

Unused.

7

Set Offline

When this bit is set, the In-Sight vision system is taken Offline until the bit is cleared again.

Acquisition Status Module

Bit Name Description

0

Trigger Ready

Indicates when an In-Sight vision system can accept a new trigger via the Trigger bit. This field is true when the vision system is Online, the Trigger Enable bit is set, the AcquireImage function's Trigger parameter is set to Network, External or Industrial Ethernet, and the vision system is not currently acquiring an image.

The Industrial Ethernet Trigger type should be used when the trigger is coming from a PLC.

1

Trigger Ack

Indicates when an In-Sight vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.

Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.

2

Exposure Complete

This bit is set upon the completion of the In-Sight vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.

3

Missed Ack

Set when an In-Sight vision system misses an acquisition trigger, regardless how the acquisition was triggered; cleared when an acquisition is successfully triggered.

Note: If the Trigger bit is set, but the vision system is offline, the Missed Acq and Trigger Ack bits will both be set.

4 - 6

Offline Reason

This field is a 3-bit field used to identify the cause of why an In-Sight vision system is Offline:

Offline Reason | Name | Description
0 | Online | The vision system is Online.
1 | Programming | The vision system's job is being modified.
2 | Discrete Offline | A discrete signal is holding the vision system Offline.
3 | Comm. Offline | A communications protocol is holding the vision system Offline.
Note: It is possible to have multiple devices holding the In-Sight vision system Offline. In this scenario, this field will return the channel with the lowest reason code.

7

Online

This bit is set when the In-Sight vision system is Online, and cleared when the vision system is Offline. When the vision system is Offline, examine the Offline Reason field to determine the reason.

8 - 23

Acquisition ID

This ID increments at the beginning of an acquisition and when the Trigger Ack bit is set; can be used to synchronize an acquisition with its Inspection Results.

Typical Acquisition Sequence

Note: If the In-Sight vision system will be configured to accept an acquisition trigger from a PLC/Motion Controller via a Native Mode command, Cognex recommends that the SetEvent and Wait function be utilized, with the Event code set to 8 (SW8). This will ensure that vision system waits for both the acquisition and inspection to be completed before sending a "complete" response back to the PLC/Motion Controller, and that previous inspection results are not being sent to the PLC/Motion Controller. The "complete" response from the vision system can also then be used to create conditional PLC logic that sends a read request for the inspection results. For more information, see Set Event and Wait.

An In-Sight vision system can be triggered by directly manipulating the Trigger Enable and Trigger bits in the Acquisition Control Module, or by monitoring the Trigger Ready, Trigger Ack and Missed Acq bits in the Acquisition Status Module.

On initial start-up, the Trigger Enable bit will be False, and must be set to True to enable triggering. When the vision system is ready to accept triggers, the Trigger Ready bit in the Acquisition Status Module will be set to True.

While the Trigger Enable and Trigger Ready bits are True, each time the vision system sees the Trigger bit change from 0 to 1, an image acquisition will be initiated. The Trigger bit should be held in the new state until that same state value has been seen in the Trigger Ack bit of the Acquisition Status Module (which is a necessary handshake to guarantee that the change has been seen by the vision system).

During an acquisition, the Trigger Ready bit in the Acquisition Status Module will be cleared. The Exposure Complete bit will be set at the end of the acquisition, and can only be cleared by the Clear Exposure Complete bit.

To force a reset of the trigger mechanism, set the Trigger Enable bit to False until the Acquisition Status Module is 0. Then the Trigger Enable bit can be set to True and acquisitions re-enabled.

Inspection Control Module

The Inspection Status Module and Inspection Control Module modules allow the PLC to monitor the vision processing portion of the In-Sight vision system to determine when new results are available, and to request that the vision system queue any new results.

Bit | Name | Description
0 | Buffer Results Enable | When this bit is set, the Inspection ID, Inspection Result and Inspection Results fields are held constant until the Inspection Results Ack field has acknowledged them and been set. Up to eight inspections are held in the vision system's buffer. The In-Sight vision system will respond to the acknowledgment by clearing the Results Valid bit. Once the Inspection Results Ack field is cleared and there is a new set of rules sent to the PLC, the Results Valid bit will no longer be cleared. If the Inspection Results Ack bit is cleared and there are no more results in the vision system's buffer that are to be sent to the PLC, the Results Valid bit remains cleared.
1 | Inspection Results Ack | When the Buffer Results Enable bit is set, the Inspection Results Ack bit acknowledges that the PLC has received the Inspection ID, Inspection Result and Inspection Results data. The next set of inspection results is then sent to the PLC. Clearing the Inspection Results Ack bit causes the vision system to set the Results Valid bit if the buffer is not empty. If results buffering is disabled, the Inspection Results Ack bit must be set to clear the Results Valid bit.
2 | Set User Data | The rising edge of this signal will latch the User Data Holding Buffer into the User Data field to give the vision system access to the user data. To guarantee that the vision system received the command, the bit should be held high in the PLC until the Set User Data Ack bit is asserted in the Inspection Status Module. The User Data Holding Buffer can be written to by using the Profinet Write Record command. If the Set User Data signal is asserted while the User Data Module is configured on the Profinet connection, a module alarm will be asserted.
3 | Execute Command (5.1.0 - 5.5.x) | When set, the vision system either loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (if prior to Command Complete) is interpreted as an abort request.
 | Execute Command (5.6.0 and later) | When set, the vision system loads the job ID specified in the Command field or executes the Job Load by Name command to load the job name given in the User Data buffer. When using TestRun, the rising edge of this signal will execute command to start TestRun. The signal must be held high until the Command Completed signal is toggled. The falling edge of this signal (prior to Command Complete) is interpreted as a TestRun execution abort request.
4 - 6 | Reserved | Unused.
7 | Clear Error | When this bit is set, it will clear the Error and Error Code signals; the Clear Error bit should be held high until the Error bit has been cleared. If an error has been queued, clearing this bit will cause the Error and Error Code signals to be set to the next queued error code.

Inspection Status Module

Bit | Name | Description

0

 System Busy

Set when the vision system is running a job, loading a job or responding to user input.

1

Inspection Completed

This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are sent to the PLC.

2

Results Buffer Overrun

This field is set when the Buffer Results Enable bit is set and the In-Sight vision system has discarded a set of inspection results because the PLC has not acknowledged the results, and in turn set the InspectionResults Ack bit. Up to eight inspections are held in the vision system's buffer; therefore, this bit is set when the ninth inspection is added to the buffer. The ninth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.

3

Results Valid

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Job Pass bits are set. The bit is cleared when the Inspection Results Ack bit is set.

Note: If job processing is enabled to occur in overlapped mode, either the Buffer Results Enable bit should be enabled/set, or the Inspection Completed bit should be used to latch the inspection results.

4

Command Executing (5.1.0 - 5.5.x)

This bit is set to 1 when Job Load is started. The Command Completed and Command Failed bits will be set prior to the falling edge of this bit.
Command Executing (5.6.0 and later) | This bit is set to 1 when a TestRun execution or Job Load is started. When a TestRun execution has completed, this bit is cleared. The Command Completed bit and Command Failed bit will be set prior to the falling edge of this bit.

5

Command Completed (5.1.0 - 5.5.x)

When a Command completes the Command Executing bit goes low and if the Execute Command bit is still high, the Command Completed bit is set. If the Command did not successfully complete, the Command Failed bit is also set.

Note: The camera clears the Command Completed bit when the Execute Command bit goes low.
Command Completed (5.6.0 and later)

This bit is set to indicate that a TestRun execution or Job Load has completed.

Note: If you attempt to execute TestRun on a Job without a TestRun configuration, both the Command Completed and the Command Failed bit will be set.You must wait for the TestRun Ready bit to be set before executing TestRun.

6

Command Failed (5.1.0 - 5.5.x)

This bit is set to 1 to indicate that Job Load has failed to run to completion. It is cleared when a new job is loaded by the PLC/HMI. If the job is changed through In-Sight Explorer, this bit does not change. This bit is always set prior to setting the Command Completed bit.
Command Failed (5.6.0 and later) | This bit is set to 1 to indicate that a TestRun execution or Job Load has failed. It is cleared when a new TestRun sequence is executed, or a new job is loaded by the PLC/HMI. If you change the job in In-Sight Explorer, this bit does not change.

7

Set User Data Ack

This bit is set to acknowledge completion of the Set User Data command.
8 Job Pass This bit is set if the most recent job passed as configured in the Job Pass/Fail Cell Setup dialog. This bit is cleared if the job did not pass.

The behavior of the Job Pass bit will depend on whether or not results buffering is disabled or enabled:

Buffering Is Disabled Buffering Is Enabled
  • Set when an inspection is completed and the Job Pass/Fail cell indicates pass; otherwise it remains cleared. For more information, see Job Pass/Fail Cell Setup Dialog.
  • The Job Pass bit will be valid prior to toggling the Inspection Completed bit.
  • Set when new results are placed in the InspectionResults attribute and the Job Pass/Fail cell indicated pass for that result set; otherwise it remains cleared. The state will not change until the results are acknowledged by setting the InspectionResultsAck attribute to True, at which time the bit will be cleared.
  • The Job Pass bit will be valid prior to the Results Valid bit being set.
9 | Reserved (5.1.0 - 5.5.x) | Unused.
TestRun Ready (5.6.0 and later)

This bit is set to 1 when the vision system has a valid TestRun configuration. This signal is cleared when TestRun executes (regardless of the TestRun initiator) and returns to 1 after TestRun execution completes.

Note:

  • This bit is signaled regardless of whether the vision system is Online or Offline.

  • Initiating TestRun by an external device is NOT supported on vision systems running In-Sight firmware 5.1.0 to 5.5.x.
10 - 14 | Reserved | Unused.
15 Error

This bit is set when an error has occurred, which is defined in the Error Code field.
16 - 31 Error Code

A 16-bit numeric representation of the error that has occurred:

Code | Error | Description
0x0000 | No Error | No error occurred.
0x0100 | Trigger set while disabled | Occurs when the Trigger bit is set while the Trigger Enable bit is cleared or the AcquireImage function's Trigger parameter is set to External, Network or Industrial Ethernet.
0x0101 | Trigger set while Offline | Occurs when the Trigger bit is set while the vision system is Offline.
0x0400 | Already Executing Error | Occurs when the Execute Command bit is set and the Executing bit is still High.
0x0401 | Job load requested while Online | Occurs when a Job Load command is issued while the vision system is Online.
0x0401 | Job load requested does not exist on the camera | Occurs when a JobID sent in the Command field does not exist as a prefix for any job in the camera file system. For example, if you send Command = 123 and no job on the camera contains 123xxxxx.job.

Inspection/Result Sequence

When an image is acquired by an In-Sight vision system, the image is placed in a queue for processing. While the vision system is processing the image, the System Busy bit of the Inspection Status Module is set. When the vision system has finished processing the image, the System Busy bit is cleared and the Inspection Completed bit is toggled.

The Buffer Results Enable bit of the Inspection Control Module determines how inspection results are handled by the vision system.

If the Buffer Results Enable bit is set to False, then the inspection results are immediately placed into the Inspection Results Module and the Results Valid bit is set to True. When results buffering is disabled, the Inspection Results Ack bit must be set to clear the Results Valid bit.

If the Buffer Results Enable bit is set to True, the new results are queued. The PLC sets the Inspection Results Ack bit, which sets the Results Valid bit to True, if there are still results to be acknowledged. After the Results Valid bit is cleared, the PLC should set the Inspection Results Ack bit back to False to allow the queued results to be placed into the Inspection Results Module (this is a necessary handshake to ensure that the results are received by the PLC).

Inspection Status Module Behavior

Bit | Bit Name | Results If Buffering Is Disabled | Results If Buffering Is Enabled
0 | System Busy | Set when the vision system is running a job, loading a job or responding to user input. | Set when the vision system is running a job, loading a job or responding to user input.
1 | Inspection Complete | Toggled on completion of an inspection. | Toggled on completion of an inspection.
2 | Results Buffer Overflow | Remains set to 0. | Set when the inspection results could not be queued because the PLC failed to acknowledge the previous results, causing the results buffer to overflow. Cleared when an inspection result is successfully queued.
3 | Results Valid | Set when new results are placed in the Inspection Results Module. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True. | Set when new results are placed in the Inspection Results Module. Stays set until the results are acknowledged by setting the Inspection Results Ack bit to True.

Results Buffering

A queue for inspection results may be enabled. If enabled, this allows a finite number of inspection data results to be queued until the PLC has time to read them. This is a useful feature for smoothing out data flows if different parts of the system (including the external PLC) slow down for short periods of time.

In general, if inspections are occurring faster than the results can be sent out, the primary difference between buffering and not buffering is determining which results get discarded. If buffering is not enabled, the most recent results are kept, and the earlier result that the PLC was unable to read is lost. Essentially, the most recent result will simply overwrite the earlier result. If buffering is enabled (and the queue becomes full), the most recent results are discarded until room becomes available in the results queue.

Command Control Input Module

The Current Job ID field module indicates the current job ID of the In-Sight vision system, or 65535 if the current job does not have an ID. In order to load a job, the PLC must set the vision system Offline by using the Set Offline bit. Next, the Command field is set to the desired job's ID and the Execute Command bit is set. Once the Command Completed bit is set, the Execute Command bit should be reset.

Byte | Name | Description
0 - 1 | Command (5.1.0 - 5.5.x) | This is a 16-bit integer used to either indicate the Job ID number (0-999) of the job to load or to specify the Job Load by Name command (0x4000). The job load is executed when the Execute Command bit is set by the PLC. The Command field must be held constant between the rising edge of the Execute Command signal and the rising edge of the Command Completed signal, or the results will be indeterminate. If using the Job Load by Name command, the job name must be transferred to the User Data buffer before setting the Execute Command bit.
 | Command (5.6.0 and later) | This value indicates the TestRun sequence to execute or the ID number (1-999) of the job to load when the Execute Command bit is set by the PLC. 0x1007 = Execute TestRun 0x0000 – 0x03E7 = Job IDs

Command Control Output Module

Byte | Name | Description
0 - 1 | Current Job ID | A 16-bit integer that denotes the ID number of the currently running job on the vision system, or 65535 if the current job does not have an ID number. This field is updated when the job is changed on the vision system, regardless of method of job change.

Soft Event Control Input Module

Allows Spreadsheet soft events to be triggered. Setting any of these bits causes the associated soft event in the Spreadsheet to be triggered.

Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Soft Event 7 | Soft Event 6 | Soft Event 5 | Soft Event 4 | Soft Event 3 | Soft Event 2 | Soft Event 1 | Soft Event 0
Note: In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.

A soft event can be used by the PLC to trigger job specific behavior. Each soft event has a trigger and acknowledgment bit associated with it. The rising edge of the trigger bit causes the In-Sight vision system to process the action associated with the soft event. Upon initiation of the soft event, the vision system will set the Soft Event Ack bit to High. This bit will be held High until the PLC resets the trigger bit, and the processing of the action associated with the soft event has been completed. If the soft event could not be triggered, the general fault bit will be set to High; this bit will remain High until an event is successfully triggered.

Soft Event Control Output Module

These bits are used to indicate that the Soft Event command was received.

Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Soft Event Ack 7 | Soft Event Ack 6 | Soft Event Ack 5 | Soft Event Ack 4 | Soft Event Ack 3 | Soft Event Ack 2 | Soft Event Ack 1 | Soft Event Ack 0

User Data Module

This data can be read from the In-Sight Explorer Spreadsheet, using the GetBufferData and ReadUserDataBuffer functions.

Inspection Results Module

This is the data that is written from the In-Sight spreadsheet, using the WriteResultsBuffer function. If the Buffer Results Enable bit of the Inspection Control Module is set, then the inspection results will remain unchanged until acknowledged by pulsing the InspectionResults Ack bit.

Byte Name Description

0 - 1

Inspection ID

The acquisition ID associated with this set of results.

2 - 3

Inspection Result Code (5.1.0 - 5.5.x)

The inspection result code is defined by the Result Code parameter of the WriteResultsBuffer function. For more information, see WriteResultsBuffer.
Inspection Result Code (5.6.0 and later)

Indicates the result of the latest TestRun execution. If all tests pass, the value will be 0. If one or more tests do not pass, or if there is a problem with the setup or cleanup during the TestRun execution, you will receive a non-zero value to indicate the failure.

  • This field is only valid when a TestRun execution is completed successfully.
  • The results in this field can become invalidated if a Job without a TestRun is loaded, another TestRun job is executed, a TestRun is in progress, a TestRun execution or job load has failed, or a TestRun execution is aborted.

4 - 253

Inspection Results

Inspection result data written from the spreadsheet, using the WriteResultsBuffer function.

PROFINET Timing Diagrams - With Buffering and Without Buffering

The following timing diagrams help illustrate the relationships between the Acquisition Control, Inspection Control, Acquisition Status, Inspection Status and Inspection Results registers:

PROFINET Acquisition and Inspection Timing Diagram without Buffering Enabled

Note: Although the inspection results are not overwritten until the next inspection is completed, the results should be processed by the PLC while the Results Valid bit is set.

PROFINET Acquisition and Inspection Timing Diagram with Buffering Enabled

Copyright © 1999 - 2019 | Cognex Corporation | All Rights Reserved.

In-Sight® Explorer Help | 2019 August 02 | Revision: 5.7.3.6


PROFINET - Using Records with Siemens PLCs

Read and Write Record Commands

PROFINET supports a second, alternative way of communicating with an In-Sight vision system, using the Read and Write Record commands. These commands explicitly write to a specific area in memory on an In-Sight vision system; the Read and Write Record commands are sent to a specific device and that device always responds with a reply to that message. As a result, the Read and Write Record commands are better suited for less frequently occurring operations.

The following Record commands are support by an In-Sight vision system:

Index | Description
1 | Job Name
10 | Inspection ID + Inspection Result Code + Inspection Result Bytes 0 - 995
11 | Inspection Result Bytes 996 - 1995
12 | Inspection Result Bytes 1996 - 2995
13 | Inspection Result Bytes 2996 - 3995
14 | Inspection Result Bytes 3996 - 3999
30 | User Data Bytes 0 - 999
31 | User Data Bytes 1000 - 1999
32 | User Data Bytes 2000 - 2999
33 | User Data Bytes 3000 - 3999
Note:
  • Records 10-13 are read-only records. This data has the same format as the Inspection Results module, including the Inspection ID, Inspection Result Code, and the Inspection Results data. An attempt to write to these records will result in error code 0xB6 indicating access denied.

  • Records 30-33 are read/write records. When writing User Data records using “WRREC” (SFB53), you also need to use the Inspection Control module, Set User Data bit (bit 2) in order to signal the writing of the data from the User Data holding buffer to the spreadsheet ReadUserData function. Write the User Data record first and then set the Set User Data bit.

    In the event the PLC attempts to write to this record range while a Cyclic connection is established which includes the User Data module, an error code 0xB5 will be generated indicating that a state conflict has occurred. An application which requires transferring large amounts of data should use either the User Data module in the cyclic connection, or the User Data write record command. The use of both simultaneously is not supported.

  • When the Siemens CP 343-1 module is acting as a PROFINET I/O controller and reading or writing data records using FB52 – PNIO READ OR WRITE RECORD, only the first 480 bytes of data in each record read/write are transferred.
  • When an In-Sight vision system is configured to communicate over a PROFINET IO network, writing user data to records 30 through 33 is successful, while attempting to read user data records 30 through 33 will return inconsistent results.

Changing a Job on an In-Sight Vision System

The most common operation performed between an In-Sight vision system and a Siemens PLC using the Read and Write Record commands is changing a job. Within the Siemens PLC, these commands are sent using the "WRREC" (SFB 53) and "RDREC" (SFB 52) blocks.

The following steps illustrate how to add a "WRREC" block to change the current job on an In-Sight vision system:

  1. Open the symbol table in the PLC project (this can be found in the Simatic Manager project, under the S7 Program tree node).

  2. Add the following symbols to the project:

    Symbol Address Data Type Description

    LoadJob

    M 124.1

    BOOL

    Triggers the LoadJob command.

    LoadJobBusy

    M 124.2

    BOOL

    True while the LoadJob command is running.

    LoadJobDone

    M 124.3

    BOOL

    True if the LoadJob command succeeded.

    LoadJobErr

    M 124.4

    BOOL

    True if the LoadJob command failed.
  3. Open the OB1 main program block and set the editor into Ladder mode by selecting LAD from the View menu.
  4. Add a WRREC call to your ladder network by dragging the block from the function tree. This block can be found in the Libraries > Standard Library > System Function Blocks > DP node.

  5. Complete the rung by adding the ladder logic as illustrated below:

  6. The ID parameter in the function block must be set to the hexadecimal equivalent of the diagnostic address of the In-Sight module to send the command to; this can be found in the HW Config tool in the module list. In this example, the diagnostic address is 2044 (hex 7FC).
  7. Download the project to the PLC and put the PLC into Run mode.

  8. Open the Variable Table for the PLC project. Add the following entries to the Variable Table:

    Address Symbol Data Type

    M 124.1

    LoadJob

    BOOL

    M 124.2

    LoadJobBusy

    BOOL

    M 124.3

    LoadJobDone

    BOOL

    M 124.4

    LoadJobErr

    BOOL

    MD 128

    CHARACTER

    MD 132

    CHARACTER

    MD 136

    CHARACTER

    MD 140

    CHARACTER

    MD 144

    CHARACTER
  9. Enable monitoring by selecting Monitor from the Variable menu.
  10. Using In-Sight Explorer, place the vision system Offline.

  11. In the MD 128 - MD 147 entries of the Variable Table, enter the name of a job to be loaded; a null character ($0) must be entered after the last character of the job name.

  12. After the job name has been entered, in the Modify value column, enter "true" of the "LoadJob" row.
  13. Next, commit the values to the PLC's memory by selecting Activate Modify Values from the Variable menu.
  14. The specified job should load and be displayed in In-Sight Explorer, and the LoadJobDone variable should display "true".

Error Information Returned From Write/Read Record Messages in the STATUS Output of DWord (ERROR Bit Set to 1)

The STATUS output parameter contains useful error diagnostic information. The following tables provide descriptions of the values returned in the STATUS parameters, which are interpreted as ARRAY[1...4] OF BYTE.

The error information has the following structure:

Field element: Name: Description

STATUS[1]

Function_Num
  • B#16#00, if no error.
  • Function ID from DPV1-PDU: In error case B#16#80 is OR linked; if no DPV1 protocol element is used: B#16#C0.

STATUS[2]

Error_Decode

Location of the error ID.

STATUS[3]

Error_Code_1

Error ID

STATUS[4]

Error_Code_2

Manufacturer specific error ID, expansion.

STATUS[2] can have the following values:

Error_Decode (B#16#...) | Source | Description
00 to 7F | CPU | No error or no warning.
80 | DPV1 | Error according to IEC 61158-6.
81 to 8F | CPU | B#16#8x shows an error in the nth call parameter of the SFB.
FE, FF | DP Profile | Profile-specific error.

STATUS[3] can have the following values:

Error_Decode (B#16#...) Error_Code_1(B#16#...) Explanation according to DVP1 Description

00

00

No error, no warning.

70

00

reserved, reject

Initial call; no active data record transfer.

01

reserved, reject

Initial call; data record transfer has started.

02

reserved, reject

Intermediate call; data record transfer already active.

80

90

reserved, pass

Invalid logical start address.

92

reserved, pass

Illegal type for ANY pointer.

93

reserved, pass

The DP component addressed via ID or F_ID is not configured.

95

Error in the H system when fetching additional interrupt information (when fetching additional interrupt information at the local or distributed I/O layer via an external DP interface, this error is output as "group error").

Note: When connecting or updating, the additional interrupt information may be temporarily unavailable.

96

A master-reserve switchover has occurred in an H system, and the previous master CPU has gone into STOP mode. At that time, an OB was being processed. SFB 54 cannot supply the OB start information, management information, header information or additional interrupt information. SFC 6 "RD_SINFO" will read out the OB start information. SFC 13 "DPNRM_DG" will synchronously read the current diagnostic frame of the affected DP slave for OBs 4x, 55, 56, 57, 82 and 83 (address information from the OB start information).

A0

read error

Negative acknowledgement while reading the module.

A1

writer error

Negative acknowledgement while writing the module.

A2

module failure

DP protocol error at layer 2.

A3

reserved, pass

A4

reserved, pass

Bus communication disrupted.

A5

reserved, pass

A7

reserved, pass

DP slave or modules are occupied (temporary error).

A8

version conflict

DP slave or modules report incompatible versions.

A9

feature not supported

Feature is not supported by the DP slave or module.

AA to AF

user specific

DP slave or module report a manufacturer-specific error in its application. Check the documentation of the DP slave or module manufacturer.

B0

invalid index

Data record not known in module. Illegal data record number 3256.

B1

write length error

Wrong length specified in RECORD parameter; with SFB54: length error in AINFO.

B2

invalid slot

Configured slot not occupied.

B3

type conflict

Actual module type not equal to specified module type.

B4

invalid area

DP slave or module report access to an invalid area.

B5

status conflict

DP slave or module not ready.

B6

access denied

DP slave or module deny access.

B7

invalid range

DP slave or module report an invalid range for a parameter or value.

B8

invalid parameter

DP slave or module report an invalid parameter.

B9

invalid type

DP slave or module report an invalid type.

BA to BF

user specific

DP slave or module report a manufacturer-specific error when accessing. Check the documentation of the DP slave or module manufacturer.

C0

read constrain conflict

The module has the data record, but there is no read data, yet.

C1

write constrain conflict

The previous write request to the module, for the same data record, has not yet been processed by the module.

C2

resource busy

The module is currently processing the maximum number of jobs for the CPU.

C3

resource unavailable

The required operating resources are currently occupied.

C4

Internal temporary error; the job could not be executed. Repeat the job. If this error occurs often, check the plant for sources of electrical interference.

C5

DP slave or module unavailable.

C6

Data record transfer was canceled due to priority class cancellation.

C7

Job canceled due to a warm or cold restart of the DP master.

C8 to CF

DP slave or module reports a manufacturer-specific resource error. Check the documentation of the DP slave or module manufacturer.

Dx

user specific

DP slave specific; refer to the DP slave description.

81

00 to FF

Error in the initial call parameter (with SFB54: MODE).

00

Illegal operating mode.

82

00 to FF

Error in the second call parameter.

:

:

:

88

00 to FF

Error in the eighth call parameter (with SFB54: TINFO).

01

Wrong ID syntax.

23

Quantity frame exceeded or target area too small.

24

Wrong ID range.

32

DB/DI number out of user range.

3A

DB/DI number is NULL for the ID area DB/DI, or the specified DB/DI does not exist.

89

00 to FF

Error in ninth call parameter (with SFB54: AINFO).

01

Wrong ID syntax.

23

Quantity frame exceeded or target area too small.

24

Wrong ID range.

32

DB/DI number out of user range.

3A

DB/DI number is NULL for the ID area DB/DI, or the specified DB/DI does not exist.

8A

00 to FF

Error in the tenth call parameter.

:

:

:

8F

00 to FF

Error in the fifteenth call parameter.

FE, FF

00 to FF

Profile-specific error.

With DPV1 errors, the DP Master passes on STATUS[4] data to both the CPU and SFB. Without the DPV1 error, this value is set to 0, with the following exceptions for the SFB52 (Read Record):

  • STATUS[4] contains the target area length from RECORD, if MLEN is greater than the target area length from RECORD.
  • STATUS[4] equals MLEN, if the actual data record length is less than MLEN, and MLEN is less than the target area length from RECORD.
  • STATUS[4] equals 0, if STATUS[4] is greater than 255, 255 would have to be set.


Networking

The In-Sight sensor is factory-configured for installation on an existing network with a DHCP server. After connecting the network cable and supplying power, the DHCP server automatically detects the sensor, configures its settings, and adds it to the network with the default host name. When installing the sensor to an existing network, consult your network administrator to determine whether a DHCP server is available. For more information, see Dynamic IP Address or Dynamic Host Configuration Protocol (DHCP) Server.

Note: After adding the sensor to a network with a DHCP server, disabling DHCP on the sensor and assigning it a static IP address is strongly recommended.

If your sensor does not use a DHCP server, or if you want to connect the In-Sight sensor directly to your computer, use the Add Sensor/Device to Network dialog to establish communication with your sensor. This installation may also require changes to network settings in Microsoft Windows. For more information, see Add Sensor/Device to Network Dialog.

Once communication with the sensor has been established and you can log on to the sensor, you can also use the Network Settings dialog to configure or change sensor network settings. For more information, see Network Settings Dialog.

If you have In-Sight sensors on multiple subnets, use the In-Sight Host Table to allow In-Sight sensors on different subnets to communicate with one another and use the Explorer Host Table to allow In-Sight Explorer to communicate with In-Sight sensors on different subnets. Sensors defined in the Explorer Host Table will appear in the In-Sight Network pane and In-Sight Files pane. For more information, see Explorer Host Table Setup Dialog.

For sensor maintenance, you can use the Backup dialog to store an archival copy of your network settings to the hard disk on your PC and use the Create Report dialog to generate HTML and XML-based output files, documenting the network settings of your sensors and emulators on your network. For more information, see Backup Dialog.

For more information about Network Troubleshooting, see Network Troubleshooting.

Configure the PC (Non-DHCP)

Add Sensor/Device to Network

Link-Local IP Address

Network Settings

In-Sight Host Table

Explorer Host Table

Backup

Restore

Restore From

Create Report

Network Troubleshooting

Configure FTP


Configure the PC's Network Settings (Non-DHCP)

This section provides information on how to configure Microsoft® Windows® network settings to connect to an In-Sight vision system running In-Sight software on a non-DHCP network. The steps and example dialogs listed below are specific to Windows 7/Windows 10, with Category view enabled.

Note: Consult your network administrator to determine if your network has a DHCP server.
  1. Click Start, then click the Control Panel shortcut to open the Control Panel icon group.
  2. Click the Network and Sharing Center icon to open the Network and Sharing Center window. In the left pane, click Change adapter settings to open the Network Connections window.

  3. Right-click the Local Area Connections icon and click Properties to open the Local Area Connection Properties dialog. (If you are prompted for an administrator password or confirmation, type the password or provide confirmation.)

  4. Select the Networking tab.
  5. In the This connection uses the following items portion of the dialog, enable either the Internet Protocol Version 4 (TCP/IPv4) checkbox or the Internet Protocol Version 6 (TCP/IPv6) checkbox.
  6. Highlight either Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6), and then click Properties to open the Internet Protocol (TCP/IP) Properties dialog.
  7. Depending on which Internet Protocol (TCP/IP) Properties dialog is open:
    • Internet Protocol Version 4 (TCP/IPv4) Properties: Click the Use the following IP address radio button. The IP address, Subnet mask and Default gateway fields, which are greyed-out, become active.

    • Internet Protocol Version 6 (TCP/IPv6) Properties: Click the Use the following IPv6 address radio button. The IPv6 address, Subnet prefix length and Default gateway fields, which are greyed-out, become active.

  9. Enter an appropriate IP address.
  10. Enter an appropriate subnet mask or subnet prefix length.
    • Internet Protocol Version 4 (TCP/IPv4) Properties: The subnet mask defines which part of the system's IP address refers to the network and which part refers to the host. The network part of the IP address is the same for all hosts on the same subnet, and the remainder is unique to each host.

    • Internet Protocol Version 6 (TCP/IPv6) Properties: The subnet prefix length is a way to define the subnet mask in terms of the number of shared initial bits (which represents the network part of the IP address), counting from the left side of the address. For example, a subnet mask of 255.0.0.0 contains eight shared initial bits (255, in binary form, is 11111111) and can be expressed as a subnet prefix length of /8.

      Note: Consult your network administrator to determine your preferred DNS server and alternate DNS server.
  11. Click OK to close the Internet Protocol (TCP/IP) Properties dialog.
  12. Click Close to close the Local Area Connection Properties dialog.


Link-local IP Address

The purpose of a link-local IP address (also known as an automatic private IP address) is to automatically provide a temporary IP address if a unique dynamic or static IP address is not immediately available. Link-local IP addresses are in the range of 169.254.0.0/16.

Link-local capability is available only on In-Sight devices that support Ethernet configuration with firmware 4.1.0 or later. If necessary, an In-Sight device will assign itself a link-local IP address so that it can connect, or maintain connection, to a PC or a network without any configuration. Examples of when link-local IP addresses are used include:

  • Connecting a new device to a static network.
  • Connecting a new device directly to a PC or a VisionView
  • Connecting a device with a static IP address to a static network, and the IP address is already taken.
  • Maintaining connection to a device with a dynamic IP address when its DHCP server fails.
  • Moving a device from a DHCP network to a static network.
Note:
  • New In-Sight Ethernet devices are factory-configured for installation on an existing network with a DHCP server. For more information, see Dynamic Host Configuration Protocol (DHCP) Server.
  • Because routers cannot pass data to and from link-local IP addresses, replacing them with dynamic or static IP addresses in the Add Sensor/Device to Network dialog is strongly recommended. For more information, see Add Sensor/Device to Network Dialog.


Network Troubleshooting

CAUTION: The Add Sensor/Device to Network dialog overwrites your proc.set file if you choose to reset vision system settings to the factory defaults. For more information, see Add Sensor/Device to Network Dialog.

Install the In-Sight Explorer Software

  1. Ensure you have local administrative rights when installing the In-Sight software on a PC.
  2. Make sure all firewalls and antivirus software are disabled. For more information, see Firewalls.

Assign the IP Address

The In-Sight vision system is factory-configured with DHCP enabled. If your network does not have a DHCP server, use the Add Sensor/Device to Network dialog to assign the vision system a static IP address. For more information, see Add Sensor/Device to Network Dialog.

Note: Use DHCP only if you have a DHCP server on your network. When installing the vision system to an existing network, consult your network administrator to determine whether a DHCP server is available.

Migrating Vision Systems to a Different Network

If you have set up all your vision systems and need to change the IP addresses to a new network (such as deployment to a production line), use the Add Sensor/Device to Network dialog to change network settings for the vision systems. For more information, see Add Sensor/Device to Network Dialog.

Note: The PC needs to remain on the original network to recognize the vision systems and modify their IP addresses.

The PC is on a Different Subnet than the Vision System

If the vision system is configured to operate on a different subnet than the PC running In-Sight Explorer, the host name and IP address of the vision system must be entered in the Explorer Host Table before it will appear in the In-Sight Network pane. For more information, see Explorer Host Table Setup Dialog.

Unable to Connect to the Vision System When Directly Connected to the PC

  1. Ensure the correct type of Network Cable is used.

    Most In-Sight 5000 series vision systems have an Autosense capability, allowing the vision system to connect directly to a PC using either a straight-pinned network cable or a crossover cable. If your vision system does not have the Autosense capability, a crossover cable or a crossover coupler combined with a straight-pinned network cable can be used. To determine the correct configuration for your vision system, refer to the Part Number label on the back of your vision system. If the Part Number is P/N 800-5828, the vision system does not have the Autosense capability.

  2. Ensure the PC has a Connection to the Network

    When you plug the vision system's network cable into the PC's network card, a network connection icon should appear in the notification area at the bottom right of your screen. If the network connection icon does not appear, ensure the network cable is securely plugged in and in good working order.

  3. Disable the Microsoft Media Sense Feature on the PC

    If the Microsoft "Media Sense" feature (which automatically detects whether or not your network interface is linked to a network) is enabled, communication with a vision system may not be established. It is recommended to use a hub or switch with a standard Ethernet cable to configure the vision system or configure your PC to disable the Media Sense feature. See Microsoft Knowledge Base article 239924 for details on this process.

Unable to connect to the Vision System when Connected to a hub or switch

Note: A switch is the preferred networking method.
  1. Ensure the network and power cables are properly connected to the switch and are in good working order; when the network cable is inserted into an Ethernet port on the switch, a small green light indicates that a connection is made on that port.
  2. Verify that the 24VDC and ENET LEDs light up on the back of the vision system.
  3. Ensure the switch does not have any additional functionality enabled, such as blocking ports or filtering.

The Vision System Does not Appear in the In-Sight Network Pane

Note:
  • After completing each of the following steps, click Refresh on the View menu to repopulate the In-Sight Network.
  • If each of the following methods fail, use the Add Sensor/Device to Network dialog to reconfigure the network settings of the vision system. For more information, see Add Sensor/Device to Network Dialog.

  1. Ensure that power is applied to the vision system and that network communication is functioning.

    Ensure that power and Ethernet cables are securely plugged into the vision system. To ensure that the vision system is receiving power and that a network connection is detected, verify that the 24VDC and ENET LEDs light up on the back of the vision system.

  2. Ensure the vision system's IP address is correctly configured.

    The basic IP address for the default Microsoft network is 192.168.0.x where x is equal to any number from 0 to 255. Do not use 0 or 255 in this placement as some systems reserve these numbers.

  3. Ensure the vision system's subnet mask is correctly configured.

    For the IP address of 192.168.0.x, the default subnet mask is 255.255.255.0.

    • Use of 255 in the subnet mask means that the number in that placement must be the same on all devices.

    • Use of 0 in the subnet mask means that any number can be used.

      For example, if a PC is assigned an IP address of 192.168.1.24 with a subnet mask of 255.255.255.0, and the vision system's IP address is 192.168.0.98, the PC will not automatically recognize the vision system because the third digit in the IP addresses do not match.

  4. Ping the IP address of the vision system to see if it is on the network.

    Open a command prompt and ping the IP address of the vision system. For example, to ping a vision system with the IP address of 192.168.0.1, issue the following command: ping 192.168.0.1. If you receive a message stating Request timed out, the specified IP address is not detected on the network.

    Note: You may have to power down the vision system to see if any other devices are using the same IP address. IP addresses must be unique on the network.

Cannot Connect to the Local Emulator

  • Error 6003: Could not start the emulator. For more information, see Error Messages.

In-Sight Explorer is Detecting the Wrong IP Address for the PC

  1. Open In-Sight Explorer.
  2. Connect to your emulator.
  3. From the Sensor menu, click Network Settings.
  4. Locate the IP address of your emulator.
  • If the IP address is 127.0.0.1, your network card might be bad.
  • If the IP address is incorrect, In-Sight Explorer might have detected an alternate network card (such as a wireless network card). In-Sight Explorer uses the IP address of the network card used at startup on the PC. If multiple network cards are installed on the PC, you may need to change the binding order of the network cards. In-Sight uses the IP address at the top of the list.
Closed To change the binding order of the network cards using Windows 7/Windows 10, with Category view enabled:
  1. Click Start, then click on the Control Panel shortcut.
  2. Click the Network and Sharing Center icon. The Network and Sharing Center window opens.
  3. In the left pane, click Change adapter settings.
  4. Press the ALT key to display the Advanced menu; from the Advanced menu, click Advanced Settings. (If you are prompted for an administrator password or confirmation, type the password or provide confirmation.)
  5. Highlight the Adapters and Bindings tab.
  6. In the Connections portion of the dialog, select the connection you want to modify.
  7. In the Bindings for <connection name> portion of the dialog, select the network card that you want to move and press the arrow buttons to move the network card to the top of the list.
  8. Click OK to close the dialog.

The IP Address and Subnet Mask Allow Only 2 Digits

This is an artifact of the display settings on the PC.

Closed To correct using Windows 7/Windows 10, with Category view enabled:
  1. Click Start, then click on the Control Panel shortcut.
  2. Click the Personalization icon. The Personalization window opens.
  3. In the left pane, click Display. (If you are prompted for an administrator password or confirmation, type the password or confirmation.) The Display window opens.
  4. Ensure that the Smaller - 100% (default) option is selected. (Smaller - 100% = 96 DPI).
  5. Click OK to close the dialog.
  6. Reboot the PC if the DPI scaling was changed.

Different Ports Available

A valid port assignment is any unused number between 1 and 65535, except for ports reserved for In-Sight communications. In-Sight emulator users should always assign port numbers 3000 (the default) and higher to prevent potential conflicts with ports reserved by services on the PC. For more information, see In-Sight Ports.

Unable to Update Firmware on the Vision System

Most firmware update problems are indicative of a firewall issue. Ensure that all firewalls are disabled. For more information, see Firewalls.

Unable to Transfer a File

Verify that another application is not controlling the FTP port

  1. Close In-Sight Explorer.
  2. Open a command prompt and issue the following command: netstat -a.
  3. Look for an active TCP connection listening on port 21 (for example, "TCP 0.0.0.0:21"). This would indicate that an application (such as an FTP server) is using the default FTP port 21; in this case, the application must be stopped, or the port number must be changed.

A common application that might be using port 21 is the Windows Internet Information Services (IIS). Following are instructions about how to verify that IIS is not using this port on Windows 7/Windows 10.

Closed Using Windows 7/Windows 10, with Category view enabled:
  1. Click Start, then click on the Control Panel shortcut to open the Control Panel icon group.
  2. Click the Administrative Tools icon.
  3. Double-click the Internet Information Services (IIS) Manager icon. (If you are prompted for an administrator password or confirmation, type the password or confirmation.)
  4. In the Internet Information Services (IIS) Manager window, expand the local computer.
  5. Expand the FTP Sites directory.
  6. Right-click the default FTP site and click Properties.
  7. Verify that the TCP port is not 21. If it is, change it to an unused port such as 22.

Unable to Write to the Vision System

This might happen because of a change in networks. You may be able to ping the device, but the WriteDevice or WriteImageFTP functions are not writing to it.

  • The Domain Name Service (DNS) server on your network might be unable to resolve the device's host name. When in doubt, the device's IP address can always be typed in lieu of the host name.

  • When configuring the WriteImageFTP Function, enter the user name and password to log on to the FTP server. In-Sight Explorer has an integrated FTP server built into the software. The FTP server is running when In-Sight Explorer is open and emulation is enabled. If using the In-Sight Explorer FTP server, the default user name is admin and the default password is blank. For more information, see Configure the Write ImageFTP Function.

Firewalls


Firewalls

Many networking topologies implement a firewall to control what data passes to and from various devices on the network. In their default configurations, certain firewalls can interfere with the operation of In-Sight Explorer and your ability to detect In-Sight sensors on the network. If you are behind a corporate firewall, or you are not connected to the Internet, you can disable the Windows firewall.

In-Sight Ports

Specific ports are reserved for In-Sight communications. For more information, see In-Sight Ports.

Microsoft Windows Firewall Settings

In-Sight Explorer and In-Sight OPC Server are not automatically added to the Windows Firewall Programs exception list, and a warning dialog may be launched that Windows Firewall Programs has blocked portions of the application. To add the programs, either allow access through the warning dialogs, or manually add the following to the Windows Firewall exception list. For In-Sight Explorer, add the following applications:

  • [Program Files]\Cognex\In-Sight\In-Sight Explorer 5.x.x\In-Sight Explroer.exe

  • [Program Files]\Cognex\In-Sight\Emulators\x.x.x\In-Sight.exe

    Note: There are two sub-directories, 4.x.x and 5.x.x, within the Emulators folder. When connected to 4.x.x vision systems, the In-Sight.exe file in the 4.x.x sub-directory will be used. When connected to 5.x.x vision systems, the In-Sight.exe file in the 5.x.x sub-directory will be used.

For the In-Sight OPC Server, add the following application:

  • [Program Files]\Cognex\In-Sight\In-Sight OPC Server 5.x.x\OpcInsight.exe

Windows 7/Windows 10

To disable the Windows firewall, use the following procedure:

  1. From the Start menu, click Control Panel, click Security, and then click Windows Firewall.
  2. Click Change notification settings.
  3. Select each of the Turn off Windows Firewall (not recommended) radio buttons.
  4. Click OK to confirm your selections.

Optionally, use the following procedure to allow external connection to the local emulator, enable the In-Sight vision system as an FTP server and enable telnet service:

  1. From the Start menu, click Control Panel, click System and Security, and then click Windows Firewall.
  2. Click Allow a program or feature through Windows Firewall.
  3. Click the Change settings button.
  4. Click the Allow another program… button.
  5. Click the Browse… button and then navigate to the In-Sight.exe executable. By default this is in the following location: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 4.6.0\Emulator\In-Sight.exe
  6. In the Browse dialog, click Open.
  7. In the Add a Program dialog, click the Add button.
  8. In the Allowed programs and features table, check the checkboxes for the domains in which In-Sight.exe should be made available.
  9. Click OK.


Configure In-Sight Explorer with an External FTP Server

In-Sight Explorer uses an internal FTP server to transfer file information from In-Sight vision systems to the In-Sight Explorer application. However, there is an option to use an external 3rd-party FTP server, instead. This is configured by disabling In-Sight Explorer’s default internal FTP server, and setting up an external FTP server to run on your network.

Disable the Internal In-Sight Explorer FTP Server

  1. In the System menu, select Options to launch the Options dialog.

  2. Select Emulation, and uncheck the Use Emulator check box, and click OK.

  3. Click Yes on the user prompt to disable the FTP server.

    Note:
    • To transfer files from In-Sight Explorer to In-Sight vision systems, an external FTP server must be configured with a Host Name, Username and Password (if one is set up in the external server). The server settings must also be set to read and write.
    • Disable the internal In-Sight Explorer FTP server before launching an external FTP server.

Configure the External FTP Server Information in EasyBuilder

  1. From the Communications group box, select FTP.
  2. By default, the Images tab will be automatically selected and displayed in the settings pane.

  3. Press the Add button to add an entry and configure the image export parameters in the Images and Settings tabs.

    Note: More than one image export operation can be added to a job.
  4. In the Settings tab, input the external FTP server host information.
    1. Enter a Host Name, User Name, Password, and Connection Type.
    2. After configuring the parameters, click OK.

  5. Place the In-Sight vision system Online. The vision system must be Online to execute; otherwise, no images will be exported.

  6. Trigger the vision system to acquire images. For each acquired image, an image file (BMP or JPG, depending on the File Format parameter) is exported and stored on the host specified in the Host Name parameter.

Configure an External FTP Server From the Spreadsheet

  1. Select a cell in the spreadsheet.
  2. Navigate to the Functions tab, and insert a function (i.e., WriteFTP, WriteImageFTP, etc.) to open its property sheet.
  3. Configure the following parameters in the property sheet.
    1. Enter a Host Name, User Name, Password (if one was set up) and File Name.
    2. After configuring the parameters, click OK.
  4. Place the vision system Online to execute file transfers via the external FTP server.

  5. Trigger the vision system. Each acquired file is stored on the specified host.

    Note:
    • The vision system must be Online for the external FTP server to transfer files.
    • The external FTP server must be running to facilitate file transfer between In-Sight Explorer and the vision system selected.


Connect to a DeviceNet Gateway

The purpose of this example is to demonstrate how to use the HMS Anybus X-gateway to access data over a DeviceNet factory communication network. This topic explains how to install and configure the gateway, how to configure the network (RSNetworks) to allow the devices to communicate, and how to create an In-Sight Explorer job to send data to the gateway. The following example assumes that the user has the following hardware and software:

Note: DeviceNet is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions .
  • In-Sight vision system with firmware version 3.41.00 or later
  • Anybus X-gateway Modbus/TCP-to-DeviceNet Adapter
  • Rockwell PLC with a DeviceNet Scanner Card
  • Rockwell RSNetWorx and RSLogix 5000 Software

Install and Configure an Anybus X-gateway

The steps contained in this section explain how to install and configure the Ethernet portion of the Anybus X-gateway.

Note: Refer to the HMS Anybus-X documentation (Anybus-X Generic Gateway User Manual, Anybus-X Ethernet Network Interface Addendum and Anybus-X PROFIBUS Slave Network Interface Addendum), for more information. These documents are available for download from the Anybus Website (AnyBus-X gateway).
  1. Download and install the HMS Software utility Anybus IPconfig; this utility uses the HMS IP Configuration Protocol (HICP), which provides a simple way to configure Anybus-based Ethernet interfaces.
  2. Using a PC with Ethernet connectivity, run the Anybus IPconfig. A window will display all Anybus-based Ethernet interfaces, and their IP addresses, discovered on the network.
  3. Using the MAC ID dip switches on the Anybus X-gateway, set the DeviceNet MAC ID address. Refer to the Anybus-X DeviceNet Slave Network Interface Addendum for more information. Physically mount and connect the Anybus X-gateway hardware; Refer to the Anybus X-gateway manual for more information.
  4. After the Anybus X-gateway hardware has been properly mounted and all cable connections have been made, provide power to the Anybus X-gateway hardware and wait 30 to 60 seconds for the device to power up. Once the Anybus-X Gateway hardware has power, the Ethernet LED status indicators should be either green or flashing green.
  5. From the Anybus IPconfig utility, click the Scan button to refresh the window that displays all Anybus-based Ethernet interfaces. The newly added Anybus X-gateway hardware should appear in the list, with a default IP address of 192.168.0.1.
  6. If the settings for the Anybus X-gateway need to be altered double-click on the Anybus X-gateway in the list; this will display a dialog to assign IP addresses using DHCP or through a static IP address, subnet mask, default gateway and DNS server. Once the settings have been finalized, click on the Set button to continue.
  7. Finally, from the Anybus IPconfig utility, click the Scan button to refresh the window that displays all Anybus-based Ethernet interfaces. The Anybus X-gateway hardware should appear in the list, with the new IP address, if it was altered.

Connect an Anybus X-gateway to a Rockwell PLC on a DeviceNet Network

This section provides the procedure for attaching, and verifying, DeviceNet communication between a Rockwell PLC and an Anybus X-gateway. The Anybus X-gateway allows the exchange of data between a Modbus/TCP network and a DeviceNet network; this allows input and outputs to be sent to the Rockwell PLC. To setup the DeviceNet connection between the Rockwell PLC and an Anybus-X gateway, the gateway must be added to the controller’s hardware configuration, using RSNetWorx:

  1. Open RSNetWorx for DeviceNet.

    Note: If this is the first time using the Anybus-Gateway the Electronic Data Sheet (EDS) must be installed; download the EDS file from the HMS web site.
  2. From the Tools menu select EDS Wizard to install the EDS file. Click on Next and then select Register an EDS file and select Next. Add the path of the downloaded EDS and click Next.
  3. From the Network menu select Online. This will scan the entire network at the baud rate setup in the scanner and all of the attached nodes will be listed.
  4. Double click on the 1756-DNB (are other attached scanner). This will bring up a window with the Scanner’s configuration.
  5. Select the Scan list Tab. You will be prompted whether to download the offline configuration to the Scanner or upload the Scanner’s current configuration. Choose Upload.

  6. To add the device to the scan list highlight the Anybus-S in the Available Devices and click on the right arrow to add to the scanner.

  7. After the adding the device, select Edit I/O Parameters. A window will appear for configuring the I/O type and size. Checked the polled option and set the input and output size 20 bytes. Have the poll rate set every scan to get the data when available.

  8. Verify that input and output have the correct amount of data. Select the Input and Output Tab and compare with the graphics below.

  9. Click File > Save As.. and save the configuration as InSightExample.dnt.

    Note: 20 Bytes of input and output is the default setting. If this size is not what is needed please refer to Anybus X-gateway User Manual to adjust the settings. The documents are available at the Anybus web site (https://www.anybus.com/products/gateway-index/anybus-xgateway).

Connect an Anybus X-Gateway to an In-Sight Vision System via TCP/IP Modbus

This section describes connecting an Anybus X-gateway to an In-Sight vision system, using TCP/IP Modbus communications. For more information, see Modbus TCP Communications.

Note: Refer to the Open Modbus/TCP Specification, published by Modicon, at modbus.org and the InSightModbus.doc at https://support.cognex.com/en/downloads/detail/in-sight/590/1033 for more information.

Set Up TCP/IP Modbus Communications in In-Sight Explorer

TCP/IP Modbus client functionality is enabled on In-Sight vision systems, but this server functionality is not needed in this model, because the Anybus X-gateway acts as the TCP/IP Modbus server (slave).

  1. From In-Sight Explorer's In-Sight Network pane, select the In-Sight vision system or emulator to be configured.
  2. From the File menu, select New Job to load a new job on to a vision system or emulator.
  3. From the Palette, select the Snippets tab and expand the Communications folder. Load the DeviceNetGateway.cxd file to cell A2 in the In-Sight Explorer spreadsheet by either first selecting A2 and double-clicking on the DeviceNetGateway.cxd or drag-and-drop the file into cell A2.
  4. Save the new job to the vision system or emulator as DeviceNetGateway.job.
  5. Double-click cell A5 and enter the IP Address of the Anybus X-gateway (if necessary, run the HMS Anybus IPconfig software utility to return the Anybus X-gateway's IP address).
  6. TCP/IP Modbus communications require that an In-Sight client (master) has the following functions present in the job: TCPDevice and QueryDevice. The TCPDevice function is used to create the network connection between the remote device, in this case, the Anybus X-gateway, and an In-Sight vision system. The QueryDevice function is used to construct the Modbus Function Code command of the TCP/IP Modbus packet. The DeviceNetbusGateway.cxd file contains a TCPDevice function at cell C5, and two QueryDevice functions: one in cell B15 for Read requests, and the other in cell B27, for Write requests.

  7. The Anybus X-gateway supports the following Modbus Function Codes in the QueryDevice function:

    Function Code | Function Name
    3 | Read multiple registers
    4 | Read input registers
    6 | Write single register
    7 | Read exception status
    8 | Diagnostics
    16 | Force multiple registers
    22 | Mask write register
    23 | Read/Write registers

  8. Double-click the QueryDevice function, located in cell B15, and ensure that it has the following parameter settings:

    Note: Refer to the Modbus Implementation Guide published by Modbus, for more information on the Modbus packet structure.
    Parameter Input Number | Parameter Input Name | Parameter Input Value | Description
    1 | Event | $A$15 | A cell reference to an Event button.
    2 | Device | $C$5 | A cell reference to the TCPDevice function in cell C5.
    3 | Data | 0 | Modbus header, Transaction Identifier, upper byte = 0.
    4 | Data | 0 | Modbus header, Transaction Identifier, lower byte = 0.
    5 | Data | 0 | Modbus header, Protocol Identifier, upper byte = 0.
    6 | Data | 0 | Modbus header, Protocol Identifier, lower byte = 0.
    7 | Data | 0 | Field Length, upper byte = 0.
    8 | Data | 6 | Field Length, lower byte = 6 (bytes to follow).
    9 | Data | 0 | Unit ID, byte not used = 0.
    10 Data $C$12+3

    Modbus Function Code byte; in this example, this input will equal 3 or 4.

    Note: When the Modbus Function Code byte is set to 3, In-Sight reads the holding registers (the data written via TCP/IP Modbus); when the Modbus Function Code byte is set to 4, In-Sight reads the input registers (data written via DeviceNet).
    11 Data 0

    Modbus reference address, upper byte = 0.

    Note: Input registers may be read using Read multiple registers (Function Code 3) from address 1000, or using Read input registers (Function Code 4) from address 0.
    12 Data 0

    Modbus reference address, lower byte = 0.

    Note: Input registers may be read using Read multiple registers (Function Code 3) from address 1000, or using Read input registers (Function Code 4) from address 0.
    13 | Data | 0 | Word (register) count, upper byte = 0.
    14 | Data | $B$8 | Word (register) count, lower byte; in this example, this input will equal 1, 2, 3, 5 or 8.

  9. The TCP/IP Modbus response packet from the Anybus X-gateway is stored in the binary structure of the QueryDevice function; these return values are read in In-Sight Explorer by the BGetInt function. This function returns integer values from a specific byte from a binary structure, and the response is formatted as follows:

    Byte Number | Modbus Response | Description
    7 | Modbus Function Code | In this example, 3 or 4. If the command fails, 128 is added to the Function Code (the value returned would then be 131 or 132, see cell E15).
    8 | Byte Count | In this example, 2 registers (words) = 4 bytes. See cell E15.
    9/10 | Value in Register 0 | These values are in the two-byte format. In the DeviceNetGateway.cxd file, the BGetInt function in cell D18 reads the binary value at Byte 9 (the lower byte of the word read).
    11/12 | Value in Register 1 | These values are in the two-byte format. In the DeviceNetGateway.cxd file, the BGetInt function in cell D19 reads the binary value at Byte 11 (the lower byte of the word read).
    13/14 | Value in Register 2 | These values are in the two-byte format. In the DeviceNetGateway.cxd file, the BGetInt function in cell D20 reads the binary value at Byte 13 (the lower byte of the word read).
    15/16 | Value in Register 3 | These values are in the two-byte format. In the DeviceNetGateway.cxd file, the BGetInt function in cell D21 reads the binary value at Byte 15 (the lower byte of the word read).
    17/18/19/20 | Value in Registers 4 and 5 that store a floating-point number | These values are in the floating-point format. In the DeviceNetGateway.cxd file, the BGetInt function in cell D22 reads the binary value at Byte 17 (the lower byte of the word read).
    21/22/23/24/25/26 | Value in Registers 6, 7 and 8 that store a string (in byte array) | These values are in the string format. In the DeviceNetGateway.cxd file, the BGetInt function in cell D23 reads the binary value at Byte 21 (the lower byte of the word read).
  10. The QueryDevice function, in cell B27, for the Write request, is formatted in the same manner as the Request and Response packets.

Read Data to an In-Sight Vision System From a PLC via DeviceNet

Following the example provided by this model, the Input Buffer of the Anybus X-gateway is the data source being read; this buffer holds the data requested by the In-Sight vision system (on the TCP/IP Modbus network) from the PLC (on the DeviceNet network).

  1. Continue using the In-Sight Explorer job created in the Setting Up TCP/IP Modbus Communications in In-Sight Explorer section.
  2. Open the RSLogix and load the PLC's project.

  3. Under the I/O Configuration Folder, right click on the DeviceNet Module (1756-DNB in this example) and select properties.

  4. Click on the RSNetWorx tab and add the configuration file that was created in the previous section. Click OK.

  5. Add a coil to the ladder program to set the DeviceNet scanner in run mode.

  6. In RSLogix, right click in the Data Types -> User-Defined folder and select New Data Type from the menu.
  7. Name the Data Type AnyBusData. In the members of the type place the following:
    • 4 integers
    • A Real

    • An array of SINT[6] displayed as ASCII

  8. Add a new tag to the project’s Controller Tags, using the user defined data type (InSightData in this example).

  9. Finally, add a COP instruction to the main routine ladder logic program to copy the data from the DeviceNet buffer (Local:1:0.Data[0]) to the InSightData tag.

  10. Load the updated project into the controller, Go Online, and start in run Mode.
  11. Enter values for the items in the InsightData tag.
  12. Put the In-Sight vision system Online.
  13. In cell A8 of the DeviceNetGateway.cxd file, select 9 for the number of registers (18 bytes).

  14. In cell NC, select Input Registers from the drop-down list for the Read Registers.

  15. Click on the Read Button in cell A15 to update the results. The values in cells D18-D23 should change to reflect the values that were entered in the Controller Tags.

Write Data from an In-Sight Vision System to a PLC via DeviceNet

Following the example provided by this model, the Output Buffer of the Anybus X-gateway is the data source being written to; this buffer holds the data written by the In-Sight vision system (on the TCP/IP Modbus network) to the PLC (on the DeviceNet network).

  1. In cell A8 of the ProfibusGateway.cxd file, select 8 for the number of registers (16 bytes).
  2. In cell C12, select Holding Registers from the drop-down list for the Read Registers; this will read data from the same registers that are being written from within the In-Sight job.

  3. Next, adjust the values in cells D30-D34 so that they are valid data types for the application. Enter values into the EditInt cells for the three integers in cells D31-D34 (the range of the value is –32768 to 32767; the value must be a valid integer between that range); the floating-point value in cell D35 (the range of the value is ±1.175495e-38 to ±3.402823e+38; the value must be a valid floating-point value between that range); and the 6 byte string in cell D36 (the string can be no longer than 6 characters/bytes).

  4. Click the Write Button in the cell A27 to write the results from the In-Sight Explorer spreadsheet to the PLC.

  5. In RSLogix, open the previous project and add another rung to write the data from the gateway to the InsightData tag.

  6. Load the updated project into the controller, Go online, and start in run mode.

  7. Open the Controller tags and monitor the changes to user created InSightData tag.


Robot Communications - ABB Robot Controller

Overview

The purpose of this topic is to outline the steps to connect and transfer data from an In-Sight vision system to a ABB Robot Controller.For this topic, the robot controller will be the device controlling the acquisition and transfer of data.In general, the robot controller, with the use of In-Sight Native Mode commands, will trigger the vision system to acquire and process an image and then the robot controller will request specific data from the vision system.Data can be transferred using serial or Ethernet communications. For more information, see Native Mode Commands.

Required Hardware

  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)

  • For serial communications, an I/O module, Breakout cable (In-Sight 5000 series or In-Sight 7000 series only).

    Note:
    • While serial-based robot communications are supported with the Breakout cable (In-Sight 5000 series or In-Sight 7000 series only), an I/O module is recommended for ease of setup.
    • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
    • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
    • The CIO-WENET Ethernet I/O module does not support serial communication.
  • DB9 Serial Cable or Ethernet Cable
  • Computer
  • ABB Robot Controller (IRC5, S4Cplus or S4P+)
  • PC Interface (Recommended for Ethernet communications but not required)
  • Vision System Interface (for Serial communications)

Required Software

  • Cognex In-Sight Explorer version 3.3.0 or higher
  • Cognex In-Sight firmware version 3.3.0 or higher
  • ABB RAPID programming language

Serial Communications

Robot Controller RAPID code

MODULE VISION! DATA DECLARATIONSPERS num nXOffs:=0;PERS num nYOffs:=0;PERS num nAngle:=0;VAR string stReceived;VAR iodev ComChannel;PERS tooldata tGripper:=[TRUE,[0,0,0],[0,0,0,1]],[5,[0,0,],[1,0,0,0],0,0,0]];PERS tooldata tVision:=[TRUE,[[0,0,0],[0,0,0,1]],[5,[0, 0, 0],[1,0,0,0],0,0,0]];CONST robtarget pHome:=[[0,0,0],[0,0,0,1],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];CONST robtarget pVisionPos:=[[0,0,0],[0,0,0,1],[-2,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];PROC Main()MoveL pHome,v1000,fine,tVision;GetVisionData;MoveL Reltool(pVisionPos,nXOffs,nYOffs,0\Rz:=nAngle),v500,fine,tGripper;WaitTime 3;MoveL pHome,v1000,fine,tVision;ENDPROCPROC GetVisionData()VAR string XData:="";VAR string YData:="";VAR string AngleData:="";VAR num NumCharacters:=9;VAR bool bOK;nXOffs:=0;nYOffs:=0;nAngle:=0;Close ComChannel;Open "COM2", ComChannel \Append\Bin;ClearIOBuff ComChannel;WaitTime\InPos, 0.5;! Instruction In-Sight to Acquire an Image! and not return until completeWriteStrBin ComChannel, "sw8\0D";CheckStatus;! Get the value in cell C7WriteStrBin ComChannel, "gvc007\0D";CheckStatus;! Read the X-offsetXData:= ReadStrbin (ComChannel, NumCharacters \Time:=5);! Read the Y-offsetYData:= ReadStrbin (ComChannel, NumCharacters \Time:=5);! Read the Angle-offsetAngleData:= ReadStrbin (ComChannel, NumCharacters \Time:=5);!Closes Serial Channel "COM2"Close ComChannel;!Convert String Data To Numerical DatabOK:=StrToVal(XData,nXOffs);bOK:=StrToVal(YData,nYOffs);bOK:=StrToVal(AngleData,nAngle);ENDPROCPROC CheckStatus()stReceived:=ReadStrBin(ComChannel,1\Time:=5);IF stReceived&lt;&gt;"1" THENTPErase;TPWrite "Vision Error!";Stop;ENDIFClearIOBuff ComChannel;ENDPROCENDMODULE

In-Sight Serial Port Setup

While connected to the vision system (with the vision system Offline):

  1. On the Sensor menu, click Serial Port Settings.

  2. Click the I/O Module button to open the I/O Module Configuration dialog and configure the I/O module. Press the OK button to close the I/O Module Configuration dialog and return to the Serial Port Settings dialog.

    Note: If the vision system is configured for use with the CIO-MICRO or CIO-MICRO-CC I/O module, the RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.

  3. Set the following properties in the Serial Port Settings dialog:

    • Baud Rate: 115200
    • Data Bits: 8 (set by default when using the CIO-1400)
    • Stop Bits: 1 (set by default when using the CIO-1400)
    • Parity: None
    • Handshake: None
    • Mode: Native
    • Fixed Input Length: Disabled
    • Input Terminator: 13
    • Output Terminator: 13
  4. Verify that the dialog displays the "(attached)" message next to the I/O modulethat is physically attached to the vision system.
  5. Click OK.

In-Sight Job Setup

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and, from the Palette's Snippets tab, insert the Communication > Robots > ABB.cxd Snippet into the spreadsheet.
  6. Define the coordinate cell references:
    • X: Double-click C6, double-click C2,
    • Y: Double-click D6, double-click D2
    • Angle: Double-click E6, double-click E2
  7. Press the Manual Trigger icon a few times to confirm that data from the ExtractBlobs function is changing.
  8. Save the job.
  9. Put the vision system Online.

Ethernet Communications

Robot Controller Setup

The code example shows the controller connecting to an In-Sight vision system with the IP address 192.168.0.1; To find the IP address of your vision system, from In-Sight Explorer, right-click the vision system name in the In-Sight Network tree and select Properties.

Robot Controller RAPID code
MODULE VISION! DATA DECLARATIONSPERS num nXOffs:=0;PERS num nYOffs:=0;PERS num nAngle:=0;VAR string stReceived;VAR socketdev ComSocket;PERS tooldata tGripper:=[TRUE,[0,0,0],[0,0,0,1]],[5,[0,0,],[1,0,0,0],0,0,0]];PERS tooldata tVision:=[TRUE,[[0,0,0],[0,0,0,1]],[5,[0, 0, 0],[1,0,0,0],0,0,0]];CONST robtarget pHome:=[[0,0,0],[0,0,0,1],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];CONST robtarget pVisionPos:=[[0,0,0],[0,0,0,1],[-2,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];PROC Main()ConnectToInSight ;MoveL pHome,v1000,fine,tVision;GetVisionData;MoveL Reltool(pVisionPos,nXOffs,nYOffs,0\Rz:=nAngle),v500,fine,tGripper;WaitTime 3;MoveL pHome,v1000,fine,tVision;GetVisionData;MoveL Reltool(pVisionPos,nXOffs,nYOffs,0\Rz:=nAngle),v500,fine,tGripper;WaitTime 3;MoveL pHome,v1000,fine,tVision;SocketClose ComSocket;ENDPROCPROC GetVisionData()VAR string XData:="";VAR string YData:="";VAR string AngleData:="";VAR num NumCharacters:=9;VAR bool bOK;nXOffs:=0;nYOffs:=0;nAngle:=0;status := SocketGetStatus(ComSocket);IF status &lt;&gt; SOCKET_CONNECTED THENTPErase;TPWrite "Vision Sensor Not Connected";Return;ENDIF! Instruct In-Sight to Acquire an Image! and not return until completeSocketSend ComSocket \Str:="sw8\0d\0a";CheckStatus;SocketReceive ComSocket \Str:=stReceived;! Get the value in cell C7SocketSend ComSocket \Str:="gvc007\0d\0a";! Read the dataSocketReceive ComSocket \Str:=stReceived;! Parse the data stringXData:= StrPart(stReceived, 3, NumCharacters);YData:= StrPart(stReceived, NumCharacters, NumCharacters);AngleData:= StrPart(stReceived, 2*NumCharacters, NumCharacters);!Convert String Data To Numerical DatabOK:=StrToVal(XData,nXOffs);bOK:=StrToVal(YData,nYOffs);bOK:=StrToVal(AngleData,nAngle);SocketClose ComSocket;ENDPROCPROC CheckStatus()SocketReceive ComSocket \Str:=stReceived;IF stReceived &lt;&gt; "1\0d\0a" THENTPErase;TPWrite "Vision Error!";Stop;ENDIFENDPROCPROC ConnectToInSight()var num found:=0;var num length:=0;SocketCreate ComSocket;SocketConnect ComSocket, "192.168.0.1", 23;SocketReceive ComSocket \Str:=stReceived;Length:=strlen(stReceived);found:=strmatch(stReceived,1,"User:");IF found = length+1 THENTPErase;TPWrite "Vision Login Error (User Prompt)";Stop;ENDIF! Send the UsernameSocketSend ComSocket \Str:="admin\0d\0a";SocketReceive ComSocket \Str:=stReceived;IF stReceived &lt;&gt; "Password: " THENTPErase;TPWrite "Vision Login Error (Password Prompt)";Stop;ENDIF! Send PasswordSocketSend ComSocket \Str:="\0d\0a";SocketReceive ComSocket \Str:=stReceived;IF stReceived &lt;&gt; "User Logged In\0d\0a" THENTPErase;TPWrite "Vision Login Error (Final Login)";Stop;ENDIFENDPROCENDMODULE

In-Sight Job Setup

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and, from the Palette's Snippets tab, insert the Communication > Robots > ABB.cxd Snippet into the spreadsheet.
  6. Define the coordinate cell references:
    • X: Double-click C6, double-click C2,
    • Y: Double-click D6, double-click D2
    • Angle: Double-click E6, double-click E2
  7. Press the Manual Trigger icon a few times to confirm that data from the ExtractBlobs function is changing.
  8. Save the job.
  9. Put the vision system Online.

Troubleshooting

Serial with HyperTerminal

In-Sight Serial Port Setup

While connected to the vision system (with the vision system Offline):

  1. On the Sensor menu, click Serial Port Settings.

  2. Click the I/O Module button to open the I/O Module Configuration dialog and configure the I/O module. Press the OK button to close the I/O Module Configuration dialog and return to the Serial Port Settings dialog.

    Note: If the vision system is configured for use with the CIO-MICRO or CIO-MICRO-CC I/O module, the RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.

  3. Set the following properties in the Serial Port Settings dialog:

    • Baud Rate: 115200
    • Data Bits: 8 (set by default when using the CIO-1400)
    • Stop Bits: 1 (set by default when using the CIO-1400)
    • Parity: None
    • Handshake: None
    • Mode: Native
    • Fixed Input Length: Disabled
    • Input Terminator: 13
    • Output Terminator: 13
  4. Verify that the dialog displays the "(attached)" message next to the I/O module that is physically attached to the vision system.
  5. Click OK.

Set Up a Test Job

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and type FindBlobs and press Enter (at this point the FindBlobs property sheet will be displayed).
  6. Reference cell B2 for the Blobs parameter.
  7. Click OK.
  8. Press the Manual Trigger icon a few times to confirm that data is changing.
  9. Put the vision system Online.

Connect to an In-Sight Vision System

  1. From Windows, click Start > All Programs > Accessories > Communications > HyperTerminal.
  2. Create a New Connection (File > New Connection).
    • Port: COM1
    • Bits per second: 115200
    • Data bits: 8
    • Parity: None
    • Stop bits: 1
    • Flow Control: None
  3. Click File > Properties > Settings.
    • Emulation: ANSI
    • ANSII Setup (for viewing ease) set the following:
      • Send line ends with line feeds
      • Echo typed characters locally
      • Append line feeds to incoming line ends
      • Wrap lines that exceed terminal width
  4. Click Connect.
  5. Enter the vision system's user name then password (default user name is admin and the password in blank).
  6. You should now see "User Logged In".
  7. Type: SW8 and press Enter (this will cause a manual trigger and the image should change).
  8. Type: GVC004 and press Enter (this will get the value stored in cell C4).

Verify Ethernet Connection with Telnet

Set Up a Test Job

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and type FindBlobs and press Enter (at this point the FindBlobs property sheet will be displayed).
  6. Reference cell B2 for the Blobs parameter.
  7. Click OK.
  8. Press the Manual Trigger icon a few times to confirm that data is changing.
  9. Put the vision system Online.

Connect to an In-Sight Vision System

  1. From Windows, click Start > Run...
  2. In the Run window type: telnet <sensor's IP Address> (example: telnet 10.27.80.66).
  3. Click OK.
  4. Enter the vision system's user name then password (default user name is admin and the password in blank).
  5. You should now see "User Logged In".
  6. Type: SW8 and press Enter (this will cause a manual trigger and the image should change).
  7. Type: GVC004 and press Enter (this will get the value stored in cell C4).
  8. To disconnect your telnet session type CTRL + ].
  9. Type "quit" to close the window.


Robot Communications - DENSO Robot Controller

Overview

The purpose of this topic is to outline the steps to connect and transfer data from an In-Sight vision system to a DENSO Robot Controller. For this topic, the robot controller will be the device controlling the acquisition and transfer of data. In general, the robot controller, with the use of In-Sight Native Mode commands, will trigger the vision system to acquire and process an image and then the robot controller will request specific data from the vision system. For more information, see Native Mode Commands.

Required Hardware

  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)

  • For serial communications, an I/O module, Breakout cable (In-Sight 5000 series or In-Sight 7000 series only).

    Note:
    • While serial-based robot communications are supported with the Breakout cable (In-Sight 5000 series or In-Sight 7000 series only), an I/O module is recommended for ease of setup.
    • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
    • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
    • The CIO-WENET Ethernet I/O module does not support serial communication.
  • RS-232 Serial Cable (Null-Modem) or Ethernet Cable (Cross Type)
  • Computer
  • DENSO Robot Controller (RC-5 or RC-7 version)
  • PC Interface (Recommended for In-Sight set-up)
  • Vision System Interface (for Serial communications)

Required Software

  • Cognex In-Sight Explorer version 3.3.0 or higher

    Note: To find the IP address of your vision system, from In-Sight Explorer, right-click the vision system name from the In-Sight Network pane and select Properties.
  • Cognex In-Sight firmware version 3.3.0 or higher
  • DENSO Robot Controller (RC-5 or RC-7)
  • DENSO Wincaps II Simulation Software (optional)

DENSO Setup

For Ethernet connection use cross-type Ethernet cable.

  1. Set DENSO Controller IP Address.
  2. From the top screen of the Teach Pendant:
    • Press [F6 Set], [F5 Set Com], [F4 Address]
    • Select item to be changed and press [F5 Change]

    • Enter the desired IP address and press OK. For this example, use the following IP address for the controller: 192.168.0.1

      Note: For further instructions on entering program code, refer to the DENSO Owner's Manual CD - Setting Up Manual - Chapter 5 - Editing a program in manual mode.
    • Calibrate the DENSO Robot. For more information, see Calibrate Functions.

Create a New Program in the DENSO RC-5 or RC-7 Controller

  1. Switch Teach Pendant to Manual Mode.
  2. From the top screen of the Teach Pendant.
    • Press [F1 Program]
    • Press [F1 New Program]
    • When dialog box appears asking you to create a new program - press OK
    • Enter the name of your new program and press OK. For this example, use the name PRO1

  3. Enter the following sample code in PRO1.

    Note: For further instructions on entering program code, refer to the DENSO Owner's Manual CD - Setting Up Manual - Chapter 5 - Editing a program in manual mode.
    • Sample code is for a 4-Axis DENSO robot and assumes the following:
      • P1 will be the "Pick Point" found by the vision system
      • IO104 will activate a gripper on End of Arm Tooling
      • Approach and Depart Height will be 75mm each
      • "Z" Height for pick point will not change
        • '!TITLE "PRO1"
PROGRAM PRO1
TAKEARM
SPEED 100

FLUSH #4
INPUT #4, F1, F2, F3
DELAY 100

LETX P1 = F1
LETY P1 = F2
LETT P1 = F2

APPROACH P, P1 75
MOVE L, @E P1
SET IO104
DELAY 75
DEPART L, 100

Save the Sample Program and Make It Active

  1. After entering the sample program press [F6 Save].
  2. Press OK to save the newly entered program.
  3. Select PRO1 in the program list.
  4. Press [F12 Config].
  5. Select "Make the specified program active" and press OK.
  6. Press OK to start compiling.

  7. Press OK to acknowledge the "local variable initialized" error.

    Note: For further instructions, please refer to the DENSO Owner's Manual CD - Beginners Guide - Chapter 2.1 - Creating a program.

After establishing communication with the In-Sight vision system, running this program will input the data to the DENSO Controller and move to the new pick position. Please refer to the In-Sight documentation to set up the vision system portion of the project.


Robot Communications - FANUC Robot Controller

Overview

The purpose of this topic is to outline the steps to connect and transfer data from an In-Sight vision system to a FANUC Robot Controller. For this topic, the robot controller will be the device controlling the acquisition and transfer of data. In general, the robot controller, with the use of In-Sight Native Mode commands, will trigger the vision system to acquire and process an image and then the robot controller will request specific data from the vision system. Data can be transferred using serial or Ethernet communications. For more information, see Native Mode Commands.

Serial Communications

This section provides instructions for establishing communication between a FANUC robot controller and an In-Sight vision system over a serial connection.

Requirements

Required Hardware

  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)
  • For serial communications, an I/O module, Breakout cable (In-Sight 5000 series or In-Sight 7000 series only).
    Note:
    • While serial-based robot communications are supported with the Breakout cable (In-Sight 5000 series or In-Sight 7000 series only), an I/O module is recommended for ease of setup.
    • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
    • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
    • The CIO-WENET Ethernet I/O module does not support serial communication.
  • DB9 Serial Cable
  • Computer
  • FANUC Robot Controller (RJ2 or RJ3)
  • K-Floppy Cable (DB25 to DB9)
  • Null Modem Adapter (DB9 to DB9)

Required Software

  • Cognex In-Sight Explorer version 3.3 or higher
  • Cognex In-Sight Explorer firmware version 3.3 or higher
  • FANUC KAREL® programming language

KAREL Robot Controller Code

VAR
  file_var     :FILE
  Status       :STRING[4]
  xs           :STRING[9]
  ys           :STRING[9]
  angles       :STRING[9]
  x            :REAL
  y            :REAL
  angle        :REAL

BEGIN
-- Connect to In-Sight
OPEN FILE file_var ('RW', 'P2:')

-- Instruction In-Sight to Acquire an Image
-- (wait for a response)
WRITE file_var ('sw8',CHR(13))

-- Read status
READ file_var (status::1::0)
IF status &lt;&gt; '1' THEN
  WRITE TPDISPLAY('sw8 Failed',CR)
  RETURN
ENDIF

CLR_IO_STAT(file_var)

-- Get the value in cell C7
WRITE file_var ('gvc007',CHR(13))

-- Read status
READ file_var (status::1::0)
IF status &lt;&gt; '1' THEN
  WRITE TPDISPLAY('gvc007 Failed',CR)
  RETURN
ENDIF

CLR_IO_STAT(file_var)

-- Read the data
-- This will split the information at the quotations "'".
-- Example String '10.5''9.8''15.9'
READ file_var (xs::0::2, ys::0::2, angles::0::2, CR)

-- Convert the data
CNV_STR_REAL(xs, x)
CNV_STR_REAL(ys, y)
CNV_STR_REAL(angles, angle)

-- Remove comment for testing
-- WRITE TPDISPLAY('X:',x,CR,'Y:',y,CR,'R',Angle,CR)

--
-- Use Vision Data
--

-- Close the connection
CLOSE FILE file_var

In-Sight Serial Port Setup

While connected to the vision system (with the vision system Offline):

  1. On the Sensor menu, click Serial Port Settings.

  2. Click the I/O Module button to open the I/O Module Configuration dialog and configure the I/O module. Press the OK button to close the I/O Module Configuration dialog and return to the Serial Port Settings dialog.

    Note: If the vision system is configured for use with the CIO-MICRO or CIO-MICRO-CC I/O module, the RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.

    Set the following properties in the Serial Port Settings dialog:

    • Baud Rate: 19200
    • Data Bits: 8 (set by default when using the CIO-1400)
    • Stop Bits: 1 (set by default when using the CIO-1400)
    • Parity: None
    • Handshake: None
    • Mode: Native
    • Fixed Input Length: Disabled
    • Input Terminator: 13
    • Output Terminator: 0
    • Verify that the dialog displays the "(attached)" message next to the I/O module that is physically attached to the vision system.
  3. Click OK.

In-Sight Job Setup

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and, fromthe Palette's Snippets tab, insert the Communication > Robots > FANUC.cxd Snippet into the spreadsheet.
  6. Define the coordinate cell references:
    • X: Double-click C6, double-click C2,
    • Y: Double-click D6, double-click D2
    • Angle: Double-click E6, double-click E2
  7. Press the Manual Trigger icon a few times to confirm that data from the ExtractBlobs function is changing.
  8. Save the job.
  9. Put the vision system Online.

Ethernet Communications

This section covers the two options for configuring communication between a FANUC robot controller and an In-Sight vision system over Ethernet communications.

TCP/IP

This section covers how to configure communication between a FANUC robot controller and an In-Sight vision system over TCP/IP.

Requirements

Required Hardware
  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)
  • Ethernet Cable
  • Computer
  • FANUC Robot Controller (RJ2 or RJ3)
Required Software
  • Cognex In-Sight Explorer version 3.3 or higher
  • Cognex In-Sight Explorer firmware version 3.3 or higher
  • FANUC KAREL programming language

KAREL Robot Controller Setup

Configuring the Socket Messaging Option

The tag you want to setup cannot be configured for use by another device on your network.

Set up the Client Tag

  1. Cold start the controller.
    • On the teach pendant , press and hold the SHIFT and RESET keys. Or, on the operator panel , press and hold RESET.
    • While still pressing SHIFT and RESET on the teach pendant (or RESET on the operator panel), press the ON button on the operator.
    • Release all keys.
  2. On the teach pendant, press MENUS.
  3. Select SETUP.
  4. Press F1, [TYPE].
  5. Select Host Comm.
  6. Press F4, [SHOW].
  7. Choose Clients.

  8. Move the cursor to the tag you want set up for Socket Messaging, and press F3.You will see a screen similar to the following:

    SETUP Tags
    Tag C3:

    ****************
    1 Comment:

    SM
    2 Protocol name:

    *****
    3 Port name:

    *************************
    4 Mode:

    UNDEFINED
    Current

    ********
    State:

    ****************************
    5 Remote:

    192.168.0.1
    6 Path:

    ****************************
    Startup

    OFF
    7 State:

    15 min
    8 Remote:

    9 Path:

    Options

    10 Error Reporting:

    11 Inactivity Timeout:

  9. Move the cursor to Protocol name, and press F4, [CHOICE].
  10. Select SM.
  11. Move the cursor to StartupState, and press F4, [CHOICE].
  12. Select Start, and press ENTER.
  13. Select Remote, and press ENTER.
  14. Type in the of the remote host server you want to use for socket messaging, and press F2, [ACTION].

  15. Select DEFINE.

    Note: If you are not using DNS, you must add the remote host and its IP address into the host entry table.

Set the System Variable (Client Tag)

  1. Press MENUS.
  2. Select NEXT.
  3. Select SYSTEM, and press F1, [TYPE].
  4. Select Variables.
  5. Move the cursor to $HOSTC_CFG, and press ENTER.

  6. Move the cursor to the structure corresponding to the tag selected in the previous section, Set up the Tag.For example, if you are setting up tag S3, move the cursor structure element [3], as shown in the following screen.

    SYSTEM Variables
    $HOSTS_CFG
    1 [1] | HOST_CFG_T
    2 [2] | HOST_CFG_T
    3 [3] | HOST_CFG_T
    4 [4] | HOST_CFG_T
    5 [5] | HOST_CFG_T
    6 [6] | HOST_CFG_T
    7 [7] | HOST_CFG_T
    8 [8] | HOST_CFG_T

  7. Press ENTER.You will see a screen similar to the following.

    SYSTEM Variables
    $HOSTS_CFG[3]
    1 $COMMENT | *uninit*
    2 $PROTOCOL | 'SM'
    3 $PORT | *uninit*
    4 $OPER | 3
    5 $STATE | 3
    6 $MODE | *uninit*
    7 $REMOTE | *uninit*
    8 $REPERRS | FALSE
    9 $TIMEOUT | 15
    10 $PATH | *uninit*
    11 $STRT_PATH | *uninit*
    12 $STRT_REMOTE | *uninit*
    13 $USERNAME | *uninit*
    14 $PWRD_TIMOUT | 0
    15 $SERVER_PORT | 23
  8. Move the cursor to $SERVER_PORT.Type in the name of the TCP/IP server port you want to use for socket messaging.
  9. The client tag is now ready to use from a KAREL program.

KAREL Robot Controller Code

The code example shows the controller connecting to an In-Sight vision system with IP address 192.168.0.1; To find the IP address of your vision system, from In-Sight Explorer, right-click the vision system name in the In-Sight Network pane and select Properties.

PROGRAM eComm
VAR
  file_var : FILE
  tmp_int  : INTEGER
  mp_str   : STRING[128]
  status   : INTEGER
  entry    : INTEGER
  try      : INTEGER
  statuss      :STRING[1]
  xs           :STRING[9]
  ys           :STRING[9]
  angles       :STRING[9]
  x            :REAL
  y            :REAL
  angle        :REAL
BEGIN
  WRITE TPDISPLAY(CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR,CR)
  SET_FILE_ATR(file_var, ATR_IA)

  -- Connect the tag
  WRITE TPDISPLAY('Connecting...',CR)
  MSG_DISCO('C3:', status)
  MSG_CONNECT('C3:',status)
  OPEN FILE file_var('rw','C3:')

  -- Read the In-Sight Welcome message
  WRITE TPDISPLAY('Logging In',CR)
  mp_str =''
  READ file_var(mp_str)
  WRITE TPDISPLAY(mp_str,CR)

  -- Read User: prompt
  READ file_var(mp_str::6::0)
  IF UNINIT(mp_str) THEN
    mp_str = ''
  ENDIF
  WRITE TPDISPLAY(mp_str,CR)
  IF (mp_str &lt;&gt;'User: ') THEN
    WRITE TPDISPLAY('User Failed',CR)
    --Error
    RETURN
  ENDIF

  --Send User Name
  WRITE file_var('admin',CHR(13),CHR(10))

  -- Read Password prompt
  mp_str =''
  READ file_var(mp_str::10::0)
  IF UNINIT(mp_str) THEN
    mp_str = ''
  ENDIF
  WRITE TPDISPLAY(mp_str,CR)
  IF (mp_str &lt;&gt;'Password: ') THEN
    WRITE TPDISPLAY('Password Failed',CR)
    --Error
    RETURN
  ENDIF

  --Send Password
  WRITE file_var('',CHR(13),CHR(10))

  -- Read Login Response
  mp_str =''
  READ file_var(mp_str)
  IF UNINIT(mp_str) THEN
    mp_str = ''
  ENDIF
  WRITE TPDISPLAY(mp_str,CR)
  IF (mp_str &lt;&gt; 'User Logged In') THEN
    WRITE TPDISPLAY('Log In Failed',CR)
    --Error
    RETURN
  ENDIF

  -- Instruction In-Sight to Acquire an Image
  -- (wait for a response)
  WRITE TPDISPLAY('Trigger',CR)
  WRITE file_var ('sw8',CHR(13),CHR(10))

  -- Read Status
  READ file_var (statuss)
  IF statuss &lt;&gt; '1' THEN
    WRITE TPDISPLAY('sw8 Failed',CR)
    RETURN
  ENDIF

  -- Get the value in cell C7
  WRITE TPDISPLAY('Get Value C7',CR)
  WRITE file_var ('gvc007',CHR(13),CHR(10))

  -- Read Status
  READ file_var (statuss)
  IF statuss &lt;&gt; '1' THEN
    WRITE TPDISPLAY('gvc007 Failed',CR)
    RETURN
  ENDIF

  -- Read the data
  -- This will split the information at the quotations "'".
  -- Example String '10.5''9.8''15.9'
  READ file_var (xs::0::2, ys::0::2, angles::0::2, CR)

  --Disconnect Socket
  MSG_DISCO('C3:', status)

  -- Convert the data
  CNV_STR_REAL(xs, x)
  CNV_STR_REAL(ys, y)
  CNV_STR_REAL(angles, angle)
  WRITE TPDISPLAY('X:',x,CR,'Y:',y,CR,'R',Angle,CR)
END eComm

In-Sight Job Setup

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and, from the Palette's Snippets tab, insert the Communication > Robots > FANUC Communications Snippet into the spreadsheet.
  6. Define the coordinate cell references:
    1. X: Double-click C6, double-click C2,
    2. Y: Double-click D6, double-click D2
    3. Angle: Double-click E6, double-click E2
  7. Press the Manual Trigger icon a few times to confirm that data from the ExtractBlobs function is changing.
  8. Save the job.
  9. Put the vision system Online.

EtherNet/IP

This section covers how to configure communication between a FANUC robot controller and an In-Sight vision system over EtherNet/IP (EIP). In this example setup scenario, the robot controller will be the device that controls the acquisition and subsequent transfer of data from the vision system. In general, the robot controller will trigger the vision system to acquire and process an image for X, Y and angle data. EtherNet/IP communications will be used to trigger the vision system and send data to the robot controller, while 16-bit digital input lines will be used to transfer the 2D part location.

Note:
  • Negative floating point numbers cannot be sent over input lines, all numbers will be multiplied by 10 by the vision system, and subsequently divided by 10 by the robot controller.
  • The I/O configuration used in this section is an example, and the actual I/O configuration may vary. EtherNet/IP uses rack 89, though slot placement may vary by installation; this example uses rack 89 and slot 1.

Requirements

Required Hardware
  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)
  • Ethernet Cable
  • Computer
  • FANUC Robot Controller (R-30iA™)
Required Software
  • In-Sight Explorer version 4.8 or higher
  • In-Sight Explorer firmware version 4.8 or higher
  • FANUC Software R540 EtherNet/IP I/O Scanner
  • FANUC Teach Pendant Programming (TPP)

EtherNet/IP Setup

  1. Connect to the In-Sight vision system that will be communicating with the robot controller.
  2. From the Sensor menu, select Network Settings... to open the Network Settings dialog.

  3. Set the Industrial Ethernet Protocols to EtherNet/IP.

TPP Robot Controller Setup

  1. Launch the FANUC R540 EtherNet/IP I/O Scanner software.
  2. Press MENU.
  3. Select I/O.

  4. Press F1, [TYPE], and select EtherNet/IP.A screen similar to the below will be displayed:

    EtherNet/IP List(Rack 89) 1/32
    Description | TYP | Enable | Status | Slot
    Connection1 | ADP | FALSE | OFFLINE | 1
    Connection2 | ADP | FALSE | OFFLINE | 2
    Connection3 | ADP | FALSE | OFFLINE | 3
    Connection4 | ADP | FALSE | OFFLINE | 4
    Connection5 | ADP | FALSE | OFFLINE | 5
    Connection6 | ADP | FALSE | OFFLINE | 6
    Connection7 | ADP | FALSE | OFFLINE | 7
    Connection8 | ADP | FALSE | OFFLINE | 8
    Connection9 | ADP | FALSE | OFFLINE | 9
    ConnectionA | ADP | FALSE | OFFLINE | 10
    ConnectionB | ADP | FALSE | OFFLINE | 11
    ConnectionC | ADP | FALSE | OFFLINE | 12
    ConnectionD | ADP | FALSE | OFFLINE | 13
    ConnectionE | ADP | FALSE | OFFLINE | 14
    ConnectionF | ADP | FALSE | OFFLINE | 15
    ConnectionG | ADP | FALSE | OFFLINE | 16
    ConnectionH | ADP | FALSE | OFFLINE | 17
    ConnectionI | ADP | FALSE | OFFLINE | 18
    ConnectionJ | ADP | FALSE | OFFLINE | 19
    ConnectionK | ADP | FALSE | OFFLINE | 20

  5. Select the appropriate connection, rename it, and the table should then reflect the following once the system has been correctly connected:

    EtherNet/IP List(Rack 89) 1/32
    Description | TYP | Enable | Status | Slot
    COGNEX | SCN | TRUE | RUNNING | 1
    Connection2 | ADP | FALSE | OFFLINE | 2
In-Sight Vision System EtherNet/IP I/O Configurations
In-Sight Micro 1000 Series Vision Systems In-Sight 5100, 5400 & 5600 Series Vision Systems In-Sight 5705/5705C Vision Systems In-Sight 70xx -74xx Series Vision Systems In-Sight 7000 Gen2 Series Vision Systems In-Sight 8000 Series Vision System In-Sight 9000 Series Vision System
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 260
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 12
  • Assembly Instance (Output): 21
  • Configuration Instance: 0
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 257
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 12
  • Assembly Instance (Output): 21
  • Configuration Instance: 0
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 273
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 13
  • Assembly Instance (Output): 22
  • Configuration Instance: 0
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 265
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 12
  • Assembly Instance (Output): 21
  • Configuration Instance: 0
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 276
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 13
  • Assembly Instance (Output): 22
  • Configuration Instance: 0
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 274
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 13
  • Assembly Instance (Output): 22
  • Configuration Instance: 0
  • IP Address: Insert the vision system's IP address here
  • Vendor ID: 678
  • Device Type: 100
  • Product Code: 277
  • Input Size (words): 64
  • Output Size (words): 64
  • RPI (ms): 32
  • Assembly Instance (Input): 13
  • Assembly Instance (Output): 22
  • Configuration Instance: 0
Defining Inputs
Name | Signal Type | Signal Label | Unit Map
DI_Trig_Ready | DI | Trigger Ready | 0
DI_Trig_Ack | DI | Trigger Ack | 1
DI_Acquiring | DI | Acquiring | 2
DI_Miss_Ack | DI | Missed Acquisition | 3
GI_Offline_Reason | GI | Offline Reason | 4-6
DI_Online | DI | Online | 7
DI_Inspecting | DI | Inspecting | 8
DI_Inspect_Comp | DI | Inspection Completed | 9
DI_Buffer_Overrun | DI | Results Buffer Overrun | 10
DI_Results_Valid | DI | Results Valid | 11
DI_Job_Loading | DI | Job Loading | 12
DI_Load_Comp | DI | Job Load Completed | 13
DI_Load_Fail | DI | Job Load Failed | 14
GI_Reserved | GI | Reserved | 15-23
GI_Reserved2 | GI | Reserved | 24-26
DI_ExposureComp | DI | Exposure Completed | 27
DI_JobPass | DI | Job Pass | 28
GI_Reserved3 | GI | Reserved | 29-31
GI_CurrentJobID | GI | Current Job ID | 32-47
GI_AcquisitionID | GI | Ack ID | 48-64
GI_InspectionID | GI | Inspection ID | 65-80
GI_InspectionResult | GI | Inspection Result | 81-96
GI_X_Position | GI | User Data Input 0 | 97-112
GI_Y_Position | GI | User Data Input 1 | 113-128
GI_Angle | GI | User Data Input 2 | 129-144
DI_X_Negative | DI |  | 145
DI_Y_Negative | DI |  | 146
DI_A_Negative | DI |  | 147
Sample

Below is a sample digital input configuration for the robot controller; EtherNet/IP is Rack 89, and the Slot is the connection number from the EtherNet/IP configuration section. The bits start at 1.

Note: This is only a sample configuration; Rack 89, Slot 1 is necessary for robot setup.
# | RANGE | RACK | SLOT | START | STATUS
1 | DI[ 1- 80] | 0 | 0 | 0 | UNASG
2 | DI[ 81- 88] | 48 | 1 | 21 | ACTIV
3 | DI[ 89- 100] | 0 | 0 | 0 | UNASG
4 | DI[ 101-120] | 48 | 1 | 1 | ACTIV
5 | DI[ 121-124] | 89 | 1 | 1 | ACTIV
6 | DI[ 125-133] | 89 | 1 | 8 | ACTIV
7 | DI[ 134-585] | 89 | 1 | 145 | ACTIV
Defining Outputs
Name | Signal Type | Signal Label | Unit Map
DO_Trig_Enable | DO | Trigger Enable | 0
DO_Trigger | DO | Trigger | 1
DO_Results_Enable | DO | Buffer Results Enable | 2
DO_Results_Ack | DO | Inspection Results Ack | 3
 | DO | Reserved | 4
 | DO | Reserved | 5
 | DO | Reserved | 6
DO_Set_Offline | DO | Set Offline | 7
DO_SE0 | DO | Soft Event 0 | 8
DO_SE1 | DO | Soft Event 1 | 9
DO_SE2 | DO | Soft Event 2 | 10
DO_SE3 | DO | Soft Event 3 | 11
DO_SE4 | DO | Soft Event 4 | 12
DO_SE5 | DO | Soft Event 5 | 13
DO_SE6 | DO | Soft Event 6 | 14
DO_SE7 | DO | Soft Event 7 | 15
DO_Reserved | GO | Reserved | 16-31
DO_UserData_000 | GO | User Data 0 | 32-39
DO_UserData_001 | GO | User Data 1 | 40-47
Sample

Below is a sample digital output configuration for the robot controller.

Note: This is only a sample configuration; Rack 89, Slot 1 is necessary for robot setup.
# | RANGE | RACK | SLOT | START | STATUS
1 | DO[ 1- 80] | 0 | 0 | 0 | UNASG
2 | DO[ 81- 84] | 48 | 1 | 21 | ACTIV
3 | DO[ 85- 100] | 0 | 0 | 0 | UNASG
4 | DO[ 101-120] | 48 | 1 | 1 | ACTIV
5 | DO[ 121-184] | 89 | 1 | 1 | ACTIV
6 | DO[ 185-256] | 89 | 1 | 65 | ACTIV
7 | DO[ 257-616] | 89 | 1 | 153 | ACTIV
Group I/O Configuration
GI# | RACK | SLOT | START PT | NUM PTS
1 | 89 | 1 | 5 | 3
2 | 89 | 1 | 33 | 16
3 | 89 | 1 | 49 | 16
4 | 89 | 1 | 65 | 16
5 | 89 | 1 | 81 | 16
6 | 89 | 1 | 97 | 16
7 | 89 | 1 | 113 | 16
8 | 89 | 1 | 129 | 16
# SIM VALUE | 7/64
GI[ 1]U | 0 [GI_Offline_Reas]
GI[ 2]U | 56 [GI_CurrentJob_ID ]
GI[ 3]U | 56 [GI_Ack_ID ]
GI[ 4]U | 56 [GI_Inspect_ID ]
GI[ 5]U | 0 [GI_Inspect ]
GI[ 6]U | 2426 [GI_X_Position ]
GI[ 7]U | 3208 [GI_Y_Position ]
GI[ 8]U | 242 [GI_Angle ]

TPP Robot Controller Code

The following sample code illustrates how to trigger the In-Sight vision system, get the Group input data, and the X, Y and Angle data (checking whether or not it is a negative value). The I/O values may change, depending on the robot I/O configuration.

Note: This code retrieves the found location of the part, not an actual part offset.
1:  DO[121:DO_Trigger_Enable]=ON
2:  WAIT DI[121:DI_Trigger_Ready]=ON
3:  DO[122:DO_Trigger]=ON
4:
5:  WAIT DI[122:DI_Trigger_Ack]=ON
6:  DO[122:DO_Trigger]=OFF
8:
9:  IF DI[127:DI_Inspect_Complete]= OFF,JMP LBL[2]
10:
11:  LBL[1]
12:  WAIT DI[127:DI_Inspect_Complete] =OFF
13:  JMP LBL[3]
14:
15:  LBL[2]
16:  WAIT DI[127:DI_Inspect_Complete]=ON
17:
18:  LBL[3]
19:
20:  R[2:X Position]=GI[6:GI_X_Position]
21:  R[2:X Position]=R[2:X Position]/10
22:
23:  IF DI[145:X_Negative]=OFF,JMP LBL[4]
24:  R[2:X Position]=R[2:X Position]*(-1)
25:
26:  LBL[4]
27:
28:  R[3:Y Position]=GI[7:GI_Y_Position]
29:  R[3:Y Position]=R[3:Y Position]/10
30:  IF DI[146:Y_Negative]=OFF,JMP LBL[5]
31:
32:  R[3:Y Position]=R[3:Y Position]*(-1)
33:
34:  LBL[5]
35:
36:  R[4:Angle]=GI[8:GI_Angle]
37:  R[4:Angle]=R[4:Angle]/10
38:
39:  IF DI[147:A_Negative]=OFF,JMP LBL[6]
40:
41:  R[4:Angle]=R[4:Angle]*(-1)
42:
43:  LBL[6]
44:L @P[1] 50mm/sec FINE
45:
46:
47:
48:  PR[1,1]=R[2:X Position]
49:  PR[1,2]=R[3:Y Position]
50:
51:  PR[1,6]=PR[1,6]+R[4:Angle]
52:
53:L  PR[1] 50mm/sec FINE
54:  WAIT    .50(sec)
55:  PR[1,6]=47.002
56:
57:L @P[1] 100mm/sec FINE
Note: The PR[1] value should equal the original pick-up position. This will ensure that the correct Z-Height and RX, RY values will be set.

In-Sight Vision System and Robot Controller Calibration

It is highly important to calibrate the In-Sight vision system's results from pixels into real-world measurement units, using a high-accuracy checkerboard calibration plate. This section covers important facets of the calibration process between the vision system and the robot.

Note: For detailed instructions on how to configure and setup the calibration process, see CalibrateGrid.For information about calibration plates, please consult your Cognex sales representative.

When setting up the calibration, place the calibration plate in the Field of View (FOV) of the vision system. Ensure that the calibration plate fills the entire FOV of the vision system. If it is not possible to fill the entire FOV, multiple poses (e.g. multiple images must be captured) must be used.

Creating a Robot User Frame

There are two possible ways to create the robot user frame: allowing the CalibrateGrid function to assign the origin or manually assigning the origin.

CalibrateGrid Origin

The image below illustrates how the origin is automatically assigned by the CalibrateGrid function. The origin is located at the intersection of the two red crosses on the +X and +Y axis.When the robot user frame is setup in this way, the robot user frame origin (0,0) is the same as the CalibrateGrid function (0,0).

Manual Origin Assignment

The image below illustrates how the origin is assigned manually, with the origin being assigned to the bottom left corner, the +X the bottom right and the +Y the top left.The X,Y location of the green cross must be manually entered into the Pose pane of the CalibrateGrid function.

In-Sight Job Setup and Part Training

Once the In-Sight vision system has been calibrated, it is time to configure the rest of the settings to run the job.

The vision system should be configured to accept an external trigger. In EasyBuilder View, in the Set Up Image Application Step, the Trigger parameter should be set to External.

Next, use a PatMax pattern model to locate your part. In EasyBuilder View, go to the Locate Part Application Step and add a PatMax Pattern Location Tool to locate the part. Next, go to the Inspect Part Application Step and add three Math Math & Logic Tools to multiply the absolute value of X, Y and angle values and round them up. Three additional Math Math & Logic Tools should also be used to determine if the output value is negative or positive.

Note: Please consult the Help tab of the EasyBuilder View Palette for more information on how to set up and use the Location and Inspection Tools.

In-Sight Job I/O Configuration

With the tools setup and returning results, the next step is getting the results out to the robot controller. In EasyBuilder View, go the Communications Application Step. Press the Add Device button, then select Robot as the Device, FANUC as the Manufacturer, EtherNet IP Robot as the Protocol, and press the OK button. Once the device has been added, EasyBuilder will automatically search your job for any Location or Inspection Tools that define a fixture and generate a data string representing the fixture.

In the Format Output Data tab, any tool that generates a fixture will be listed in the Position Name drop-down list. If your job only contains one tool that returns positional data, it will be selected by default. Otherwise, select the tool whose output string you want to send from the Position Name drop-down list. The Output Buffer string will be displayed, as well as the Message Size in bytes, for reference purposes.

Note: For more information on how to set up and use the Communications Application Step, please consult the Help tab of the Help Tab.

In-Sight Vision System Interface Communications

To use the Sensor Interface option a third-party protocol converter, from PREMOSYS (premosys.com), is required.This converter handles the serial handshaking protocol of FANUC's Sensor Interface.

Requirements

Required Hardware

  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)
  • For serial communications, an I/O module, Breakout cable (In-Sight 5000 series or In-Sight 7000 series only).
    Note:
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
    • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • PREMOSYS Protocol converter VE0010
  • Computer
  • FANUC Robot Controller (RJ2 or RJ3)
  • Serial Cable (DB25 to DB25)
  • In-Sight to VE0010 cable (see VE0010 manual)

Required Software

  • Cognex In-Sight Explorer version 3.3 or higher
  • Cognex In-Sight Explorer firmware version 3.3 or higher
  • FANUC Sensor Interface Option

Robot Controller Teach-Pendant Code

 1:  R[20:MEASURE_CNTR_CAM]=0    ;
   2:  R[2:ALARM CODE]=0    ;
   3:  LBL[9] ;
   4:  !REGISTER CHOICE ;
   5:  R[51:REGISTER_CHOICE]=5    ;
   6:  R[6:INTERMEDIATE_CALC]=R[51:REGISTER_CHOICE]*65536    ;
   7:  R[1:SEND_CAM]=R[50:PRODUCT_CHOICE]+256    ;
   8:  R[1:SEND_CAM]=R[1:SEND_CAM]+1    ;
   9:  R[1:SEND_CAM]=R[1:SEND_CAM]+R[6:INTERMEDIATE_CALC]    ;
  10:  R[5:REC_ACK]=0    ;
  11:  SEND R[1:SEND_CAM] ;
  12:  RCV R[5:REC_ACK] LBL[1] TIMEOUT,LBL[1] ;
  13:  R[20:MEASURE_CNTR_CAM]=R[20:MEASURE_CNTR_CAM]+1    ;
  14:  JMP LBL[2] ;
  15:  !Measurement I/O ;
  16:  LBL[2] ;
  17:  IF R[5:REC_ACK]=1,JMP LBL[3] ;
  18:  !Measurement Not OK ;
  19:  IF R[20:MEASURE_CNTR_CAM]=1,JMP LBL[9] ;
  20:  IF R[20:MEASURE_CNTR_CAM]=2,JMP LBL[10] ;
  21:  LBL[10] ;
  22:  !In-Sight TO ROBOT ;
  23:  IF R[5:REC_ACK]=2 OR R[5:REC_ACK]=3 OR R[5:REC_ACK]=6,JMP LBL[4] ;
  24:  !ROBOT TO In-Sight ;
  25:  IF R[5:REC_ACK]=4 OR R[5:REC_ACK]=5 OR R[5:REC_ACK]=8 OR
    :  R[5:REC_ACK]=9,JMP LBL[5] ;
  26:  !POSITION IS Not OK ;
  27:  IF R[5:REC_ACK]=12,JMP LBL[6] ;
  28:  LBL[4:Alarm Code 1] ;
  29:  R[2:ALARM CODE]=4    ;
  30:  JMP LBL[3] ;
  31:  LBL[5:Alarm Code 2] ;
  32:  R[2:ALARM CODE]=5    ;
  33:  JMP LBL[3] ;
  34:  LBL[6:Alarm Code 3] ;
  35:  R[2:ALARM CODE]=6    ;
  36:  JMP LBL[3] ;
  37:  LBL[3:End] ;

In-Sight Serial Port Setup

While connected to the vision system (with the vision system Offline):

  1. On the Sensor menu, click Serial Port Settings.

  2. Set the following properties in the Serial Port Settings Dialog:

    • Baud Rate: 4800
    • Data Bits: 8
    • Stop Bits: 1
    • Parity: None
    • Handshake: None
    • Mode: Native
    • Fixed Input Length: Unchecked
    • Input Terminator: 13
    • Output Terminator: 13
  3. Click OK.

In-Sight Job Setup

Use the sample included with the VE0010 protocol converter.

Troubleshooting

Serial with HyperTerminal

In-Sight Serial Port Setup

While connected to the vision system (with the vision system Offline):

  1. On the Sensor menu, click Serial Port Settings.

  2. Click the I/O Module button to open the I/O Module Configuration dialog and configure the I/O module. Press the OK button to close the I/O Module Configuration dialog and return to the Serial Port Settings dialog.

    Note: If the vision system is configured for use with the CIO-MICRO or CIO-MICRO-CC I/O module, the RS-232 TRANSMIT and RS-232 RECEIVE pins on the Breakout cable are disabled. Use the I/O module's RS-232 OUT port (DB9) to connect to a serial device.

  3. Set the following properties in the Serial Port Settings dialog:

    • Baud Rate: 115200
    • Data Bits: 8 (set by default when using the CIO-1400)
    • Stop Bits: 1 (set by default when using the CIO-1400)
    • Parity: None
    • Handshake: None
    • Mode: Native
    • Fixed Input Length: Disabled
    • Input Terminator: 13
    • Output Terminator: 13
  4. Verify that the dialog displays the "(attached)" message next to the I/O module that is physically attached to the vision system.
  5. Click OK.

Set Up a Test Job

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and type FindBlobs and press Enter (at this point the FindBlobs property sheet will be displayed).
  6. Reference cell B2 for the Blobs parameter.
  7. Click OK.
  8. Press the Manual Trigger icon a few times to confirm that data is changing.
  9. Put the vision system Online.

Connect to an In-Sight Vision System

  1. From Windows click Start > All Programs > Accessories > Communications > HyperTerminal.
  2. Create a New Connection (File > New Connection).
    • Port: COM1
    • Bits per second: 115200
    • Data bits: 8
    • Parity: None
    • Stop bits: 1
    • Flow Control: None
  3. Click File > Properties > Settings.
    • Emulation: ANSI
    • ANSII Setup (for viewing ease) set the following:
      • Send line ends with line feeds
      • Echo typed characters locally
      • Append line feeds to incoming line ends
      • Wrap lines that exceed terminal width
  4. Click Connect.
  5. Enter the vision system's user name then password (default user name is admin and the password in blank).
  6. You should now see "User Logged In".
  7. Type: SW8 and press Enter (this will cause a manual trigger and the image should change).
  8. Type: GVC004 and press Enter (this will get the value stored in cell C4).

Verify Ethernet Connection with Telnet

Set Up a Test Job

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and type FindBlobs and press Enter (at this point the FindBlobs property sheet will be displayed).
  6. Reference cell B2 for the Blobs parameter.
  7. Click OK.
  8. Press the Manual Trigger icon a few times to confirm that data is changing.
  9. Put the vision system Online.

Connect to an In-Sight Vision Sytem

  1. From Windows click Start > Run.
  2. In the Run window type: telnet <sensor's IP Address> (example: telnet 10.27.80.66).
  3. Click OK.
  4. Enter the vision system's user name then password (default user name is admin and the password in blank).
  5. You should now see "User Logged In".
  6. Type: SW8 and press Enter(this will cause a manual trigger and the image should change).
  7. Type: GVC004 and press Enter(this will get the value stored in cell C4).
  8. To disconnect your telnet session type CTRL + ].
  9. Type "quit" to close the window.


Kuka Communications

Robot Communications - KUKA Robot Controllers

KUKA robots are capable of integrating with In-Sight vision systems for numerous applications, ranging from quality verification to object and position detection, as well as pick-and-place applications. In these types of applications, the vision system is configured to communicate with a KUKA robot controller through either EtherNet or Serial protocols. KUKA robot controllers are able to communicate with In-Sight vision systems through four different methods:

  • Robot Communications - Kuka Robot Controller - Serial


Robot Communications - Kawasaki Robot Controller

Overview

The purpose of this topic is to outline the steps to connect and transfer data from an In-Sight vision system to a Kawasaki Robot Controller. For this topic, the robot controller will be the device controlling the acquisition and transfer of data. In general, the robot controller, with the use of In-Sight Native Mode commands (via either Telnet or serial RS-232), will trigger the sensor to acquire and process an image and then the robot controller will request specific data from the sensor. Data can be transferred using serial or Ethernet communications; however, Kawasaki recommends using Ethernet TCP/IP communications.For more information on Native Mode Commands, see Native Mode Commands.

Required Hardware

  • In-Sight vision system (In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 7000 series or the In-Sight 8000 series vision system)

  • For serial communications, an I/O module, Breakout cable (In-Sight 5000 series or In-Sight 7000 series only).

    Note:
    • While serial-based robot communications are supported with the Breakout cable (In-Sight 5000 series or In-Sight 7000 series only), an I/O module is recommended for ease of setup.
    • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
    • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
    • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
    • The CIO-WENET Ethernet I/O module does not support serial communication.
  • PC
  • D-Controller 1QN (with Ethernet option) or C-Controller 1HA (with Ethernet Option)
  • Ethernet connection capable cables (100Base-T)
  • Sensor Interface (for Serial communications)

Required Software

  • Cognex In-Sight Explorer version 3.3.1 or higher
  • Cognex In-Sight firmware version 3.3.1 or higher
  • Kawasaki AS Language Programming

In-Sight Configuration

Configuring the In-Sight vision system to connect and transfer data to a Kawasaki robot controller involves configuring the vision system's Network Settings to communicate with the robot controller, and building a job that extracts position data.When an In-Sight vision system is configured to communicate with a Kawasaki robot controller, the vision system acts as a server.The robot controller will send a request for a value (GetValue - TCP_SEND), the vision system will process the request and respond with the cell value.The robot controller will receive the data (TCP_RECEIVE) and decode the data into a useable format.

In-Sight Network Settings

  1. From the Sensor menu, select Network Settings.
  2. In the Network Settings dialog, uncheck the Use DHCP Server checkbox.
  3. In the IP Address parameter, enter the vision system's IP address (192.168.0.12, in this example).
  4. Set the Telnet Port parameter to 10,000.
  5. Press OK to close the Network Settings dialog.

In-Sight Job Setup

  1. From the File menu, create a New Job.
  2. In the AcquireImage property sheet (double-click on cell A0), set the following parameters:
    • Trigger = External
    • Manual = Checked
  3. Select cell A2 and type ExtractBlobs and press Enter (at this point the ExtractBlobs property sheet will be displayed).
  4. Click OK (leaving all parameters at their default settings).
  5. Select cell A4 and, fromthe Palette's Snippets tab, insert the Communication > Robots > General.cxd Snippet into the spreadsheet.
  6. Define the coordinate cell references:
    • X: Double-click C6, double-click C2,
    • Y: Double-click D6, double-click D2
    • Angle: Double-click E6, double-click E2
  7. Press the Manual Trigger icon a few times to confirm that data from the ExtractBlobs function is changing.
  8. Save the job.
  9. Put the sensor Online.

Robot Controller Setup

The code example shows the controller connecting to an In-Sight vision system with the IP address 192.168.0.12.To find the IP address of your vision system from In-Sight Explorer, right-click the vision system's name in the In-Sight Network tree and select Properties.

.PROGRAM cognex()

;POINT FRAME1 is the part frame, where frame1 is calculated using

;the FRAME command: POINT FRAME1=FRAME(f.origin,f.x1,f.xy,f.origin)

;The coordinates are assumed to be received from the vision system in the part frame

$termchk=$CHR(13)+$CHR(10)

.ret1=-1

.ret1a=-1

.ret1a1=-1

.ret1b=-1

.ret1b1=-1

.ret1bc=-1

.ret2=-1

CALL tcp_open(10000); sock_id1 = CAMERA

IF sock_id1<0 THEN

RETURN

END

$receive=""

CALL tcp_recv(.ret1a,$receive)

IF .ret1a<0 GOTO quit

.$str = "admin"+$CHR(13)+$CHR(10)

CALL tcp_send(.ret1a1,.$str)

IF .ret1a1<0 GOTO quit

$receive = ""

CALL tcp_recv(.ret1b,$receive)

IF .ret1b<0 GOTO quit

$receive = ""

CALL tcp_recv(.ret1c,$receive)

IF .ret1c<0 GOTO quit

.$str = "GVA002"+$CHR(13)+$CHR(10)

CALL tcp_send(.ret1,.$str)

IF .ret1<0 GOTO quit

$receive = ""

CALL tcp_recv(.ret2,$receive)

IF .ret2<0 GOTO quit

$response = $receive

$ok = $DECODE($response,$termchk,0)

ok = VAL($ok)

IF ok <>1 GOTO quit

$response = $RIGHT($response,LEN($response)-4)

$response = $LEFT($response,LEN($response)-5)

$x = $DECODE($response,",",0)

x = VAL($x)

$temp = $DECODE($response,",",1)

$y = $DECODE($response,",",0)

y = VAL($y)

$temp = $DECODE($response,",",1)

o = VAL($response)

PRINT x,y,o

POINT pick = frame1 + TRANS(x,y,o)

HOME

LAPPRO pick, 100

LMOVE pick

CLAMP 1

LDEPART 100

HOME

quit:

CALL tcp_close

.END

.PROGAM tcp_close()

ret = 0

TCP_CLOSE ret,sock_id1

IF ret<0 THEN

PRINT "TCP_CLOSE error id = ",sock_id1

ELSE

PRINT "TCP_CLOSE OK id = ",sock_id1

END

.END

.PROGRAM tcp_open(.port)

tout_open = 60

ip[1] = 192

ip[2] = 168

ip[3] = 0

ip[4] = 12

port = .port

.er_count = 0

connect:

TIMER (2) = 0

TCP_CONNECT sock_id1,port,ip[1],tout_open

IF sock_id1<0 THEN

IF .er_count>=5 THEN

PRINT "Client Communication with Cognex has failed"

GOTO forgetit

ELSE

.er_count = .er_count+1

PRINT "TCP_CONNECT error id = ",sock_id1," error count = ",.er_count

GOTO connect

END

ELSE

PRINT "TCP_CONNECT OK id = ",sock_id1," with timep = ",TIMER(2)

END

forgetit:

RETURN

.END

.PROGRAM tcp_recv(.ret,$receive)

.ret = 0

.eret = -99

tout_rec = 60

max_length = 255

.$receive = ""

.num = 0

TCP_RECV .eret,sock_id1,.#recv_buff[1],.num,tout_rec,max_length

TIMER(3) = 0

IF .eret<0 THEN

PRINT "TCP_RECV error in RECV",.eret

PRINT ".num = ",.num

.ret = -1

ELSE

IF .num>0 THEN

IF .num*max_length<=255 THEN

PRINT "TCP_RECV OK in RECV",.eret

PRINT "Number of array elements = ",.num

FOR .j = 1 TO .num

.$receive = .$receive + .#recv_buf[.j]

PRINT "len(.$recv_buf[",.j,"] = ",LEN(.$recv_buf[.j])

PRINT ".$receive = ",.$receive

END

ELSE

.ret = -1

PRINT "String too long"

PRINT .$recv_buf[1]

END

ELSE

PRINT "Invalid response"

.ret = -1

END

.END

.PROGRAM tcp_send(.ret,.$data)

.$send_buf[1] = .$data

.buf_n = 1

.ret = 1

tout = 60

TCP_SEND .sret,sock_id1,.$send_buf[1],.buf_n,tout

IF .sret<0 THEN

.ret = -1

PRINT "TCP SEND error in SEND",.sret

ELSE

PRINT "TCP_SEND OK in SEND",.sret

PRINT "Sent string = ",$send_buf[1]

END

.END


Perform Authorization

For certain manufacturing environments, it is common to have an authorization process before a batch changeover can be completed and production is allowed to resume. During the authorization process, a quality or production supervisor is often required to verify that an operator has entered the correct batch information (Authorize-Only) or enter the identical batch information previously entered by an operator (Double-Blind).

The Authorize function can be used to perform these authorization processes. When Authorize-Only is performed, an operator (User 1) makes changes and a supervisor (User 2) verifies the changes. When Double-Blind is performed, User 1 makes changes and User 2 is required to re-enter the changes made by User 1. The authorization results are often tracked by Audit Messages.

This topic covers how to configure a spreadsheet containing the Authorize function, how to perform the authorization process, and what kind of audit messages are generated when the authorization is tracked by Audit Messages.

Configure a Spreadsheet

  1. The spreadsheet is configured as follows:

    A2 = Authorize("Change Batch",1,1,A4,A6)

    A4 = EditInt(0,255)

    A5 = EditFloat(0,100)

    A6 = EditString(8)

  2. If using VisionView® application to perform authorization, add the sample job to a Custom View. Select the area that contains the Authorize function cell (A2) and the referenced cells (A4, A5 and A6) for the Cell Range in the Custom View Settings dialog.

    Note: If adding the sample job to an EasyView, insert Symbolic Tag for the Authorize function cell (A2) and the referenced cells (A4, A5 and A6), and check the In EasyView checkbox for each Symbolic Tag in the Symbolic Tag Editor dialog.
  3. If the authorization results are tracked by Audit Messages, insert a Symbolic Tag for the Authorize function cell (A2) and check the Audit Message checkbox for the Symbolic Tag in the Symbolic Tag Editor dialog. Then, check the Enable the Audit Messages checkbox and the Changes to Tagged Cells checkbox in the Audit Message Settings dialog, and configure the other settings in the dialog as needed.

  4. The referenced cells (A4, A5 and A6) show the values last entered by an operator, whether the values are authorized or not. Optionally, the GetAuthorizedValue function can be used to show the last authorized values in the spreadsheet. For example, to show the last authorized values for the referenced cells (A4, A5 and A6), the spreadsheet can be configured as follows:

    C4 = GetAuthorizedValue(A4)

    C5 = GetAuthorizedValue(A5)

    C6 = GetAuthorizedValue(A6)

    Note:

    • The GetAuthorizedValue function always returns a string type value. To use a numeric output of this function as an input to another function, use the Value function to convert it into a numeric value.

    • In addition to the authorized values, the name of the approver (User 2) and the data/time for the last successful authorization can also be displayed in the spreadsheet using the GetAuthorizeApprover and GetAuthorizeDateTime functions.

Authorization Process

  1. User 1 presses an edit control and manually enters a new value.

    Note:
    • If User 1 has a Locked Access level, User 1 is not allowed to make any changes in edit controls.
    • User 2 must be different than User 1, and have sufficient privileges to log on (the minimum Access level is defined by the Level parameter). When None is the selected Level, the same user is allowed to log on to authorize the new values.

  2. After entering all new values, User 1 presses the Change Batch button. The Authorization Logon dialog appears.

    Note: The name of the button is configured by the Label parameter.

  3. User 2 logs on to In-Sight Explorer by entering the correct User Name and Password in the Username and Password fields. Once User 2 successfully logs on, the Authorize dialog appears. The Authorize dialog varies based on the Authorization type (Authorize-Only or Double-Blind).

    • When performing Authorize-Only, the new values entered by User 1 are displayed in the Authorize dialog, and User 2 is not allowed to change any value in the dialog (all edit controls are disabled). If User 2 determines the new values are correct and clicks the Authorize button, the change is authorized. If User 2 determines the new values are incorrect and clicks Cancel, the changes are not authorized.

    • When performing Double-Blind, the new values entered by User 1 are hidden in the Authorize dialog (the last authorized values are displayed), and any edit controls that are not supported by the Authorize function are disabled. User 2 presses the edit control and manually re-enters the new value. After entering all new values, User 2 clicks the Authorize button and the change is authorized. If User 2 clicks Cancel, the changes are not authorized.

      Note: If User 2 enters one or more incorrect value and authorization fails, the Authorize dialog appears again. In this case, the values entered by User 2 are displayed in the dialog. If User 2 attempts the Double-Blind authorization again, User 2 must re-enter User 1’s values to have a successful authorization.
  4. When the Authorize button is clicked, Audit Messages are generated if authorization results are tracked by Audit Messages (optional).
  5. When the authorization is successful, the values returned by the GetAuthorizedValue function are updated to show the latest authorized values (optional).

Audit Messages

The type of Audit Message varies depending on the Authorization Type and the result of the authorization (success or failure). When Cancel is pressed, an Audit Message are not generated.

Authorize-Only

Once the Authorize button in the Authorize dialog is pressed by User 2, an Audit Message is generated for each of the following:

  • Changes made by User 1. The Audit Message contains the name of User 1, the symbolic tag of the edit control, the old value of the control and the new value of the control.

  • A success status and the name of User 2.

    Note: When Authorize-Only is selected and User 2 presses the Authorize button, the authorization is always a success.

Double-Blind

Once the Authorize button in the Authorize dialog is pressed by User 2, an Audit Messages is generated for each of the following:

If authorization is a success:

  • Changes made by User 1. The Audit Message contains the name of User 1, the symbolic tag of the edit control, the old value of the control and the new value of the control.
  • A success status and the name of User 2.

If authorization is a failure:

  • A failure status and the name of Use 2.

None

If None is the selected Authorize Type, no authorization will occur. However, if the user presses the labeled pushed button (the Change Batch button in the sample job), an Audit Message is generated for each of the following:

  • Changes made by the user. The Audit Message contains the name of the user, the symbolic tag of the edit control, the old value of the control and the new value of the control.

  • A success status and the name of the user.

    Note: When None is selected and the labeled button is pressed, a success status is always generated.


Secure an In-Sight Job Using the NodeLock Function

This topic describes how to restrict jobs to run only on specified networked In-Sight systems and how to prevent unauthorized users from modifying jobs using the NodeLock spreadsheet function. The NodeLock function, using In-Sight firmware version 2.10 and later, also encrypts and compresses the job file. This function can only be used on vision systems that have access to the Spreadsheet view.

WARNING: Make a backup copy of the job using a different file name before enabling the NodeLock function. Once the NodeLock function is enabled, the job cannot be edited.

When a NodeLock function containing a specific MAC address is inserted into the spreadsheet, the job can be saved as many times as needed, but once the job is loaded (from the Open dialog), it cannot be edited. If a NodeLock function is needed as a placeholder, insert the function without specifying a MAC address (null-string). For example: NodeLock(“”). Once the job is ready to be secured, add a valid MAC address. Also, a second NodeLock function can be inserted without a MAC address to temporarily disable the NodeLock function. Once the job is ready to be secured, remove the second NodeLock function from the spreadsheet.

To insert the NodeLock function into the spreadsheet:

  1. While in Spreadsheet View, highlight an empty cell where you want to insert the function.

  2. In the empty cell, type “nodelock”, followed by an open parenthesis; the system’s MAC address in double-quotation marks; and a close parenthesis to complete the formula. The formula must be in the following format: nodelock("mac address"). For example:

    Note: The format of the MAC address contains a string of 12 hexadecimal characters.

    Multiple MAC addresses can be entered into the function. Enclose each MAC address in double-quotation marks and separate by commas. For example:

    Note: The NodeLock() function returns a "1" to the spreadsheet if the format of the MAC address is correct and an "#ERR" when the format is incorrect or is empty (null-string).
    WARNING: If none of the MAC addresses specified in the NodeLock function include the MAC address on your In-Sight system, the job will not run and cannot be edited on your system when loaded.

When the NodeLock function is enabled, the function forces the job to run in Protected mode, regardless of the access permissions set for the User Name. Values that are entered into formulas through Graphics Controls can be saved with the job.


Calibrate and Transform Images to Correct for Image Distortion

In its deployment environment, the In-Sight vision system may capture images that exhibit distortions induced by certain setup conditions, such as lens and perspective distortions. Some lens may produce barrel or pincushion radial distortion patterns which cause lines which appear straight in the real-world to appear as curved lines in the image. Perspective distortion is induced when an In-Sight vision system cannot be mounted perpendicular to the inspection area. In these situations, the features in the image may appear stretched or oblong, depending on their location within the field of view, resulting in inaccurate results.

The In-Sight vision system contains a set of functions to compensate and correct for these types of non-linear and perspective distortions: the Calibrate functions.

The Calibrate functions are used to "calibrate" the In-Sight vision system's optics, a process which serves two purposes:

  • The In-Sight vision system will compensate and correct optical distortions ("transforming" the image) and return highly accurate measurements. For more information, see Calibration Accuracy.
  • The In-Sight vision system converts pixel units into real-world measurement units, such as millimeters or inches.

Calibrating an In-Sight vision system enables you to more accurately locate objects at the edges of images, and provides greater mounting flexibility, including the ability to mount the In-Sight vision system up to 45° from the inspection surface. For more information, see Calibration Guidelines.

Example Overview

This topic illustrates how to use the CalibrateGrid and TransformImage functions to calibrate and transform an image to correct for lens and perspective distortion. This example also demonstrates how to optimize the performance of other In-Sight Vision Tools, specifically the TrainPatMaxPattern, FindPatMaxPatterns and FindCircle functions, by referencing the calibrated and transformed output.

Application

Locate a gasket in the field of view, using its shape as a pattern, for a robotic pick-and-place operation. After locating the part, and reporting its location (in millimeters), the radius of the largest hole in the gasket should be measured (in millimeters) to verify that the part is within the specified tolerance. The physical requirements of the deployment environment require that the In-Sight vision system be mounted at a 30° angle from the inspection surface, introducing perspective distortion.

Load the Sample Application and Images

In a real-world application, you would be required to mount the In-Sight vision system, connect it and acquire images of your part or object. For the purposes of this example, a sample job and images are provided to simulate the application.

To begin, you will need to load the sample calibration job and its accompanying images.

  1. Log on to your local emulator or In-Sight vision system.
  2. Select Open Job from the File Menu, and from the Open dialog, navigate to the Calibration folder of your In-Sight Explorer Spreadsheet Sample Jobs directory (for Windows 7/Windows 10: C:\Users\Public\Public Documents\Cognex\In-Sight\In-Sight Explorer x.x.x\Sample Jobs\Spreadsheet\Calibration), and choose the "CalibGrid_TransformImage.job" file.
  3. Once the job has been loaded, you will need to load the corresponding sample images. Select Record/Playback Options from the Image Menu.
  4. The Record/Playback Options dialog should automatically open with the Playback tab presented; if not, click on the Playback tab.
  5. From the Playback Folder section, press the Browse button to launch the Browse for Folder dialog. Navigate to the Sample Jobs > Spreadsheet directory, and select the Calibration folder. Press the OK button to continue.
  6. The Playback Folder should now display the directory that you specified, and the Image Count indicates the number of images in the directory. Press the OK button in the Record/Playback Options dialog to continue.

Calibrate the Image

For In-Sight vision systems, calibration refers to the process of "mapping" the image area by establishing a relationship between features in the image and known, real-world measurement units. This process corrects for linear and non-linear distortions, as well as creating a 2D transformation between the image's pixel units and real-world measurement units.

There are three different functions, with varying degrees of accuracy, that are used to calibrate an In-Sight vision system: Calibrate, CalibrateAdvanced and CalibrateGrid.

Note: The Calibrate and CalibrateAdvanced functions rely on four to nine user-specified points, respectively, in the image to relate the real-world measurements of the objects being inspected. These functions only compensate for linear and non-linear distortions.

The CalibrateGrid function creates a "map" of the image area by acquiring an image of a grid pattern of either dots or checkerboard squares. The function then relates the found features of the grid (the dots or intersections of squares) to the user-specified grid spacing of the grid pattern. This process creates a highly accurate computation that can then be used to transform distorted features into their correct shape.

Configure the Calibrate Grid function

  1. Select the cell containing the Calib data structure returned by the CalibrateGrid function, and double-click the cell to open the CalibrateGrid dialog.

  2. Click on Setup in the navigational pane of the CalibrateGrid dialog to open the CalibrateGrid Setup dialog. The Grid Type parameter is set to "Dots, with Fiducial"; the Grid Spacing parameter is set to 25; the Grid Units parameter is set to Millimeters; and the Number of Poses parameter is set to 1.

    Note: If your part or object being inspected requires a large field of view, or if the image is highly distorted, consider using multiple poses to increase the calibration accuracy.
  3. Select Pose from the navigational pane to acquire the image used for the calibration. For this application, press the From File button and load the CalibrationGrid.bmp file from the Sample Jobs > Spreadsheet directory.
  4. Once the image has been loaded, the CalibrateGrid function will automatically process the image and report the number of feature points found. Press the Calibrate button to continue.
  5. The calibration data is then contained and stored in the Calib data structure. This structure contains the data needed to both correct for distortion and convert pixels to real-world units, and can now be referenced by other In-Sight Vision Tools.

Transform the Image

The next step in the process is to add the TransformImage function to create an undistorted image that can be referenced by the In-Sight Vision Tools. The CalibrateGrid function returns a Calib data structure, which contains the mathematical computations used to create the image "map." The TransformImage function utilizes this Calib data structure to create an Image data structure that applies the corrective computations, returning an undistorted image.

Configure the Transform Image Function

  1. Select the cell containing the Image data structure returned by the TransformImage function, and open its property sheet.
  2. The Calibration parameter is configured as an absolute cell reference to the Calib data structure returned by the CalibrateGrid function, and all of the other parameters are left at their default settings.
  3. Press the OK button to close the TransformImage property sheet.
  4. Single-click on cell containing the Image data structure returned by the TransformImage function to view the undistorted image. This structure corrects for the perspective distortion, creating a circular shape versus an oval shape, for example.
  5. When a TransformImage function is created, an ExtractCalibration function is also automatically created and inserted into the spreadsheet. The ExtractCalibration function returns a Calib data structure which contains the calibration between the transformed image's pixel values and the real-world units specified in the CalibrateGrid function.

Configure the Vision Tools and Convert the Results

In this application, the gasket may appear at random positions within the field of view, so it must first be located within the image, then inspected to verify its correct assembly before being picked up by a robot. This requires that the location of the gasket be returned in millimeters, and the radius of the largest hole in the gasket also be returned in millimeters.

Before the image was calibrated and transformed, the shape of the gasket and the largest hole would vary, depending on the location of the gasket in the field of view, and the results were returned in pixels. The CalibrateGrid and TransformImage functions were used to correct the distortion effects and return calibrated results, and the In-Sight Vision Tools are now configured to reference the undistorted and calibrated image they return.

Set up the Inspection

To set up the Vision Tools, the functions must be installed and linked together to perform their inspections. This application requires the use of a fixture, due to the object's varied locations within the field of view, from image-to-image. Our fixture will also serve another purpose — its location data will be passed to a robot.

Note: Use the Job Audit toolbar to view the various dependencies between the In-Sight Vision Tools.

Configure the TrainPatMaxPattern Function

The TrainPatMaxPattern function produces the model pattern that is referenced by the FindPatMaxPatterns function. The shape of the gasket will be used as the model.

  1. Using the Record/Playback toolbar, load image Gasket_01.bmp.
  2. Select the cell containing the Patterns data structure returned by the TrainPatMaxPattern function, and open its property sheet.
  3. The Image parameter is set as an absolute cell reference to the Image data structure output by the TransformImage function. This ensures that the TrainPatMaxPattern function always references the undistorted image.
  4. Enter interactive graphics mode to adjust the region of interest of the Pattern Region parameter by pressing the Edit Graphic button on the property sheet toolbar. Configure the region of interest so it tightly encompasses the shape of the gasket. Double-click the region to accept the changes and exit interactive graphics mode.
  5. Press the OK button to close the TrainPatMaxPattern function property sheet.
  6. The model pattern has now been established.

Configure the FindPatMaxPatterns Function

The FindPatMaxPatterns function is used to locate the part within the field of view, based on the model pattern established by the TrainPatMaxPattern function.

  1. Select the cell containing the Patterns data structure returned by the FindPatMaxPatterns function, and open its property sheet.
  2. The Image parameter is set as an absolute cell reference to the Image data structure output by the TransformImage function. This ensures that the FindPatMaxPatterns function always references the undistorted image.
  3. The FindRegion parameter is maximized to encompass the entire image, because the gasket may appear anywhere within the image.
  4. The Pattern parameter is set as an absolute cell reference to the Patterns data structure returned by the TrainPatMaxPattern function.
  5. The Outside Region parameter is set to 15, because parts of the gasket may appear outside of the image area.
  6. The Angle Start and Angle End parameters have been adjusted to -90 and 90, respectively, to account for the rotation of the gasket within the image.
  7. All of the other parameters are left at their default settings.
  8. Press the OK button to close the FindPatMaxPatterns function property sheet.

Configure the FindCircle Function

The FindCircle function is used to determine the radius of the largest hole in the gasket.

  1. Select the cell containing the Edges data structure returned by the FindCircle function, and open its property sheet.
  2. The Image parameter is set as an absolute cell reference to the Image data structure output by the TransformImage function. This ensures that the FindCircle function always references the undistorted image.
  3. The Fixture parameter is set as an absolute reference to the Row, Col and Theta outputs of the FindPatMaxPatterns function. This ensures that the Annulus of the FindCircle function is moved in relation to the found pattern returned by the FindPatMaxPatterns function.
  4. Enter interactive graphics mode to adjust the region of interest of the Annulus parameter by pressing the Edit Graphic button on the property sheet toolbar. Position the annulus over the largest hole of the gasket and configure the region of interest so that the outer radius is slightly larger than the largest hole of the gasket, while the inner radius is about half the size of the outer radius. Double-click the region to accept the changes and exit interactive graphics mode.
  5. The Polarity parameter is set to white-to-black; the annulus search region is inspected from the inner radius to the outer radius, and the gasket is "black" while the background is "white." Specifying the edge polarity helps to speed the search.
  6. The Find By parameter is set to largest circle, also in an attempt to speed the search.
  7. All of the other parameters are left at their default settings.
  8. Press the OK button to close the FindCircle function property sheet.

Convert the Results

Both the FindPatMaxPatterns and FindCircle functions return their results in pixels, but the robot and inspection require the results in millimeters. In addition, because the gasket may appear in the field of view in random positions and orientations, its necessary to use a fixture to accurately position the search regions of the In-Sight Vision Tools in the image, which requires that the results be returned in pixels.

For example, the FindCircle function requires the output of the FindPatMaxPatterns function results in pixels: the Row, Col, and Angle values returned by the FindPatMaxPatterns function are being used as a Fixture input for the FindCircle function, indicating where in the image to position its Region of Interest (ROI).

To solve for this, the TransPatternsToWorld and TransEdgesToWorld functions will be used to convert the pixel results of the FindPatMatPatterns and FindCircle functions to real-world units, millimeters. The values returned by the TransPatternsToWorld and TransEdgesToWorld functions will then be output, and the FindCircle function will still be able to utilize the pixel values returned by the FindPatMaxPatterns function as a fixture.

Note: If a fixture was not required, the CalibrateImage function could be utilized to convert the pixel results of the tools to real-world units.

Configure the TransPatternsToWorld Function

The TransPatternsToWorld function converts the pixel results returned by the FindPatMaxPatterns function into real-world measurement units.

  1. Select the cell containing the Patterns data structure returned by the TransPatternsToWorld function, and open its property sheet.
  2. The Calib parameter is set as an absolute cell reference to the calibration data contained in the Calib data structure returned by the ExtractCalibration function. The ExtractCalibration function contains the calibration between the transformed image's pixel units and the real-world units specified in the CalibrateGrid function.
  3. The Patterns parameter is set as an absolute cell reference to the Patterns data structure returned by the FindPatMaxPatterns function.
  4. The Number to Convert parameter is left at its default setting.
  5. Press the OK button to close the TransPatternsToWorld function property sheet.
  6. The results returned by the TransPatternsToWorld function should now appear in their real-world units, in this case, millimeters.

Configure the TransEdgesToWorld Function

The TransEdgesToWorld function converts the pixel results returned by the FindCircle function into real-world measurement units.

  1. Select the cell containing the Edges data structure returned by the TransEdgesToWorld function, and open its property sheet.
  2. The Calib parameter is set as an absolute cell reference to the calibration data contained in the Calib data structure returned by the ExtractCalibration function. The ExtractCalibration function contains the calibration between the transformed image's pixel units and the real-world units specified in the CalibrateGrid function.
  3. The Edges parameter is set as an absolute reference to the Edges data structure returned by the FindCircle function.
  4. The Number to Convert parameter is set to 1.
  5. Press the OK button to close the TransEdgesToWorld function property sheet.
  6. The results returned by the TransEdgesToWorld function should now appear in their real-world units, in this case, millimeters.

Test the Application

To get a better understanding of the effects of perspective distortion:

  1. Open the TrainPatMaxPattern, FindPatMaxPatterns and FindCircle functions, and set their Image parameter to A0, to view the image in its uncorrected format.
  2. Adjust the model pattern of the TrainPatMaxPattern function to the distorted image.
  3. Using the Record/Playback toolbar, cycle through the images and note the difficulty in locating the pattern and measuring the size of the hole in the gasket.
  4. Reset the functions' Image parameter back to the Image data structure returned by the TransformImage function, and note that the tools successfully perform on each image.

Inspection Results Example

The following table illustrates the effectiveness of the CalibrateImage and TransformImage functions in correcting for perspective distortion.

Inspection Results | Distorted Image | Undistorted Image
Gasket_00.bmp (Trained Pattern Image)
Pattern Score | 99.997 | 99.997
Radius (MM) | 16.666 | 20.573
Gasket_01.bmp
 | 57.27 | 99.954
 | 18.109 | 20.694
Gasket_02.bmp
 | 54.576 | 99.954
 | 18.302 | 20.723
Gasket_03.bmp
 | 0 | 99.997
 | #ERR | 20.765
Gasket_04.bmp
 | 86.539 | 99.912
 | 17.615 | 20.641
Gasket_05.bmp
 | 66.928 | 99.997
 | 18.047 | 20.669
Gasket_06.bmp
 | 0 | 98.815
 | #ERR | 20.507
Gasket_07.bmp
 | 57.133 | 99.826
 | 18.267 | 20.770
Gasket_08.bmp
 | 0 | 98.070
 | #ERR | 20.633
Gasket_09.bmp
 | 0 | 99.933
 | #ERR | 20.777
Average Radius (MM) | 17.834 | 20.664
Standard Deviation | 0.622 | 0.089


Enable Time Synchronization on an In-Sight Vision System

CIP-Sync/PTP is supported on the following vision systems:

  • In-Sight 5000 series vision systems with 128MB non-volatile flash memory and running firmware version 4.5.0 or later

    Note: The In-Sight 5605 vision system (Hardware Type 821-0032-1R), In-Sight 5705 vision system and In-Sight 5705C vision systems are not supported.
  • In-Sight 7000 Gen2 series vision systems
  • In-Sight 9000 series vision systems

  1. From the Sensor menu, select Date/Time Settings to launch the Date/Time Settings dialog box.

  2. In the Time Synchronization section, select the Use Time Synchronization check box.
  3. Restart the vision system to initiate the use of PTP and to synchronize the vision systems date and time settings to the master time clock.
  4. When the vision system restarts, reopen the Date/Time Settings window.

  5. To display information about the current status of the PTP stack, click Synchronization Details.


Local Clock Information

To ensure that the In-Sight vision system continues to operate properly, even if the grand master clock (master system time) experiences a step change in time, the local clock is implemented as a 64-bit, continuously running, free timer, with a 100ns resolution. An offset is maintained between the local clock and the master clock, synchronized via PTP. PTP is also used to adjust the tick rate of the free running timer to match the tick rate of the master clock.

  • To return the current value of the local clock, use the Now function, which will capture the current value of the local clock, as well as the current system time offset between the local clock and the master clock. For more information, see Now.
  • Use the Time/Timer Vision Data Access functions to return fields of the current time. For more information, see Time/Timer.


Return the Acquisition Timestamp

If the In-Sight vision system is being triggered to acquire images using the Camera Trigger input, the start time of the image exposure is captured and can be returned using the GetExposureTimestamp function. This function returns a Time data structure, which can be processed by the other Time/Timer Vision Data Access functions. For more information, see Time/Timer Functions.


Send Timestamps to the PLC

When configuring the data that will be sent to the PLC, use the Format Output Buffer dialog to add and send the data. Use the 64 bit integer Data Type, which has a "uq" format specifier that signifies an unsigned, quad precision integer value. The Format Output Buffer will be able to send a timestamp to a PLC with the quad precision integer values.

In the above example:

  • Cell E10 contains a GetTimeValue function, referencing the output of a GetExposureTimestamp function. For more information, see Time/Timer.
  • Cell E9 contains a GetTimeValue function that is referencing a Now function. For more information, see Now.
  • Cells 25-28 contain Vision Tool data.


Triggering an In-Sight Vision System Using Timestamps Over EtherNet/IP

In-Sight vision systems are capable of being triggered to acquire images via a timestamp sent to the vision system using an implicit EtherNet/IP connection. To configure this setup:

  1. Set the AcquireImage function's Trigger parameter to Timestamp.
  2. Configure the EtherNet/IP module Input assembly to interpret 8 bytes of data as the trigger timestamp. To do so, use the SetSystemConfig command to set the system configuration variable "EIP.TriggerTimestampInputOffset" to the offset of the User Data field, where the timestamp will be written from the PLC. For example, adding the following function to an In-Sight job file would enable the trigger timestamp field as the first 8 bytes of the User Data field: SetSystemConfig("EIP.TriggerTimestampInputOffset", 0)

To disable the trigger setting, set the variable from 0 to -1.

Note: The timestamp occupies the first 8 bytes, the time offset occupies the second 8 bytes, and any user data for spreadsheet use would occur after the time offset.

When a new timestamp arrives from the PLC using EtherNet/IP, the In-Sight vision system will acquire images after being triggered by the timestamp. If the timestamp occurs in the past, or more than one hour before it should arrive, then a TimeTriggerFault will be issued, and the "EIP.TriggerTimstampFaults" count will be incremented.

Note: In-Sight 5.6.1 implemented a feature that allows In-Sight to accept multiple timestamp triggers at once. See Trigger Multiple Acquisitions Using Timestamps for more information.


Trigger Multiple Acquisitions Using Timestamps

You can use timestamps to schedule when to trigger multiple acquisitions. It accomplishes the following:

  • The vision system can respond to a PLC trigger (over an EtherNet/IP connection) within 10 milliseconds of the actual trigger time sent by the PLC.
  • The timestamps can match the vision inspection with the part that was in view of the vision system during acquisition.

This feature implements the IEEE 1588 Precision Time Protocol (PTP) to manage the synchronization of local clocks to the master clock.

Note: The PLC can send up to four timestamps simultaneously. The vision system can store up to ten timestamps in the queue.

The following figure shows the timestamp trigger scenarios:

If you have been using single timestamp triggering in In-Sight 4.x.x and want to continue using it with your existing PLC logic (if migrating to a vision system running 5.6.1 firmware or later,), you have to set the "Eip.TriggerTimestampLegacyMode" command. This command is part of SetSystemConfig. If you want to use the single/multiple timestamp triggering implemented in firmware version 5.6.1, you don't have to change the setting.

Set Up Multiple Acquisitions Using Timestamps


Set Up Multiple Acquisitions Using Timestamps

To set up multiple acquisitions using timestamps, perform the following tasks:

Enable Time Synchronization on an In-Sight Vision System

Enable In-Sight to Receive Timestamps from a PLC

Set Up User Data for Timestamps in the PLC


Enable In-Sight to Receive Timestamps from a PLC

  1. Set the vision system to Offline.
  2. Set the AcquireImage function's Trigger parameter to Timestamp. For more information, see Trigger.

  3. To enable the job to read the timestamps from the PLC and that are part of the SetSystemConfig function in In-Sight Explorer, set the following commands. See SetSystemConfig for detailed information.

    4. This command: | Does the following:
SetSystemConfig(“Eip.TriggerTimestampInputOffset”, Offset) | Enables the reading of the timestamp user data in the PLC
SetSystemConfig(“Eip.TriggerTimestampNumInputs”, Timestamps) | Contains the number of timestamps that the vision system can process simultaneously from one PLC user data packet.
SetSystemConfig(“Eip.TriggerTimestampMaxQueueLength”, Timestamps) | Determines the maximum number of timestamps that In-Sight can store simultaneously.
SetSystemConfig(“Eip.TriggerTimestampOverrideWindowUs", Microseconds) | Sets the number of microseconds that a queued PLC timestamp has to fall before it can override a timestamp in In-Sight.
  4. Send the TS native mode command.


Set Up User Data for Timestamps in the PLC

Setting up user data in your PLC project enables the PLC to determine the appropriate timestamp to send to the vision system. This allows the vision system to trigger at the appropriate time.

Note: You need to know the size and format of the user data.

Set up the user data in the following order:

  1. System time offset value
  2. Each timestamp in sequential order (for example, timestamp 0, timestamp 1).
Note: The starting byte of the timestamp user data depends on whether there is other user data is included in the data packet that the PLC sent.

The following figure shows the required sequence of the user data and the corresponding In-Sight job Set SystemConfig command:


Create a Loop of Spreadsheet Cells

For certain applications, it may be necessary to repeat the actions of functions several times during a single acquisition and job execution. Constructing an application in this manner would necessitate hundreds, perhaps thousands, of spreadsheet cells to accomplish. However, In-Sight jobs can be constructed to use a loop of cells instead, saving programming space in the spreadsheet and creating more manageable blocks of spreadsheet cells.

The Clocked Data Storage functions, Repeat, RepeatUntil and StoreData, are used to group a selection of cells together and repeat their execution for a specific duration of time. For more information on Clocked Data Storage, see Clocked Data Storage Functions. For more information on Repeat and RepeatUntil, see Repeat and RepeatUntil. For more information on StoreData, see StoreData.

Example Overview

This topic covers how to utilize the Repeat, RepeatUntil and StoreData functions to construct loops - the repeated execution of spreadsheet cells for a specified duration. This example also demonstrates how to utilize other In-Sight Vision Tools, specifically the ExtractBlobs, SortBlobs and Caliper functions, to identify a feature of interest and inspect it for height and width tolerances. In addition, this application also utilizes a Custom View, which displays the graphical elements of the inspection, as well as statistical data about the pin connectors.

Application

Inspect pin connections for the proper height and width tolerances. After locating the position and counting the number of pin connectors, each pin connector is measured (in pixels) to verify that the pin connector is within the specified tolerance. By incorporating a loop of repeating cells, this job only requires less than 50 spreadsheet cells, whereas without incorporating a loop, the same job would require thousands of spreadsheet cells to program.

Load the Sample Application and Images

In a real-world application, you would be required to mount the In-Sight vision system, connect it and acquire images of your part or object. For the purposes of this example, a sample job and images are provided to simulate the application. To begin, you need to load the sample looping job and its accompanying images.

  1. Log on to your local emulator or In-Sight vision system.
  2. Select Open Job from the File Menu, and from the Open dialog, navigate to the Demo Connector Pin Inspection folder within the Looping folder of your In-Sight Explorer Spreadsheet Sample Jobs directory (for Windows 7/Windows 10: C:\Users\Public\Public Documents\Cognex\In-Sight\In-Sight Explorer x.x.x\Sample Jobs\Spreadsheet\Looping\Demo Connector Pin Inspection), and choose the "demo connector pin inspection.job" file.
  3. Once the job has been loaded, you need to load the corresponding sample images. Select Record/Playback Options from the Image Menu.
  4. The Record/Playback Options dialog should automatically open with the Playback tab presented; if not, click on the Playback tab.
  5. From the Playback Folder section, press the Browse button to launch the Browse for Folder dialog. Navigate to the Sample Jobs > Spreadsheet > Looping directory, and select the Demo Connector Pin Inspection folder. Press the OK button to continue.
  6. The Playback Folder should now display the directory that you specified, and the Image Count indicates the number of images in the directory. Press the OK button in the Record/Playback Options dialog to continue.

Count, Locate and Measure the Pin Connectors

The first step in this application is identifying and locating the pin connectors, which is accomplished by using the Blob Vision Tools, ExtractBlobs and SortBlobs. Beginning with the ExtractBlobs function, the image is inspected to determine the number (roughly 204 in each inspection) and position of each pin connector, followed by the SortBlobs function, which determines the location of each pin connector, relative to a fixture.

After the pin connectors have been counted and located, they are measured by the Caliper function to determine each pin connector's width and height (in pixels). Using the data returned by the Caliper function, spreadsheet logic is constructed to calculate whether or not the pin connector is within a 0.500 tolerance.

This section covers the following steps:

  1. Configuring the Blob Vision Tools

  2. Configuring the Horizontal and Vertical Caliper Edge Vision Tools

  3. Constructing the Spreadsheet Logic

    Tip: Enable Job Auditing to graphically display the cell dependencies within the job.

Configure the Blob Vision Tools

  1. Select the Blobs data structure returned by the ExtractBlobs function in cell A6 and double-click the cell to open the ExtractBlobs function's property sheet.
  2. The Region parameter is set to the entire image area, as their position varies from image to image and a fixture is not necessary (blob analysis is also one of the faster image processing techniques).
  3. The Number to Sort parameter is set to 500; to speed up the performance of the tool, lower the number to 250.
  4. For further performance enhancements, set the Color: Blob parameter to white, and the Color: Background parameter to black.
  5. Also set the Area Limit: Min parameter to 10, and the Area Limit: Max to 100. This prevents any extraneous object that may appear in the image from being classified as a pin connector.
  6. Press the OK button to close the ExtractBlobs property sheet.
  7. Next, select the Blobs data structure returned by the SortBlobs function in cell A7 and double-click the cell to open the SortBlobs function's property sheet.
  8. The Blobs parameter is set as an absolute reference to the Blobs data structure returned by the ExtractBlobs function in cell A6.
  9. Set the Number to Sort parameter to 250.
  10. The Sort By parameter is set to grid - X, then Y, from Fixture origin.
  11. Press the OK button to close the SortBlobs property sheet.

Configure the Horizontal and Vertical Caliper Edge Vision Tools

  1. Select the Edges data structure returned by the Caliper function in cell G13 (the Caliper Horizontal) and double-click the cell to open the Caliper function's property sheet.
  2. The Fixture parameter is set as an absolute reference to cells E13 and F13, which are the results output by the SortBlobs function of the pin connector's Row and Column pixel coordinates, and the GetLoopCount function, which determines which indexed pin connector to inspect based on its position in the loop.
  3. The Region parameter is configured around the bottom-right pin connector's width.
  4. The Edge Mode parameter is set to Edge Pair, with the first edge being the left-hand side of the pin connector, and the second edge being the right-hand side of the pin connector.
  5. The Edge Distance parameter is set to 9, the maximum pixel distance of the width of the pin connector.
  6. Press the OK button to close the horizontal Caliper function's property sheet.
  7. Next, select the Edges data structure returned by the Caliper function in cell L13 (the Caliper Vertical) and double-click the cell to open the Caliper function's property sheet.
  8. The Fixture parameter is also set as an absolute reference to cells E13 and F13, which are the results output by the SortBlobs function of the pin connector's Row and Column pixel coordinates, and the GetLoopCount function, which determines which indexed pin connector to inspect based on its position in the loop.
  9. The Region parameter is configured around the bottom-right pin connector's height.
  10. The Edge Mode parameter is set to Edge Pair, with the first edge being the top of the pin connector, and the second edge being the bottom of the pin connector.
  11. The Edge Distance parameter is set to 8, the maximum pixel distance of the height of the pin connector.
  12. Press the OK button to close the horizontal Caliper function's property sheet.

Construct the Spreadsheet Logic

  1. For each of the Caliper functions, the GetEdgeDistance function is used to extract the distance between edge pairs returned by the Caliper function.
  2. The InRange function is used to calculate whether or not the distance returned by the GetEdgeDistance function is within the ranges defined by the EditInt functions defining the Nominal Width, Height and Tolerance in the Custom View controls section of the spreadsheet.
  3. The Stringf function is used to output a text string containing a floating point value, constructed to only display two decimal places.
  4. Two PlotLine functions are used to draw the found edges returned by the Caliper functions, and a PlotString function is used to draw defect information, if necessary, output by the Stringf function.

Construct the Loop

Without the ability to construct a loop of spreadsheet cells, the process of counting, sorting and measuring all 204 pin connectors would require configuring 408 Caliper functions (one for height and one for width), and a table returned by the SortBlobs function for all 204 found pin connectors with associated GetRow, GetCol and PlotLine functions. Looping greatly reduces the amount of space required to program the spreadsheet, and also reduces the complexity and amount of time needed to construct.

Creating a loop involves storing the data for each iteration of the internal loop, and graphically representing the data of the accumulated inspections within the loop. During the inspection, the PlotLine function draws the edge output by the Caliper function, and an error message is created by an PlotString function, if necessary. In order to capture all of the graphical elements of the repeated inspections, a StoreData function is associated with each of the PlotLine and PlotString functions, and the StoreData functions are placed within the cells that constitute the loop.

In this example, the PlotLine function outputs its graphical data for each inspection into the StoreData function, which accumulates and stores the outputs for each pin connector. Without the StoreData function, only the last inspected pin connector would be displayed. At the end of the loop, the StoreData function outputs its accumulated data to a PlotData function, which generates the graphics from the accumulated loop.

This section covers the following steps:

  1. Configuring the PlotLine, PlotString and StoreData Functions

  2. Configuring the Repeat and GetLoopCount Functions

  3. Configuring the PlotData Function

    Tip: Enable Job Auditing to graphically display the cell dependencies within the job.

Configure the PlotLine, PlotString and StoreData Functions

  1. Select the Plot data structure returned by the PlotLine function in cell J13 (the Caliper Horizontal) and double-click the cell to open the PlotLine function's property sheet.
  2. The Line parameter has been constructed with dynamic arguments inside the Row and Column coordinates, using GetRow and GetCol Edges Vision Data Access functions to extract the edge data from the Caliper function and graphically draw the horizontal edge of the pin connector.
  3. The Color parameter has also been constructed with a dynamic argument, though much simpler. This parameter's argument uses the result output into cell I13, which alternates between 0 and 1 based on the results of the Caliper function (0 for no edge and 1 for an edge), to determine if the color displayed is red or green.
  4. The Show parameter is an absolute cell reference to cell J1, which is a CheckBox function that controls whether or not the line should be displayed by the Custom View.
  5. Each of the additional PlotLine and PlotString functions for the Horizontal and Vertical Calipers are constructed in the same manner.
  6. Select the Data data structure returned by the StoreData function in cell K13 (the Caliper Horizontal) and double-click the cell to open the StoreData function's property sheet.
  7. The Event parameter is an absolute cell reference to the Image data structure in cell A0 (containing the AcquireImage function). Thus the function will execute every time an image is acquired.
  8. The Data parameter is a cell reference to the Plot data structure returned by the PlotLine function in cell J13, and the StoreData function will capture all of the graphical display data output by the PlotLine function during the execution of the loop.
  9. The Number of Steps parameter is an absolute cell reference to the GetNFound Blobs Vision Data Access function in cell D6, which extracts the total number of blobs found from the ExtractBlobs function. This number determines how many times the StoreData function should accumulate data.
  10. Each of the additional StoreData functions for the Horizontal and Vertical Calipers are constructed in the same manner.
  11. Finally, select the Plot data structure returned by the PlotCircle function in cell R13 and double-click the cell to open the PlotCircle function's property sheet. This function will be used to draw a circle over any pin connectors that fail.
  12. The Circle parameter has been constructed with dynamic arguments inside the Row and Column coordinates, using the two GetRow and GetCol Edges Vision Data Access functions to extract the edge data from the Caliper function, divided by two, to extrapolate the Row/Column coordinates of the circle to be drawn (if necessary).
  13. The Show parameter uses a dynamic argument utilizing two Mathematics functions to determine whether or not the circle should be drawn.
  14. Select the Data data structure returned by the StoreData function in cell S13; this StoreData function is configured to capture the data output by the PlotCircle function in cell R13.

Configure the Repeat and GetLoopCount Functions

  1. Select the Loop data structure returned by the Repeat function in cell B13; the Repeat function is configured directly in the cell or formula bar on the Job Edit toolbar. With the Loop data structure selected, the formula for the Repeat function is visible in the formula bar on the Job Edit toolbar.
  2. The Event parameter is an absolute cell reference to the Image data structure in cell A0 (containing the AcquireImage function). Thus the function will execute every time an image is acquired.
  3. The Iterations to Repeat parameter is an absolute cell reference to GetNFound Blobs Vision Data Access function in cell D6, which extracts the total number of blobs found from the ExtractBlobs function. This number determines how many times the functions should execute.
  4. The Cells to Repeat parameter is configured to encapsulate the cells from D13 to S15.
  5. Select the GetLoopCount function contained in cell D13. This function keeps a count of the loop and determines which indexed pin connector is being inspected.
  6. The "Blob Results" output in cells E13 (GetRow) and F13 (GetCol) are constructed to reference the SortBlobs function for their position, and the GetLoopCount function for their index.

Configure the PlotData Functions

  1. Select the Plot data structure returned by the PlotData function in cell A19 and double-click the cell to open the PlotData function's property sheet.
  2. The Data parameter is set as a relative reference to the Data data structure returned by the StoreData function in cell K13. The PlotData function will construct the graphical display based on the data stored in the StoreData function.
  3. Each of the StoreData functions contained in the loop have an associated PlotData function to draw the graphics accumulated during the loop.

Display the Custom View

A Custom View display has been created for operator interaction during the job's runtime. This functionality allows the operator to potentially adjust the Nominal Width or Height values, the Tolerance values, and whether or not certain results are drawn or displayed.

Utilizing Controls Functions, such as EditInt and CheckBox functions, allows operators to easily interact with the job at runtime.

This section covers the following steps:

  1. Configuring the Controls in the Custom View

  2. Configuring the Custom View Display

    Tip: Enable Job Auditing to graphically display the cell dependencies within the job. For more information, see Job Auditing.

Configure the Controls Functions for the Custom View

  1. Select the EditInt function in cell G1.
  2. This EditInt function, as well as the EditInt functions in cells G2, H1 and H2, is used as an input for the InRange functions in cells in I13 and N13. These Controls functions are used to calculate whether or not the distance returned by the GetEdgeDistance function is within tolerance.
  3. Select the CheckBox function in cell J1.
  4. This CheckBox function is used as an input to the PlotLine functions in cells J13 and J14. This Controls function is used to determine whether or not the horizontal results of the Caliper function are displayed.
  5. Select the CheckBox function in cell J2.
  6. This CheckBox function is used as an input to the PlotLine functions in cells O13 and O14. This Controls function is used to determine whether or not the vertical results of the Caliper function are displayed.
  7. Select the CheckBox function in cell N1.
  8. This CheckBox function is used as an input to the PlotCircle function in cell R13. This Controls function is used to determine whether or not to display a red circle over defective pin connectors.
  9. Select the CheckBox function in cell N2.
  10. This CheckBox function is used as an input to the PlotString functions in cells J15 and O15. This Control is used to determine whether or not to display the value of the Caliper function as a numeric text string.

Configure the Custom View Display

  1. From the Edit menu, select Custom View Settings, which will launch the Custom View Settings dialog.
  2. The Cell Range is defined to encompass the Controls functions described in the Configuring the Controls Functions for the Custom View section.
  3. Press the Move/Resize button to enter interactive graphics mode to position where the Controls functions will reside in the image.
  4. Press the OK button to close the Custom View Settings dialog.
  5. From the View menu, select Custom View to display the Custom View user interface. This is the user interface that the operator will interact with during the job's runtime.
  6. To simulate runtime, from the Record/Playback toolbar, press the Play button. This will initiate the playback of the images in the Playback Folder, simulating the job's execution during runtime.


Saving Images to a PC, USB Drive, FTP Server or SD Card

There are several methods for saving images from In-Sight® vision systems to a PC or storage location. This topic compares each method by explaining what is needed, what will be saved, where to be saved and how to set up, to help you decide the best option for your application.

Note: Saving images may impact the performance of In-Sight vision systems as it will decrease the memory available for other tasks.

Saving Images to a PC, USB Drive, FTP Server or SD Card

There are four major methods for saving images from In-Sight vision systems.

Method | What is Needed | Where to be Saved | Images to be Saved | Related Topics
Record/Playback | - In-Sight vision system - In-Sight Explorer - PC | PC | Images can be automatically sorted and saved to Good/Bad folders. | Record/Playback Options Dialog
In-Sight Explorer Sensor Filmstrip |  |  | Images are saved by clicking the Save to PC button. | Sensor Filmstrip Settings Dialog
VisionView Filmstrip | - In-Sight vision system - In-Sight Explorer - VisionView - USB drive or FTP server | USB drive or FTP server* | Images are saved by clicking the Save button. Failed images can be saved automatically. | VisionView Filmstrip
WriteImageFTP function | - In-Sight vision system - In-Sight Explorer - FTP server | FTP server** | Images are saved when an event is triggered. Additionally, SVG files containing graphic overlay data can be saved. | WriteImageFTP
WriteImageLocal function | - In-Sight vision system with SD card installed - In-Sight Explorer | SD card installed to the vision system |  | WriteImageLocal
* Images can be saved to network shares. **When In-Sight emulator is used as an FTP server, images are saved to the PC. |  |  |  |

Record/Playback

What is needed?

In-Sight Explorer must be running on a PC and connected to the target In-Sight vision system.

What will be saved?

Images can be automatically sorted based on the job's overall pass/fail status, and saved into the "Good" and/or "Bad" folders.

Where to be saved?

Images are saved to the PC. The default folder location is:

Windows 7/Windows 10: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x\RecordPlayback\

The images are stored in a subdirectory that is automatically created, based on the vision system's Host Name. For more information, see Network Settings Dialog.

Note: The folder location can be specified in the Record Folder field in the Record/Playback Options dialog.

How to Set Up

  1. From the Image menu, open the Record/Playback Options dialog.
  2. Click the Record tab and configure the Record settings.
  3. To automatically sort pass and fail images, select the following option:
    • EasyBuilder View: Sort on Pass/Fail (Record to Good/Bad Folders) in the Pass/Fail Sort group box
    • Spreadsheet View: Sort on Value (Record to Good/Bad Folders) in the Watch Cell Sort group box

    When pass and fail images are recorded, a "Good" and "Bad" folder are automatically created within the specified Record Folder location.

  4. From the Image menu, select Record. The images acquired by the vision system will be now saved to the specified Record Folder.
Tip:
  • Using the In-Sight Explorer PC filmstrip, images can also be automatically sorted based on the job's overall pass/fail status, and saved into the "Good" and/or "Bad" folders. For more information on the PC filmstrip, see:
    • EasyBuilder View: Configure Record Settings and Record Images sections of PC Filmstrip: EasyBuilder View
    • Spreadsheet View: Configure Record/Playback Settings and Record Images sections of PC Filmstrip: Spreadsheet View.

In-Sight Explorer Sensor Filmstrip

Note: There are two filmstrip options on In-Sight Explorer: PC filmstrip and Sensor filmstrip. The PC filmstrip is simply a record/playback functionality, while the Sensor filmstrip saves the image and job information on the vision system.

What is Needed?

In-Sight Explorer must be running on a PC and connected to the target In-Sight vision system.

What Will be Saved?

  • Any image that appears in the Sensor filmstrip can be saved by clicking the Save to PC button.
  • Images cannot be saved automatically.

Where are Images Saved?

Images are saved to the PC. The default folder location is:

Windows 7/Windows 10: C:\ProgramData\Cognex\In-Sight\In-Sight Explorer x.x.x\Sensor Images

Note: The folder location can be specified in the Save Path field in the Sensor Filmstrip Settings dialog. For more information, see Sensor Filmstrip Settings Dialog.

How to Set Up

Follow the steps described in the following sections of the Filmstrip topic:

  • EasyBuilder View: See Sensor Filmstrip: EasyBuilder View.
  • Spreadsheet View: See Sensor Filmstrip: Spreadsheet View.

VisionView Filmstrip

What is needed?

  • A VisionView application.
  • A USB drive or FTP server. When saving images to an FTP server, the FTP server should be running on the network that will receive the images and can be contacted from the VisionView application.
  • In-Sight Explorer to configure the In-Sight vision system's Sensor filmstrip settings.

What will be saved?

  • Any image that appears in the VisionView filmstrip can be saved by clicking the Save button.
  • If the inspection fails or no read is obtained, the filmstrip image can be automatically saved as a bitmap file.

Where to be saved?

Images are saved to a USB drive or FTP server. The location can be specified on VisionView. The images are stored in a subdirectory that is automatically created, based on the sensor's Display Name.

Note: Display Name can be configured on VisionView.

How to Set Up

To use the filmstrip on VisionView, it is required to enable the Sensor filmstrip on In-Sight Explorer as well as the filmstrip on VisionView.

  1. From In-Sight Explorer, enable the filmstrip.

  2. Configure the In-Sight Explorer Sensor Filmstrip settings. See How to Set Up for details.

    Note: It is not necessary to specify the Save Path field as the location for saving images is configured on VisionView.
  3. From VisionView, configure the Filmstrip settings in the Filmstrip Options screen (Setup Mode > Screen Layout > Filmstrip Options) according to your requirements.
  4. In the Filmstrip Options screen, click Edit to open the Location for Saving Images screen.

  5. If saving images to a USB Drive, select the USB Drive tab and specify a directory on the USB drive.

    Note: The VisionView Operator Interface Panel, VisionView VGA and a Windows CE-based HMI panel can store up to 800 images at a time before old images will be overwritten.

  6. If saving images to an FTP server, select the Storage Location tab and specify an FTP location. Specify any required logon information for the server as well.

    Note: Images can be saved to network shares (shared folders). In this case, use the Storage Location tab to configure the necessary settings.
  7. From VisionView, connect to the vision system and start acquiring images. If configured to save failed images automatically, failed images will begin appearing in the USB drive/Storage location.
Note: For more information, refer to the VisionView Help file.

WriteImageFTP

What is needed?

An FTP server that is accessible from the In-Sight vision system through the network.

What will be saved?

  • Writes an image to an FTP server when an event is triggered.
  • Additionally, SVG files containing graphic overlay data can be saved in to the same directory for the images.

Where to be saved?

An FTP server specified in the WriteImageFTP function's Host Name parameter. For more information, see WriteImageFTP.

How to Set Up

  1. Configure your FTP server so that it can be accessed from the vision system.

  2. Follow the steps described in the Configure the Write ImageFTP Function.

    Note:
    • The In-Sight Explorer FTP server cannot create directories. The existing directory must be specified in the File Name parameter.
    • When using the In-Sight emulator as an FTP Server, by default, files are written to the Emulator folder (C:\ProgramData\Cognex\In-Sight\Emulators\x.x.x). In addition to this directory, files can be written to a user-defined location (Authorized FTP directory). For more information on the Emulator directory and the Authorized FTP directory, see Emulation Panel.
    • When writing files to the Authorized FTP Directory, the File Name path must precisely match the specified Authorized FTP Directory path in the Options dialog. Images can also be written to any sub-directories within the Authorized FTP Directory (the sub-directory must exist). For example, if the Authorized FTP Directory is C:\temp and the name of the file is "Failed", the File Name must be specified as "c:\temp\Failed". If writing to a sub-directory "Images", the File Name will be "C:\temp\Images\Failed". If only specified as "Failed", the file will be written to the default Emulator directory.
    • In general, it is faster to save images in the bitmap format (BMP). Although the bitmap format images are larger, they do not take time to compress.
    • EasyBuilder can also write images to an FTP server. For more information, refer to the Exporting Data and Images via FTP topic in the EasyBuilder Help (Communication > Exporting Images via FTP).

WriteImageLocal

What is needed?

An In-Sight vision system on which an SD card is installed.

What will be saved?

  • Writes an image to the SD card on the vision system when an event is triggered.
  • Additionally, SVG files containing graphic overlay data can be saved in to the same directory for the images.

Where to be saved?

The SD card installed to the vision system.

How to Set Up

Follow the example described in the WriteImageLocal.

Note:
  • In general, it is faster to save images in the bitmap format (BMP). Although the bitmap format images are larger, they do not take time to compress.
  • EasyBuilder can also write images to the SD card installed to the vision system. For more information, refer to the Exporting Images to an SD Card topic in the EasyBuilder Help (Communication > Exporting Images to an SD Card).


Configure the Web HMI

This topic covers how to configure and open the Web HMI application with a web browser.

  1. Launch the In-Sight Explorer and connect to a vision system or sensor.
  2. On the Sensor menu, select HMI Settings to open the HMI Settings dialog.

    1. Select HTTP from the HMI Mode drop down list.

      Note: For information about how to set up the HTTPS connection, refer to Configure the HTTPS Connection.

    2. Specify other settings in the HMI Settings dialog, if different from the default.

      Note: For detailed information, refer to HMI Settings Dialog.

    3. Click OK to close the dialog.

      Note: You must restart the vision system or sensor after you change the HMI settings.

  3. Optionally, create an EasyView within In-Sight Explorer to add buttons, checkboxes, tool results, interactive graphics controls to the Web HMI, and to allow users make simple changes to the job directly from the Web HMI.

    • For information about how to create an EasyView in Spreadsheet View, see EasyView Settings Dialog.

    • For information about how to create an EasyView in EasyBuilder View, see Configuring an EasyView

  4. Configure the views for the Web HMI application. You can customize which views are visible in the Web HMI application and the order of the views when you click Switch View in the Web HMI application. For more information, see Run Mode Controls Pane.

    1. On the Edit menu, select the HMI View Selection. For more information, see HMI View Selection Dialog.

    2. Select the Views you want to display in the Web HMI application.

    3. Use the Up or Down button to specify the order of the views when the Switch View button is pressed. When you open the Web HMI application, the first view listed in the HMI View Selection dialog is displayed as the default view.

      Note:
      • The Web HMI application does not support Current Image and Last Failed Image (Horizontal), Current Image and Last Failed Image (Vertical) and Image with Graphics and Custom View options.
      • To toggle the Run Mode views, you must first enable the Allow View Selection option in the HMI Settings dialog.
      • To make the EasyView options available in the HMI View Selection dialog, you must first create an EasyView within In-Sight Explorer and save it with the job.

  5. Open the Web HMI application.

    There are two options for opening the Web HMI application:

    Option 1: Enter the Web Address into a Web Browser

    1. Open the web browser.

      Note: Supported web browsers: Google Chrome™ browser, version 64 or greater and Microsoft Edge, version 44.x or greater.

    2. Enter the IP address and port number of the selected vision system or sensor in the web browser's address bar. Web Address Syntax: http://<IP Address>:<HTTP Port>/

    Option 2: Use the Open Web Browser View Option

    1. From the In-Sight Network pane, right-click the selected vision system or sensor. For more information, see In-Sight Network.

    2. Click the Open Web Browser View to open the Web HMI application of the selected vision system or sensor. For more information, see Open Web Browser View.

  6. Log on to the vision system or sensor.

    If prompted, enter the user name and password to log on to the vision system or sensor.

  7. (Optional) Access the Web HMI with the Standard View Connection.

    An In-Sight vision system or sensor can connect to only one application with the Standard View Connection. If both In-Sight Explorer and the Web HMI application are connected to the same vision system or sensor, the In-Sight Explorer application is always in the Standard View Connection mode, and the Web HMI application is in the View Only Connection mode with a Locked access.

    To access the Web HMI with the Standard View Connection, you need to disconnect the vision system or sensor in the In-Sight Explorer. Once the vision system or sensor is disconnected, the Web HMI application is automatically converted to the Standard View Connection mode.

    Note: After disconnecting the vision system or sensor from the In-Sight Explorer, it might take up to 30 seconds for the Web HMI application to convert to the Standard View Connection mode.


Configure the HTTPS Connection

This topic explains how to configure the HTTPS connection between your In-Sight device and Web HMI.

  1. Install the Cognex Network Server Software

    You will need a valid common Certificate Authority (CA) to enable trusted HTTPS connections in In-Sight Explorer. The Cognex Network Server provides you a mechanism to create a Certificate Authority (CA) and to generate trusted certificates.

    The Cognex Network Server software should be installed on a PC or server that your In-Sight devices and Web HMI browsers can both access.

    Note:

    Cognex Network Server Supported Operating Systems:

    • Microsoft Windows 10 Professional (64-bit)
    • Microsoft Windows Server 2016

  2. Enable HTTPS in In-Sight Explorer

    The next step is to enable the HTTPS server and connect your In-Sight devices to the Cognex Network Server using the HMI Settings Dialog.

  3. Install the Security Certificate

    You must install the Certificate Authority (CA) to your local PC to enable the HTTPS connection in your web browser. If you already have a certificate, you can skip this step and connect to the Web HMI application with an HTTPS connection directly. If you attempt to connect to the Web HMI application without a trusted certificate, you will be redirected to a certificate download page.

  4. Launch the Web HMI Application

    You must close all browser windows after the certificate is installed and launch the Web HMI application again. Your Web HMI application will be redirected to the HTTPS connection automatically.

Install the Cognex Network Server Software

Enable HTTPS in In-Sight Explorer

Install the Security Certificate

Launch the Web HMI Application

HTTPS Configuration Troubleshooting


Install the Cognex Network Server Software

  1. Download the Cognex Network Server software from the Cognex support site.

  2. Run the Cognex Network Server installer you just downloaded.

  3. Click Next on the Welcome to the InstallShield Wizard for Cognex Network Server dialog.

  4. Accept the terms and click Next.

  5. Click Next to install the Cognex Network Server to the default location C:\Program Files (x86)\Cognex\Cognex Network Server x.x.x

    If you want to install the Cognex Network Server to a different folder, click the Change button to open the Browser for Destination Folder dialog. Specify a new installation destination folder, then click OK to confirm.

  6. Click Install to begin the installation.

  7. When prompted, specify the Cognex Network Server Data Folder and the 'adminserver' password in the Cognex Network Server dialog.

    By default, the Cognex Network Server Data Folder is C:\ProgramData\Cognex\Cognex Network Server\data, and the default password is 1234. The Host Name and the IP address will be auto-populated in the Server Identification field. You will need the Host Name (or the IP address) and Password to configure the HTTPS mode in the In-Sight Explorer HMI Settings dialog.

    Once finished, click Accept to start configuring the Cognex Network Server and creating the server certificate.

  8. Click Finish to exit the installation wizard.

Note: Your Certificate Authority (CA) private key is saved under C:\ProgramData\Cognex\Cognex Network Server\SSL. For security purposes, do not expose your private key and make sure your Certificate Authority (CA) private key is protected.


Enable HTTPS in In-Sight Explorer

  1. Launch In-Sight Explorer and connect to a vision system or sensor.
  2. From the Sensor menu, select HMI Settings to open the HMI Settings dialog.

  3. From the HMI Mode drop-down list, select HTTPS.

  4. Specify the HTTPS port number. By default, the port number is set to 8443, but it can be changed to any available port on the server.

    Note:
    • The HTTP port number and the HTTPS port number cannot be the same.
    • For information about In-Sight reserved ports, see In-Sight Ports.

  5. In the Cognex Network Server field, enter the host name or the IP address of the Cognex Network Server. The host name and the IP address can be found in the Cognex Network Server Manager.

    Note: The Cognex Network Server Manager can be launched from either the Microsoft® Windows® Start menu or from the Cognex Network Server icon in the Microsoft Windows System Tray.
  6. Enter the Password of the Cognex Network Server you previously set up in the Cognex Network Server Manager.
  7. (Optional) Select the Save Password checkbox if you want In-Sight Explorer to remember the password of your Cognex Network Server.

  8. Click the Verify HTTPS button. A green check mark indicates that the HTTPS connection between your In-Sight device and the Cognex Network Server is correctly configured.

    Note:
    • If you have trouble configuring the HTTPS connection, see HTTPS Configuration Troubleshooting.
    • Updating the firmware or changing the network settings of your In-Sight vision system or sensor will result in certificate errors if the Cognex Network Server is not running correctly. Ensure the Cognex Network Server is running before updating firmware on an HTTPS enabled device. If the Cognex Network Server is down, the certificate cannot be reissued.

  9. Click OK to exit the HMI Settings dialog.

  10. When prompted, click Yes to restart the vision system or sensor.


Install the Security Certificate

You must install the Certificate Authority (CA) to your local PC to enable the HTTPS connection in your web browser. If you already have a certificate, you can skip this step and connect to the Web HMI application with an HTTPS connection directly. If you attempt to connect to the Web HMI application without a trusted certificate, you will be redirected to a certificate download page.

  1. Open the Web HMI Application.

    Option 1: Enter the Web Address into a Web Browser

    1. Open the web browser.

    2. Enter the IP address and port number of the selected vision system or sensor in the web browser's address bar.

      Web Address Syntax: http://<IP Address>:<HTTP Port>

      Note: Do not use the HTTPS port. If you attempt to connect to the HTTPS port without a trusted certificate, you will be redirected to a warning page.

    Option 2: Use the Open Web Browser View Option

    1. From the In-Sight Network pane, right-click the selected vision system or sensor.
    2. Click the Open Web Browser View to open the Web HMI application of the selected vision system or sensor.

  2. You will be redirected to a certificate download page if you do not have a Certificate Authority (CA) installed on your PC.

    If using Microsoft Windows, click the Download button to download the Certificate Authority (CA). If using a different operating system, click one of the links under the Other Operating System (OS) to manually install the Certificate Authority (CA).

    Note: If the Cognex Certificate Authority Installer doesn't launch from your web browser after you click the Download button, close the browser window and launch the installation application from the location where the Cognex Certificate Authority Installer is saved.

  3. When prompted, click Install. The unique Certificate Authority (CA) will be added to your local PC's Trusted Root Certification Authorities.

    Note: You do not need to enter or change the information in the Cognex Network Server Name or IP field. The Server Name or IP will be automatically populated.

  4. You will need to close all browser windows after the Certificate Authority (CA) is installed and then click OK.


Launch the Web HMI Application

  1. Open the Web HMI Application.

    Option 1: Enter the Web Address into a Web Browser

    1. Open the web browser.

    2. Enter the IP address and port number of the selected vision system or sensor in the web browser's address bar.

      Web Address Syntax: https://<IP Address>:<HTTPS Port> (e.g., https://192.168.0.1:8443)

      Note: You can also enter http://<IP Address>:<HTTP Port>. You will be redirected to the HTTPS connection automatically.

    Option 2: Use the Open Web Browser View Option

    1. From the In-Sight Network pane, right-click the selected vision system or sensor.
    2. Click the Open Web Browser View to open the Web HMI application of the selected vision system or sensor.

  2. The Web HMI application is opened with the HTTPS connection automatically.

    Note:

    If the HTTP Image Transfer checkbox is checked in the HMI Settings dialog, an information icon is displayed, indicating the connection is not fully secure.


HTTPS Configuration Troubleshooting

This topic provides information about the most common issues and possible solutions when configuring the HTTPS in the In-Sight Explorer.

Status Message | Possible Solution
The firmware on this device does not support HTTPS mode. | Update the firmware of your In-Sight device to 5.7.3 or later.
The In-Sight vision system is in HTTPS mode, but there is an internal error. Set the device to HTTP mode and change it back to HTTPS mode to correct the error. | Set the device to HTTP mode with server credentials correctly entered into the HMI Settings dialog. Click OK and restart the device. After the device is restarted, switch the device back to HTTPS mode.
The user credentials for the server are invalid.

Verify that the password you entered is correct. If you entered the correct password and this problem persists, open the Cognex Network Server Manager. Reset or change the password to ensure the correct password is used.
Unable to connect to the specified Cognex Network Server.

Open the Cognex Network Server Manager and verify that the Cognex Network Server Status is "Running".

If the Cognex Network Server is not running, click the Start button.

If the Cognex Network Server is running, ensure that the host name or IP address of the Cognex Network Server entered into the HMI Settings dialog matches the one listed on the Server Identification tab in the Cognex Network Server Manager.

If the Cognex Network Server is running and the HMI Settings dialog has the correct settings, ensure that the Cognex Network Server, the In-Sight vision system or sensor, and the computer using In-Sight Explorer are on the same network domain.
The device's certificate appears to be outdated or for a different server.

The HTTPs certificate on the In-Sight device isn’t based on the certificate authority of the server. The certificate on the In-Sight device needs to be updated. Enter the correct server information and click OK to accept the changes and restart the device to replace the old certificate with the new one.

If this problem persists, switch the device to HTTP mode. Click OK and restart the device. Once the device is restarted, switch the device back to HTTPS mode.
The time difference is too large for secure communication. | Open the Sensor -> Date Time Settings dialog. Use a time server by selecting either Time Synchronization or Use SNTP Services checkbox. If no time server is available, manually set the Date and Time.
Time synchronization is not configured. Enable SNTP or Time Synchronization. | Open the Sensor -> Date Time Settings dialog. Use a time server by selecting either Time Synchronization or Use SNTP Services checkbox. If no time server is available, manually set the Date and Time.
This In-Sight vision system and the server are not on the same subnet. Ensure that the routing between the subnets is correct. | Go to the Sensor -> Network Settings dialog and verify that the Subnet Mask is set to the correct value.
This In-Sight vision system cannot reach the server. Check the DNS server and gateway. | Go to the Sensor -> Network Settings dialog and verify that the Default Gateway and DNS Server are set to the correct values.
This In-Sight vision system cannot reach the server. Check the gateway. | Go to the Sensor -> Network Settings dialog and verify that the Default Gateway is set to the correct value.
Unable to check for potential network problems. | You may still be able to use your In-Sight device with HTTPS mode. If there is an issue, go to the Sensor -> Network Settings dialog and verify that the Default Gateway and DNS Server are set to the correct values.


Load or Save a Job in Web HMI

The Load and Save buttons on the Web HMI Run Mode Controls Pane allow you to load and save a job from and to a vision system/sensor (including RAM Disk and SD Card), a local PC or a remote location.

Load a Job from a Vision System or Sensor

Load a Job from Your PC

Load a Job from a Remote Location

Save a Job to a Vision System or Sensor

Save a Job to Your PC

Save a Job to a Remote Location


Load a Job from a Vision System or Sensor

  1. Click the Load button on the Web HMI Run Mode Controls Pane to open the Load Job dialog.

  2. Select Local as the Load Type.

  3. Highlight the desired job in the list and click the Load button. Alternatively, you can double-click the job file to load the job.

To load a job from a RAM Disk or SD Card:

Note: The RAM Disk and SD Card options are only available on supported In-Sight vision systems.

  1. Highlight the RAMDisk or SDCARD in the list and click Load to open the folder. Alternatively, you can double-click the RAMDisk or SDCARD to open the folder.

  2. Highlight the desired job in the list and click the Load button. Alternatively, you can double-click the job file to load the job.

    Note: To go back to the parent directory, double-click (...).


Load a Job from Your PC

  1. Click the Load button on the Web HMI Run Mode Controls Pane to open the Load Job dialog.
  2. Select Local as the Load Type.

  3. Click Upload to launch the Open dialog.

  4. Select the desired job and click Open. Alternatively, you can double-click the file to load the job.


Load a Job from a Remote Location

  1. Click the Load button on the Web HMI Run Mode Controls Pane to open the Load Job dialog.
  2. Select Remote as the Load Type.

  3. Specify the Server, Port, Username, Password and the Job Path in the FTP server information table.

    Note:

    • If you want to load a job on a RAM Disk or SD Card from a remote server, you need to specify the RAMDisk/ or SDCARD/ directory in front of the file name.

      File Name Examples:

      • filename.job
      • SDCARD/filename.job
      • RAMDisk/filename.job
    • The RAM Disk and SD Card options are only available on supported In-Sight vision systems.
  4. Click Load to load the job file.


Save a Job to a Vision System or Sensor

  1. Click the Save button on the Web HMI Run Mode Controls Pane to open the Save Job dialog.

  2. In the Job Name text box, enter the name of the job.

    Note:

    • If you want to save a job to a RAM Disk or SD Card, you need to specify the RAMDisk/ or SDCARD/ directory in front of the file name.

      File Name Examples:

      • filename.job
      • SDCARD/filename.job
      • RAMDisk/filename.job
    • The RAM Disk and SD Card options are only available on supported In-Sight vision systems.
    • If a job with the same name already exists, the job will be overwritten.

  3. Select Local as the Save Type.
  4. Click the Save button to save the job.


Save a Job to Your PC

  1. Click the Save button on the Web HMI Run Mode Controls Pane to open the Save Job dialog.

  2. In the Job Name text box, enter the name of the job.

    Note: If a job with the same name already exists, the job will be overwritten.

  3. Select Local as the Save Type.
  4. Click Download to save the job to your web browser's default download location.


Save a Job to a Remote Location

  1. Click the Save button on the Web HMI Run Mode Controls Pane to open the Save Job dialog.
  2. In the Job Name text box, enter the name of the job.
  3. Select Remote as the Save Type.

  4. Specify the Server, Port, Username, and Password in the FTP server information table.

    Note:

    • If you want to save a job to a RAM Disk or SD Card, you need to specify the RAMDisk/ or SDCARD/ directory in front of the file name.

      File Name Examples:

      • filename.job
      • SDCARD/filename.job
      • RAMDisk/filename.job
    • The RAM Disk and SD Card options are only available on supported In-Sight vision systems.
    • If a job with the same name already exists, the job will be overwritten.

  5. Click the Save button to save the job.


Edit Region in Web HMI

  1. To edit region in the Web HMI Display, click an interactive graphics control button in the EasyView Pane. For more information, see Interactive Graphics Mode.

  2. To modify the interactive graphics, select the appropriate handle to make it active. The active handle is displayed in yellow. Then, drag the handle to a new position.

    The Data Editor pane displays the current position, size, rotation or bend of the active handle. You can also manually enter the value for the active handle by double-clicking the value box to modify the interactive graphic.

    Note:
    • For more information about how to use the interactive graphics, see the Interactive Graphics Mode.
    • The types of handles available depend on the interactive graphics control button being modified and whether the handle was enabled when initially configured in In-Sight Explorer.
  3. To accept the changes and exit the Interactive Graphics Mode, click Accept. To cancel the changes and exit the Interactive Graphics Mode, click Cancel.


Troubleshooting

Which Firmware Versions are Supported?

#ERR

Error Messages

Network Troubleshooting


#ERR

A cell that displays #ERR indicates that the cell could not execute its function correctly and is generally due to an invalid input parameter. An #ERR condition can occur for a variety of reasons, some due to normal operation of the vision application, and some due to errors in the spreadsheet logic itself. A few common occurrences of #ERR are noted below.

  1. Basic Mathematical Errors

    Cell A4 = A3 / A2. If the value of cell A2 is equal to 0, then the function in cell A4 will generate a divide-by-zero error.

  2. Region Graphic Errors: Region moves off of the image

    If you use a PatFind tool to locate something in the image, and then use the result data to fixture the location of other vision tools, it is possible for the region of a vision tool to be moved to a location causing part of the region to be outside the bounds of the image. When this occurs, the vision tool will report #ERR instead of returning a valid vision tool result structure.

  3. "Get" Functions fail: Vision Tool does not produce results

    If you use a GetRow function in conjunction with an ExtractBlobs tool, there may be conditions where the ExtractBlobs tool fails to locate the expected number of blobs. If this occurs, the GetRow function will report #ERR if the desired blob could not located in the image.

  4. Communication Errors: Cannot send data

    If you create a WriteImageFTP cell or WriteTCPDevice cell, data will automatically be sent from the In-Sight sensor to another computer each time the spreadsheet executes. If there are problems with client computer such that it cannot receive the data, it is possible for output buffer on the In-Sight sensor to fill-up. If the output buffer overflows (there's no place the put the data), then these cells will report #ERR.

Troubleshooting #ERR Cells

Override #ERR to Prevent Error Propagation?


Troubleshooting #ERR Cells

Most #ERR conditions return an error string. To see if an error string is provided, simple hover the mouse over the cell containing the #ERR to show the error string. Also, if a red exclamation point ( [image]) appears in the Property Sheet, hover over it show the error string. Error strings can be returned programmatically, using the GetErrorString function. Each error string has an associated diagnostic code, which is returned using the GetErrorCode function.

Note: If no error string is available for the #ERR, GetErrorCode will return –1.

For #ERR that do not return an error string, the #ERR can be traced to their source by examining each of the parameters of the cell function reporting the error. Look for cell references within the formula, then examine the value of the referenced cell. For complex jobs, this may require tracking several references or even nested references back to their source.

Certain acquisition functions (such as Partial Acquisition and Lighting Parameters) are not supported on emulators. It is possible to create these functions on an In-Sight sensor that supports them, and then load that job on an emulator which does not support the functions; this may cause the AcquireImage function in cell A0 to report #ERR.

Generic Error Strings

Generic Vision Tool Error Strings

Read ID Error Strings

Verify/Validate ID Error Strings

Import/Export Error Strings

PatMax Information/Error Strings

ComputeStats Error Strings

Convolution Filter Error Strings


Generic Error Strings

Diagnostic Code | Corresponding Information String
00000000 | System error.
00000001 | Insufficient memory to complete the operation.
00000003 | Error in input arguments.
00000004 | Input argument is out of range.
00000005 | Input argument type is not compatible.
00000009 | Cell was not executed because the job timed out in a preceding cell.
09990100 | Size of correspondence data is zero.
09990101 | Fewer than 9 points provided in view.
09990102 | Maps to infinity.
09990103 | Invalid configuration of points.
09990104 | Failed while searching for intrinsic parameters.
09990500 | Internal CalibrateGrid error.


Generic Vision Tool Error Strings

Diagnostic Code | Corresponding Information String
00010000 | Vision processing error.
00010001 | Invalid image memory.
00010001 | Input region is too small.
00010002 | Input region exceeds image boundary.


Read ID Error Strings

The following error strings can be returned for the ReadIDCode function. For more information, see ReadIDCode.

Diagnostic Code | Corresponding Information String
00019000 | IDMax vision processing error.
04010000 | ReadCompositeCode error.
04010001 | Can't detect 2D component address patterns.
04010002 | Too much invalid 2D component image data.
04010003 | Can't detect 2D component symbol version.
04010004 | Unable to fill in missing 2D component address patterns.
04010005 | Scan line detected invalid image data.
04010006 | Scan line exceeds image boundary.
04010007 | Can't detect 1D component finder patterns.
04010008 | Too much invalid 1D component image data.
04010009 | No valid symbols found.
04010010 | Too many symbol errors to correct.
04010011 | Error correction failed.
04010012 | 1D and 2D are decodable but are not linked.
04010013 | Automatic contrast threshold calculation failed.
04010014 | Contrast sensitivity exceeds allowed range.
04010015 | Scanning parameter exceeds allowed range.
04020000 | ReadIDCode error.
04020001 | No valid symbols found.
04020002 | Could not decode symbol.
04030001 | Symbol was found but failed to decode.
04030002 | No symbol found or decoded.
04030003 | ReadIDCode operation timed out.
04030004 | Sensor ran out of memory while trying to decode.
04030005 | ReadIDCode unexpectedly failed.
04030006 | Invalid ReadIDCode Cell reference in VerifyIDCode. For more information, see VerifyIDCode.
04030007 | Invalid Image Cell reference in ReadIDCode.
04030008 | No-Read diagnostics only supported for Data Matrix or QR Code when Algorithm checkbox is enabled.
04030009 | Algorithm checkbox is not enabled in ReadIDCode property sheet.


Verify/Validate ID Error Strings

The following error strings can be returned for the VerifyIDCode and ValidateIDData functions. For more information, see VerifyIDCode and ValidateIDData.

Diagnostic Code | Corresponding Information String
04040001 | Invalid symbology identifier.
04040002 | Pattern match failed.
04040003 | Invalid field identifier.
04040004 | Invalid Application Identifier (AI).
04040005 | Invalid Data Identifier (DI).
04040006 | Invalid Text Element Identifier (TEI).
04040007 | Invalid field data.
04040008 | Invalid field separator.
04040009 | Data is not ISO 15434 compliant.
04040010 | Unsupported format.
04040011 | Invalid format code.
04040012 | ISO 15434 syntax is not supported for this code.
04040013 | Field is invalid in this application.
04040014 | Application field is not currently supported.
04040015 | Invalid application data.
04040016 | Multiple formats present.
04040017 | Duplicate fields present.
04040018 | Invalid Construct #1 DoD UID data.
04040019 | Invalid Construct #2 DoD UID data.
04040020 | Invalid DoD UID data.
04040021 | Missing Format Trailer character.
04040022 | Missing Message Trailer character.


Import/Export Error Strings

Diagnostic Code | Corresponding Information String
05030000 | File Name is missing.
05030001 | User Name is missing.
05030002 | File Type is not .CXD. For more information, see Import/Export Cells Dialog.
05030003 | File Name is too long.
05030004 | Error allocating memory.
05030006 | AcquireImage cannot be an event for ExportData if the local flash memory is specified as the export destination. For more information, see ExportData.
05030007 | Data type not supported.
05030008 | Data not found in the file.
05030009 | Error parsing the data.
05030010 | Data type not supported.
05030011 | Error operating on file.


PatMax Information/Error Strings

The following information and error strings can be returned for the TrainPatMaxPattern function. For more information, see TrainPatMaxPattern.

Diagnostic Code | Corresponding Information String
07010000 | Pattern may contain too few match features.
07010001 | Difficult to automatically set feature granularity; manually set Granularity.
07010100 | Pattern may be less accurate than expected because the training image appears blurry.
07010102 | The pattern results may be unstable because the coarse features have the same direction.
07010200 | Execution time may increase because of numerous fine features; manually set Granularity.
07010101 | Pattern may contain insufficient information to measure Angle or Scale reliably.
07020300 | result(s) discarded due to low contrast.
07020301 | result(s) discarded due to proximity to more accurate results.
07020302 | result(s) discarded due to excess clutter.
07020303 | Trained pattern contains too few features for current parameter settings.
07030000 | No error information.


ComputeStats Error Strings

The following error strings can be returned for the ComputeStats function. For more information, see ComputeStats.

Diagnostic Code | Corresponding Information String
03040700 | Invalid input value to function.


Convolution Filter Error Strings

Diagnostic Code | Corresponding Information String
03210002 | The number of rows and columns must be in the range 1 to 10.
03210004 | Kernel values must be in the range -9999 to 9999.


Override #ERR to Prevent Error Propagation?

Consider a case where you might want to compute the Sum of the areas for multiple blobs found by an ExtractBlobs tool. You use the GetArea function to retrieve the area of individual blobs from the blob structure. If a blob is not found, the GetArea function will fail, but this may be a valid scenario in your application.

Cell | Function | Description
A1 | ExtractBlobs([Parameters]) | Extracts blobs and returns a Blobs structure.
B1 | GetArea(A1,0) | Returns the area of Blob 0.
B2 | GetArea(A1,1) | Returns the area of Blob 1.
B3 | GetArea(A1,2) | Returns the area of Blob 2.
B4 | Sum(B1:B3) | Computes the sum of the blob areas.
If the ExtractBlobs tool fails to locate at least 3 blobs, then the formula Sum(B1:B3) will report #ERR because at least one cell referenced by this formula will also report #ERR. To override this error condition, you can utilize the ErrFree function as follows:
B4 | Sum(ErrFree(B1:B3)) | Computes the sum of the blob areas.

When using the ErrFree function, the input values from other cells reporting #ERR will be converted to a value of 0; in this case, the Sum function will replace 0 for any input #ERR cell instead of reporting an error. For more information, see Lookup.


Error Messages

Select one of the following errors for more information and possible solutions:

Error Code | Error Message | Additional Information
N/A Maximum Reference Depth Exceeded

The maximum number of references within a chain of cell references is 256 cells, and this error is initiated when the chain of references exceeds 256. A common cause of this error occurs when creating index numbers (e.g. B0=0; B1=B0+1; B2=B1+1; B3=B2+1...B255=B254+1; B256=B255+1; B257=B256+1 --> Error is triggered). In order to prevent this error, hard code a break in the chain of references (e.g. B0=0; B1=B0+1; B2=B1+1; B3=B2+1...B199=B198+1; B200=200 --> hard coded limit, which still leaves an additional reference depth of 56, which might be used by other cells attached to the chain. The chain can then be resumed, B201=B200+1...B255=B254+1; B256=B255+1; B257=B256+1 --> Error is NOT triggered).

3000

 <number> is not a valid entry The first octet of the IP address of an Explorer Host Table entry must lie between 1 and 223 (inclusive). The fourth octet must lie between 1 and 254 (inclusive). IP addresses such as 0.5.2.8 and 10.40.6.255 are not allowed. For more information, see Explorer Host Table Setup Dialog.
5000 | No segments found | In-Sight Explorer did not detect any character instances in the region you have defined. Ensure that you have the correct polarity set (either light characters on dark background, or dark characters on light background) in the Font Training dialog, and ensure that your search region is positioned correctly around the desired characters.
5001 The font contains the maximum number of characters

Fonts are allowed to have a maximum of 64 character models. Delete unwanted existing models before attempting to add new models.

5100

 The In-Sight host name you entered already exists You have attempted to add a host to the In-Sight Host Table that already exists. Choose a different name. For more information, see Host Table Dialog.
5101 Host name is not allowed

A host name is required and cannot be blank. Choose a name for the host.
5102 | Host name is not allowed | You have attempted to define an Explorer Host Table entry with an invalid host name. Certain host names are reserved for system use only and cannot be used as Host Table names. Choose a different name. For more information, see Explorer Host Table Setup Dialog.
5106 IP address is not allowed

You have attempted to add a host to the In-Sight Host Table that has an invalid IP address. Choose a different IP address. For more information, see Host Table Dialog.
5107 IP address is already defined

You have attempted to add a host to the In-Sight Host Table that has an IP address already used by an existing host table entry. Choose a different IP address. For more information, see Host Table Dialog.

5200

 Password not verified N/A
5201 The user name you entered already exists

In-Sight user names must be unique. If you attempt to enter a new user with the same name as an existing user, you will receive Error 5201. For more information, see User Access Settings Dialog.

5300

Unable to restart <host name>

 N/A

5301

 Error restarting <host name> N/A
5302 Unable to establish native mode connection to <host name>

The Native Mode channel on <host name> has stopped responding to In-Sight Explorer. Reboot the sensor and try the operation again.
5400 | Unknown connection error | N/A
5401 | Connection denied | N/A
5402 | Invalid username or password | N/A
5403 Invalid username or password

You may receive Error 5403 when attempting to log on to a sensor with a valid User Name but an incorrect Password if another user is already logged on to the sensor.
5404 Unable to connect to <host name>

Error 5404 can occur when In-Sight Explorer cannot create a TCP Socket to <host name> over port 1069. Usually this occurs because a firewall on the machine preventing the TCP socket from being created, or a second Network Interface Card that is configured such that Windows tries to use the second NIC instead of the correct NIC.

Generally, if you can create a telnet or ftp connection to <host name> from windows, you can also create the TCP socket to the sensor through In-Sight Explorer.

From a Windows command prompt, type 'telnet aaa.bbb.ccc.ddd 1069' where aaa.bbb.ccc.ddd is the IP address of <host name>. If telnet is unable to create a socket connection to that port, then In-Sight Explorer cannot either.

Note: If you are using the LMHOSTS file within Microsoft Windows for NetBIOS name resolution and have recently changed your network configuration to communicate on a different subnet, check the LMHOSTS file to ensure that <host name> is mapped to the correct IP address.
5405 | Internal Connect/Disconnect error | In-Sight Explorer has lost communication with the sensor listed in the title bar of the dialog. Ensure that the sensor is booted and communicating properly on the network. Power-cycle the remote sensor, if necessary.

5406

 Version Mismatch When loading a job file, you may encounter a Version Mismatch error or warning if the job file was created on a different version of In-Sight Explorer or PC Host. Saving the job file will update the version information.
N/A Version stamp mismatch. Job is <version stamp number>, and sensor is <version stamp number>. Continue loading?

There is a Version Stamp Mismatch between the job that you are attempting to load and the In-Sight vision system/emulator that you are attempting to load it onto. This happens when a job is created using one version of In-Sight software or firmware, and is loaded using a different version.

This warning does not indicate a compatibility problem between the job and the vision system. It is meant to alert you to the possibility of such a compatibility problem. If no other error message regarding failing to load the job appears after this warning, the job and the vision system/emulator are compatible and no further action is needed. If such an error message appears, you may have to modify this job file in order to make it fully compatible with the firmware running on the vision system/emulator.
5407

Your access level has to be adjusted to <user name>

 N/A
5408 | User <user name> is already locally connected to this system | N/A
5409 | User <user name> from <host name> is already remotely connected to this system | N/A
5410 | None of the files in the drag and drop list is valid | N/A
5500 | Unable to save image to file <file name> | N/A
5501 Unable to save job to file 'Filename' Error 5501 occurs with a secondary error descriptor:

Not allowed while Online
You have attempted to save a job file while the active In-Sight sensor was Online. Take the sensor Offline or enable the Allow Online Job Save checkbox on the User dialog if you have Full or Protected access, then retry the operation. For more information, see User Access Settings Dialog. This may occur in the Emulation Panel when trying to disable the local emulator. For more information, see Emulation Panel.
5502 | Saving to file name image.bmp, image.jpg, screen.bmp, or screen.jpg on an emulator is not allowed | N/A
5503

Could not create new folder named <folder name>

 N/A

5504

 Folder named <folder name> already exists N/A
5506 | Unable to open image file <file name> | N/A
5507 Unable to open job file <file name> Error 5507 occurs with a secondary error descriptor:

Access is denied
This message can appear when dragging and dropping a job file from Windows Explorer to the spreadsheet if the file name contains Chinese or Korean characters, and In-Sight Explorer's Language (System > Options > Language) is not set to Chinese or Korean, respectively. Set the correct Language for the file name, restart In-Sight Explorer and retry the operation.
5600 | A device with IP address <IP address> was detected on the network | N/A
5700 The formula is too complex

The maximum combined number of functions, arguments, and operators allowed in any given formula is 254. When an argument to a function is a range of cells, each cell within the range is counted as one argument.

For example, the formula Sum(1,2,A3:A6) consists of 1 function (Sum) and 6 arguments (1, 2, A3, A4, A5, A6); this consumes 7 of the allowed 254 for this particular formula.
5701 There is an error in the formula

Error 5701 occurs when you are entering a formula into either a spreadsheet cell or the Formula Bar if some portion of the formula needs to be corrected. Any invalid syntax will be highlighted in red, as shown in the preceding graphic. If no text is shown in red and you are receiving Error 5701, then:

  • You may not have completed typing the function's name or supplied all necessary arguments to the function.
  • The function may reference more than 254 arguments. The maximum number of arguments allowed in any given formula is 253. When an argument to a function is a range of cells, each cell within the range is counted as one argument. For example, "Sum(C1:C254)" causes this error message because the function references 254 arguments in the range, (C1:C254). For more information, see Error 5700.
Tip: Pressing CTRL+SHIFT+F will open your expression into the Formula Editor.
5800 | Unknown Native Mode Response | N/A
5801 | Unknown Native Mode Command | N/A
5802 | Insufficient privileges to execute command | N/A
5803 | Native Mode Command Failed | N/A
6000 Could not restore layout

When In-Sight Explorer is launched, it attempts to load a startup layout from the options.xml file, which is located in the application's root folder. If a Host Name is defined in the startup layout but cannot be detected on the network, then you will receive this error.

Error 6000 often occurs if the Host Name of the sensor or emulator in question has changed since the startup layout was last saved. Saving a new startup layout can resolve this issue:

  1. Log on to any In-Sight sensors to which you would like In-Sight Explorer to automatically log on at startup.
  2. Arrange the visual layout of views as desired (tiled or a single view maximized.)
  3. On the System Menu, click Save View Layout.
6001 Unable to open UDP port 1069

In-Sight Explorer opens UDP port 1069 to communicate with In-Sight sensors on a TCP/IP network. Some PC applications (such as Microsoft Outlook or the Microsoft IIS Admin service) open random UDP ports; this can interfere with the operation of In-Sight Explorer. If you receive the following error:

Error 6001: Unable to open UDP port 1069. In-Sight Explorer will be unable to detect In-Sight sensors on the network. Press OK to continue.

Close all applications and restart In-Sight Explorer. If you still receive the error message after closing all other applications, then reboot the PC and launch In-Sight Explorer again, before launching any other applications. When In-Sight Explorer is installed, a registry entry is created to prevent other Windows applications from using these ports, however the registry entry doesn't take effect until the PC is rebooted.

6002 | Could not stop emulator | N/A
6003 Could not start emulator

If an In-Sight sensor or emulator appears within the In-Sight Network tree upon application launch but In-Sight Explorer is unable to communicate with it, you may receive this error. Often this results from a startup layout that contains a host, defined in the Explorer Host Table, that cannot be accessed on the network. For more information, see Explorer Host Table Setup Dialog.

Ensure that the In-Sight sensor or emulator represented by <host name> is powered on and that it can communicate on the network. If it is an Explorer Host Table entry, ensure that the IP address of the host table entry matches the actual IP address of <host name> as defined in the network settings. For more information, see Network Settings Dialog.

Error 6003 can also occur if the Internet Information Services (IIS) Admin service is started in the Windows control panel; if running, try stopping this service and restarting In-Sight Explorer. The IIS Admin service may be restarted afterIn-Sight Explorer has been launched.

Following the steps to resolve Error 6001 may also fix Error 6003, as these can appear together.
6004 Report could not be written

In-Sight Explorer could not write <file name> to disk. Ensure that the drive exists and that it has sufficient free space to write the report file. If <file name> points to a network drive, ensure that the drive is connected and that you have write access to it.

In-Sight Explorer was unable to Link to the destination host. The host could be down, or you may have chosen not to complete the link when prompted.
6005 | Could not copy the style sheet: <file name> | N/A
6006

Could not display release notes: <file name>

 N/A
6007 Unable to get the directory from <host name>

In-Sight Explorer was not able to retrieve file directory information from <host name>. Your user account may not have sufficient privileges to view the files contained in this folder. Ensure that the Local FTP Port on <host name> matches the Explorer FTP Port specified in the Options dialog.

For more information, see FTP Settings Dialog and Explorer Host Table Setup Dialog.
6008 Link to <host name> could not be completed

Connection Refused: connect

In-Sight Explorer cannot communicate with the sensor that is currently selected in the In-Sight Network tree. Refresh the In-Sight Network by selecting Refresh from the View Menu. If the sensor is still inaccessible, power-cycle the sensor and retry the operation.

Invalid password, not logged in.

The current user does not have access to display the files on <host name>. Log on as a different user with sufficient access to see the files contained on this sensor and retry the operation.
6010 Unable to backup the file <file name>

Error 6010 occurs with a secondary error descriptor:

File not found

<file name> may be invalid with respect to the In-Sight file system. Ensure that the file name does not contain any symbols or special characters (such as $). Attempt to rename the file and retry the operation.
6011 Unable to create the backup directory for <host name>

On the System Menu, click Options. Ensure that the Backup Directory is a valid folder name and that this folder is accessible through Windows Explorer.

  • Transfer Incomplete - No Space: This error can occur when a file name is too long for the In-Sight file system, or the file size is too large to fit on the destination sensor. Check the backup directory, located in: <ISE dir>\Backups\<host name>, where <ISE dir> is the folder in which In-Sight Explorer was installed, and <host name> is the name of the destination In-Sight sensor. Ensure that the length of 'file name' is 15 characters or less (not including the extension). If the destination sensor contains many files, try deleting other files and attempt the restore operation again. Alternatively, copy the file manually using the In-Sight Files pane or Windows Explorer. For more information, see In-Sight Files.
  • Restore Operation on emulator prompts error: While attempting to restore an emulator, this error will occur if any files (image1A.bmp, image1B.bmp, image2A.bmp, etc) are read-only; remove the read-only attribute and then attempt the restore operation again. For more information, see Restore Dialog.
6012 | Exception while closing FTP session to <host name> | N/A
6015 Backup directory for <host name> not found

In-Sight Explorer was not able to locate the backup folder for <host name>. Backup folders are stored in the following path:

<InSight2>\Backups

where <InSight2> is the folder in which In-Sight Explorer was installed. Backups are stored as subfolders with a name equal to the Host Name of the sensor. Ensure that this folder was not moved, renamed, or deleted. See Error 6046 for more information on how backup directories are named.
6016 Deleting <file name> is not allowed

Certain files within the In-Sight file system are critical to the operation of the sensor, and thus cannot be deleted. The following files cannot be removed from an In-Sight sensor or emulator:

  • proc.set
  • image.bmp
  • image.jpg
  • screen.bmp
  • screen.jpg
6017 Error deleting <file name>

In-Sight Explorer was unable to delete <file name> from the In-Sight system. Ensure that the file is not read-only.

The file may have been deleted remotely. Refresh the In-Sight files pane by selecting a file and pressing F5.
6018 Error copying <file name>

In-Sight Explorer could not copy <file name> to the destination In-Sight sensor. The following messages may appear with Error 6018:

  • Transfer Incomplete - No Heap: If you were copying a file to an In-Sight sensor, the sensor may not have enough free flash memory to complete the file transfer. Try removing some files and copy the file again.
  • Write permission denied: The file you attempted to overwrite has read-only permissions. Remove the permission and attempt the copy again.
  • File not found: The file you attempted to copy no longer exists on the source sensor. Refresh the In-Sight Files pane (F5) and ensure that the file exists on the source sensor.
  • Problems with drag-and-drop file operations:
    • Issue #1: On an English operating system, dragging and dropping file names that contain Korean or Chinese characters from Windows Explorer to the In-Sight Files pane will result in Error 6018.
    • Issue #2: On a Korean operating system, it is only possible to drag and drop file names that contain Korean or English characters from Windows Explorer to the In-Sight Files pane, all other characters will result in Error 6018.
    • Issue #3: On a Chinese operating system, it is only possible to drag and drop file names that contain Chinese or English characters from Windows Explorer to the In-Sight Files pane, all other characters will result in Error 6018.
  • Workarounds:
    • Use the Open Job dialog (File > Open Job) to load the file
    • Use English characters in the file names
6019 Copying <file name> is not allowed

Certain files, such as proc.set, contain vital network settings and cannot be simply copied to another sensor.
6020 | The In-Sight sensor <host name> is still Online | N/A
6021 | Unable to get the online status of <host name> | N/A
6022 | Unable to set the online status of <host name> | N/A
6023 | Unable to verify the offline status of <host name> | N/A
6024

Unable to backup <host name>

 N/A
6025 | Unable to restore the online status of <host name> | N/A
6027 | Restart of <host name> timed out | N/A
6028 | Error restarting <host name> | N/A
6030 | Unable to read the settings from <host name> | N/A
6031 | Unable to get the network settings from <host name> | N/A
6032 | Unable to write the settings to <file name> | N/A
6033 | Unable to write the network settings to <file name> | N/A
6034 | Unable to save the network settings on <host name> | N/A
6035 | Host name is not valid | Error 6035 can occur when adding a new host to the Explorer Host Table if the Host Name field is left blank. Enter a name and click OK. For more information, see Explorer Host Table Setup Dialog.
6036 | Host name is not allowed | Error 6036 will occur if you attempt to set the Host Name of an Explorer Host Table entry to the same name as the PC. Choose a different name and click OK. For more information, see Explorer Host Table Setup Dialog.
6037 | Host name already defined | The Host Name you have attempted to add to the Explorer Host Table already exists in the table. Choose a different name and click OK. For more information, see Explorer Host Table Setup Dialog.
6038 | IP address is not valid | Certain IP addresses (such as 0.0.0.0) are not allowed for Explorer Host Table entries. Substitute a valid IP address. For more information, see Explorer Host Table Setup Dialog.
6039 | IP address is not allowed | Error 6039 can occur when adding a new host to the Explorer Host Table if the IP Address field is left blank. Some IP addresses (including loopback addresses of 127.x.x.x) are not allowed for Explorer Host Table entries. Substitute a valid IP address. For more information, see Explorer Host Table Setup Dialog.
6040 | IP address is already defined | Any given IP address can only correspond to one host table entry in the Explorer Host Table. Attempts to add a second sensor with the same IP will result in Error 6040. For more information, see Explorer Host Table Setup Dialog.
6041 Invalid security key

The Offline Programming Key you have entered into the Options dialog is invalid. Contact your Sales Engineer or Cognex Technical Support to obtain a valid key. For more information, see Technical Support.
6042 | Error writing registry | Error 6042 may appear when entering an Offline Programming Key if you are logged on to Windows as a user that does not have administrative rights. Log off Windows and log back on to the PC as an administrator. Then retry the operation. For more information, see Emulation Panel.

6043

Could not connect to emulator

 N/A
6044 | Failed to write Options.xml file | In-Sight Explorer was unable to save the options file. Ensure that options.xml (located in the root of your In-Sight Explorer installation folder) is not read-only and is not open in any other applications.
6046 Unable to create backup directory for <host name> In-Sight Explorer allows up to 256 backups for any given sensor name. If you exceed this number of backups, then you may receive an Error 6046. New incremental backups (such as sensor.002 and sensor.003) are created according to the highest-numbered backup in the folder.

For example, if you have created 100 backups for an In-Sight sensor named IS7K, then the Backup Directory would contain folders named IS7K, IS7K.001, IS7K.002, ..., IS7K.099. As long as IS7K.099 exists, the next backup created will be stored into IS7K.100 (even if all other backups were deleted).

To resolve Error 6046, you can browse to the Backup Directory in Windows Explorer and delete higher-numbered backups for <host name>. Alternatively, backups can be moved to a different folder. Keep in mind that in order for In-Sight Explorer to be able to restore backups, they must be located in the Backup Directory. For more information, see Backup Dialog and Restore Dialog.
6047 | The emulator was not started because no In-Sight sensors were detected on the network and an Offline Programming License has not been entered | Error 6047 will appear if you have not entered an Offline Programming Key and no In-Sight sensors could be detected on the network. This may occur if you do not have an active network connection. In-Sight Explorer will not connect to the local emulator without an Offline Programming Key if no sensors are detected on the network. For more information, see Emulation Panel.
6304 | Unable to open the directory <host name> | In-Sight Explorer was not able to perform a backup operation on <host name>. Ensure that you have a valid backup directory defined within the Options dialog and that this directory is not read-only. For more information, see File Utilities Panel.
6308 | Backup directory for <host name> not found | You have attempted to perform a restore operation for <host name> but In-Sight Explorer could not locate the backup files for this sensor. Ensure that the backup directory in the Options dialog is valid and points to a folder that contains a backup for <host name>. For more information, see File Utilities Panel.
6421 | Unable to connect to <host name> | This error can occur when attempting to restore a sensor from a backup. Your user account may not have sufficient permissions to access this sensor. Also ensure that the In-Sight sensor is powered on and that proper network cabling is attached.
6441 | Backup directory for <host name> not found | You have attempted to restore a sensor that has not been backed up, or the backup folder for that sensor is not accessible from the PC. Ensure that a backup operation has already been performed on <host name> and that the proper backup directory is defined within the Options dialog. For more information, see File Utilities Panel.

7001

Unknown error N/A
7003 Could not connect to host <host name>

In-Sight Explorer could not establish a connection to <host name>.

Error 7003 may appear with a secondary descriptor:

User <user name> from <host name> is already remotely connected to this system

To complete the operation, click Yes when prompted to Proceed with log on.
7700 | The account you entered does not have full permissions on any In-Sight vision sensor on your network | N/A
7705 | The IP address <IP address> conflicts with an existing In-Sight vision sensor's IP address | N/A
7706 | The IP address <IP address> conflicts with another device already on the network | N/A
7707 | The IP address <IP address> conflicts with an IP address that will be used by another In-Sight vision sensor | N/A
7708 | The host name <host name> conflicts with an existing In-Sight vision sensor's host name | You have attempted to add a host to the Explorer Host Table that already exists. Choose a different name. For more information, see Explorer Host Table Setup Dialog.
7709 | The host name <host name> conflicts with a host name that will be used by another In-Sight vision sensor | N/A
7711 | I/O error occurred during configuration | N/A
7712 | Configuration failed | The Add Sensor/Device to Network dialog was unable to properly configure the In-Sight sensor. See the error message that follows Error 7712 in the dialog for more troubleshooting information. For more information, see Add Sensor/Device to Network Dialog.
7713 | In-Sight vision sensor cannot be configured online | N/A
7714

Vision sensor is online - did not configure

 N/A
7715 | Failed to transition In-Sight vision sensor offline | N/A
7718 | Verification failed | The network settings you have attempted to configure through the Add Sensor/Device to Network dialog could not be applied. See the error message that follows Error 7718 in the dialog for specific troubleshooting information. For more information, see Add Sensor/Device to Network Dialog.
7719 | Configuration aborted | You have chosen to terminate the configuration of one or more In-Sight sensors within the Add Sensor/Device to Network dialog. For more information, see Add Sensor/Device to Network Dialog.
7720 | Invalid host name detected | Error 7720 can occur when adding a new host to the Explorer Host Table if the Host Name field is left blank. Enter a name and click OK. For more information, see Explorer Host Table Setup Dialog.
7721 Invalid IP address detected

The IP address you have specified could not be assigned to the In-Sight sensor. If you received this error message in the Add Sensor/Device to Network dialog, check to see if the In-Sight sensor is configured for IP Address Lock; the IP address of a sensor cannot be changed when IP address lock is set to true. Issuing SL0 to the sensor through a telnet session will remove the IP address lock.

Note: You must log on with Full access in order to modify this setting.) For more information, see User Access Settings Dialog.
7722 | Invalid DHCP setting detected | N/A
7723 | Invalid DNS server detected | N/A
7724 | Invalid default gateway server detected | N/A
7725 | Invalid subnet mask detected | N/A
7726 | Invalid domain detected | N/A
7727

Invalid username or password

 N/A
7728 Could not connect to In-Sight vision sensor

The Add Sensor/Device to Network dialog could not establish communication with the In-Sight sensor. Ensure that the sensor has power and an active network connection. See Error 5404 for more troubleshooting tips.
7729

In-Sight vision sensor did not properly reboot

 N/A
7731 Could not set the network settings on this device

See the note that follows Error 7731 in the dialog for more troubleshooting information.

In addition, ensure that the device is connected on the same physical subnet as the PC, and that it is powered on. Check all Ethernet cabling to the device.

If all else fails, connect the device directly to your PC and power-cycle the device.
7740 | The selected network interface is not connected | N/A
7741

The selected network interface is currently using DHCP

 N/A
7742 | The selected network interface is currently using DHCP and has an IP address of ''0.0.0.0''. You must reconfigure your network interface for a static IP address to continue with this procedure. | N/A


In-Sight® Explorer 5.7.2 Release Notes

© Copyright 1999-2019 Cognex Corporation. All rights reserved.

Revision: 5.7.2.5, 02/13/2019

Overview

This document describes the In-Sight Explorer software, including the following topics:

  • System Requirements
  • Changes & Fixes
  • Known Issues

Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized editions. To access the updated documentation from the In-Sight Explorer user interface and Microsoft® Windows® Start menu, complete the following steps:

  1. Log on to the PC with administrative privileges.
  2. Copy the downloaded documentation to the appropriate location in the installation directory. The default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for In-Sight Explorer software.

PC Hardware Minimum Requirements

The following minimum hardware requirements are for PCs that are connected to a single low-resolution In-Sight vision system running at a slow production speed:

  • Intel® Celeron® 1000M processor running at 1.8GHz (or equivalent)
  • 2GB of available RAM
  • 4GB of available hard-disk space
  • Video card that can display 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network interface card (at least 100Mbps) for connecting to an In-Sight vision system

PC Hardware Recommended Requirements

The following recommended hardware requirements are for PCs that are simultaneously connected to up to four In-Sight vision systems:

  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 8GB of available hard-disk space
  • Video card that can display 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit network interface card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft Windows 10 Professional (64-bit)
  • Microsoft Windows 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2016

Although you can install and run In-Sight Explorer on other Windows operating systems, PCs that do not meet the preceding requirements are not officially supported.

Supported Languages

  • Chinese (Simplified)
  • English
  • French
  • German
  • Japanese
  • Korean
  • Spanish (European)

Firmware Version Support

In-Sight 5.7.2 software contains three firmware versions:

  • In-Sight 5.7.2
  • In-Sight 5.7.1
  • In-Sight 4.10.5 PR1

In-Sight vision systems that have older firmware versions might work properly. However, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, update vision systems that run older firmware to the most recent, supported firmware versions. For a list of models and supported firmware versions, see the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 5.7.2

  • In-Sight Advantage Engine

In-Sight Firmware 5.7.1

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7000 Gen2 series vision systems
  • In-Sight 8000 series vision systems
  • In-Sight 9000 series vision systems

In-Sight Firmware 4.10.5 PR1

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7000 Gen2 series vision systems)

Microsoft .NET Framework 4.5

In-Sight software requires Microsoft .NET Framework 4.5. If the In-Sight software installer fails to detect Microsoft .NET Framework 4.5, it attempts to download and install it.

Note: If you attempt to install In‑Sight Explorer on a system with Microsoft .NET Framework 3.5 disabled while Windows updates are being installed, you may receive the following error message: Error installing Microsoft .NET Framework; Error code 0x800f081f. If this occurs, wait for the Windows updates to complete, reboot if necessary, and then install In‑Sight Explorer.

Changes & Fixes

Note:

  • For changes and fixes in previous releases, see past In‑Sight Explorer release notes. Release notes for previous 5.x.x releases are available in the In‑Sight Explorer® Help file.
  • The release notes include issue numbers (where applicable) to better track known issues reported by Cognex Technical Support.
Issue# | Change/Fix
IS‑459 | The performance of loading complex EasyBuilder jobs to the In-Sight vision system and/or sensor has been improved.
IS‑827 | An unhandled exception error is no longer displayed when launching the Firmware Update dialog.
IS‑758 | The PC filmstrip no longer slows down during image playback when connected to the In-Sight emulator.

Known Issues

Note: The release notes include issue numbers (where applicable) to better track known issues reported by Cognex Technical Support.
Issue# | Issue | Affected Firmware Version
IS-856

At times, saving a file to a sub-directory in an FTP server's root directory using the WriteImageFTP, WriteFTP or WriteImageSFTP function can result in the file being saved to the FTP server's root directory.

Workaround: Save files to the FTP server's root directory.

 5.7.2, 5.7.1 & 4.10.5 PR1
IS-334

When you try to connect your vision system/sensor to the Web HMI for the first time, you may receive an error message: Permission error appears and connection is denied.

Workaround: Before you connect your vision system/sensor to the Web HMI, reinstall or update the vision system/sensor firmware on the system.

 5.7.2 & 5.7.1
48478 | If an In-Sight vision system that has a job with many instances of the ReadIDMax function, the job might require more memory than is available on the vision system. Any instances of the ReadIDMax function that exceed the available memory returns #ERR. For example, if an In-Sight 8405 vision system job contains more than 100 instances of the ReadIDMax function, you might encounter this problem. | 5.7.2 & 5.7.1
45581 | For In-Sight 7600/7800 series and 9902L vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch might increase to more than 10µs offset from master. | 5.7.2 & 5.7.1
35828 | If an industrial Ethernet communication protocol triggers the vision system, the JobPass signal is sent only if the job contains a WriteResultsBuffer function. This issue does not occur with EasyBuilder applications. | 5.7.2 & 5.7.1
32479

If you update the In-Sight vision system firmware while it is connected to a POWERLINK network, it results in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before you update the vision system firmware, complete the following steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer that runs In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.5 PR1


In-Sight® Explorer 5.7.1 Release Notes

© Copyright 1999-2019 Cognex Corporation. All rights reserved.

Revision: 5.7.1.7, 01/02/2019

Overview

This document describes the In-Sight Explorer software, including the following topics:

  • System Requirements
  • Changes & Fixes
  • Known Issues

Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized editions. To access the updated documentation from the In-Sight Explorer user interface and Microsoft® Windows® Start menu, complete the following steps:

  1. Log on to the PC with administrative privileges.
  2. Copy the downloaded documentation to the appropriate location in the installation directory. The default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for In-Sight Explorer software.

PC Hardware Minimum Requirements

The following minimum hardware requirements are for PCs that are connected to a single low-resolution In-Sight vision system running at a slow production speed:

  • Intel® Celeron® 1000M processor running at 1.8GHz (or equivalent)
  • 2GB of available RAM
  • 4GB of available hard-disk space
  • Video card that can display 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network interface card (at least 100Mbps) for connecting to an In-Sight vision system

PC Hardware Recommended Requirements

The following recommended hardware requirements are for PCs that are simultaneously connected to up to four In-Sight vision systems:

  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 8GB of available hard-disk space
  • Video card that can display 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit network interface card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft Windows 10 Professional (64-bit)
  • Microsoft Windows 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2016

Although you can install and run In-Sight Explorer on other Windows operating systems, PCs that do not meet the preceding requirements are not officially supported.

Supported Languages

  • Chinese (Simplified)
  • English
  • French
  • German
  • Japanese
  • Korean
  • Spanish (European)

Firmware Version Support

In-Sight 5.7.1 software contains three firmware versions:

  • In-Sight 5.7.1
  • In-Sight 5.3.3
  • In-Sight 4.10.5 PR1

In-Sight vision systems that have older firmware versions might work properly. However, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, update vision systems that run older firmware to the most recent, supported firmware versions. For a list of models and supported firmware versions, see the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 5.7.1

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7000 Gen2 series vision systems
  • In-Sight 8000 series vision systems
  • In-Sight 9000 series vision systems

In-Sight Firmware 5.3.3

  • In-Sight Advantage Engine

In-Sight Firmware 4.10.5 PR1

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7000 Gen2 series vision systems)

Microsoft .NET Framework 4.5

In-Sight software requires Microsoft .NET Framework 4.5. If the In-Sight software installer fails to detect Microsoft .NET Framework 4.5, it attempts to download and install it.

Note: If you attempt to install In‑Sight Explorer on a system with Microsoft .NET Framework 3.5 disabled while Windows updates are being installed, you may receive the following error message: Error installing Microsoft .NET Framework; Error code 0x800f081f. If this occurs, wait for the Windows updates to complete, reboot if necessary, and then install In‑Sight Explorer.

Changes & Fixes

Note:

  • For changes and fixes in previous releases, see past In‑Sight Explorer release notes. Release notes for previous 5.x.x releases are available in the In‑Sight Explorer® Help file.
  • The release notes include issue numbers (where applicable) to better track known issues reported by Cognex Technical Support.
Issue# | Change/Fix | Applicable Firmware Version
IS‑556

Added a Filter search box to the Palette in the Spreadsheet view, to quickly find a specific function or snippet.

 N/A
IS‑555

The Job Server is now supported for In-Sight 2000 vision sensors. The Job Server is used to configure an FTP server to host In-Sight job files for the vision sensor. This allows another device, such as a PLC or robot controller, to use the Load File (LF) and Store File (TF) Native Mode commands to change jobs without specifying a location.

 5.7.1
IS‑533 | If the ValidateIDData function (ID > ValidateIDData) is referencing a ReadIDMax function (ID > ReadIDMax) that reads an invalid symbol, the GetDiagnosticString function now returns #ERR. Previously, this function may have returned "Data validated successfully", even if the symbol was invalid. | 5.7.1
IS‑532 | When the In-Sight 9912 vision system is connected to the CIO-MICRO I/O module, line 12 (Pass/Fail LED) and line 13 (Error LED) are now properly displayed and configurable from the Discrete I/O Settings dialog in the Spreadsheet view and from the Discrete Inputs/Outputs application step in the EasyBuilder view. Previously, these lines were not displayed and could not be configured. | 5.7.1
IS‑482 | When using the BeadFind function (Vision Tools > InspectEdge), if the bead sample location is found and the bead path edited using the Edit Bead Path parameter, the modified bead path is now properly retained. If using In-Sight 5.7.0 firmware, the modified bead path was not retained and reverted to the original, pre-edited bead path. | 5.7.1
IS‑467 | When connected to the In-Sight 2000-23M and using the EasyBuilder Angle tool (Measurement Tools > Angle) to measure the angle between two edge features, the correct angle value is now returned. Previously, the angle value may have incorrectly returned 0.00. | 5.7.1
IS‑460 | When using the WriteImageFTP function (Input/Output > Network) in the Spreadsheet view or exporting images via FTP (Communications > FTP) in the EasyBuilder view, the resolution of the exported image is now correct (Full, Quarter or Half). Previously, the resolution of the exported image did not match the setting specified within In-Sight Explorer. | 5.7.1
IS‑455 | If the Modbus TCP Server dialog is launched from the Network Settings dialog and the vision system rebooted for network changes to take effect, the settings in the Modbus TCP Server dialog are still accessible and can be modified. Previously, after the vision system was rebooted, these settings were grayed out and could not be modified. | 5.7.1
IS‑436

GS1 Application Identifiers 91 - 99 has been improved to support data fields with a maximum of 90 alpha-numeric characters, which is compliant with the GS1-128 application standard. Previously, a maximum of 30 alpha-numeric characters was supported. The following improvements have been made for the IDValidate Vision Data Access functions (Vision Data Access > IDValidate):

  • The GetAIDescription, GetFieldData and GetFieldIdentifier functions now return the expected values. Previously these functions returned #ERR for all identifiers.
  • The GetDataFormat function now returns the format used for encoding data. Previously this function returned #ERR.
  • The GetDiagnosticString function now returns "Data validated successfully." Previously, this function returned "Invalid field separator."
  • The GetNumFields function now returns the number of fields encoded in the data. Previously this function returned #ERR.
  • The GetValid function now returns a 1, indicating the data is valid. Previously, this function returned a 0, indicating the data was invalid.
 5.7.1
IS‑399

When In-Sight Explorer is installed to a PC that is not connected to a network and an Offline Programming Key has been entered in the Options dialog, the emulator can now be connected to. For In-Sight Explorer 5.7.0, if all Ethernet network cards were disabled on the PC or if a wireless adapter was enabled but not connected to a network, the emulator could not be connected to.

 N/A
IS‑364 | When using the TrainPatMaxRedLineColor or FindPatMaxRedLineColor functions (Vision Tools > Pattern Match) and the External Region parameter is referencing an EditCompositeRegion function (Graphic Functions > Controls) or if the region is rotated, the pattern is now properly found. Previously if referencing an EditCompositeRegion function or the region was rotated, the pattern may not have been found. | 5.7.1

Known Issues

Note: The release notes include issue numbers (where applicable) to better track known issues reported by Cognex Technical Support.
Issue# | Issue | Affected Firmware Version
IS-334

When you try to connect your vision system/sensor to the Web HMI for the first time, you may receive an error message: Permission error appears and connection is denied.

Workaround: Before you connect your vision system/sensor to the Web HMI, reinstall or update the vision system/sensor firmware on the system.

 5.7.0, 5.6.1 & 5.6.0
48478 | If an In-Sight vision system that runs firmware 5.6.0 has a job with many instances of the ReadIDMax function, the job might require more memory than is available on the vision system. Any instances of the ReadIDMax function that exceed the available memory returns #ERR. For example, if an In-Sight 8405 vision system job contains more than 100 instances of the ReadIDMax function, you might encounter this problem. | 5.7.1
45581 | For In-Sight 7600/7800 series and 9902L vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch might increase to more than 10µs offset from master. | 5.7.1
42550 | In-Sight models that run 5.1.0 and later firmware versions do not support In-Sight Track & Trace job files. | 5.7.1
35828 | If an industrial Ethernet communication protocol triggers the vision system, the JobPass signal is sent only if the job contains a WriteResultsBuffer function. This issue does not occur with EasyBuilder applications. | 5.7.1
32479

If you update the In-Sight vision system firmware while it is connected to a POWERLINK network, it results in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before you update the vision system firmware, complete the following steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer that runs In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.5 PR1


In-Sight® Explorer 5.7.0 Release Notes

© Copyright 1999-2018 Cognex Corporation. All rights reserved.

Revision: 5.7.0.43, 11/08/2018

Overview

This document describes the In-Sight Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues

Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized editions. To access the updated documentation from the In-Sight Explorer user interface and Microsoft® Windows® Start menu, complete the following steps:

  1. Log on to the PC with administrative privileges.
  2. Copy the downloaded documentation to the appropriate location in the installation directory. The default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Minimum Requirements

The following minimum hardware requirements are for PCs that you connect to a single low-resolution In-Sight vision system running at a slow production speed:

  • Intel® Celeron® 1000M processor running at 1.8GHz (or equivalent)
  • 2GB of available RAM
  • 4GB of available hard-disk space
  • Video card that can display 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network interface card (at least 100Mbps) for connecting to an In-Sight vision system

PC Hardware Recommended Requirements

The following recommended hardware requirements are for PCs that you simultaneously connect to up to four In-Sight vision systems:

  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 8GB of available hard-disk space
  • Video card that can display 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit network interface card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft Windows 10 Professional (64-bit)
  • Microsoft Windows 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2016

Although you can install and run In-Sight Explorer on other Windows operating systems, PCs that do not meet the preceding requirements are not officially supported.

Supported Languages

  • Chinese (Simplified)
  • English
  • French
  • German
  • Japanese
  • Korean
  • Spanish (European)

Firmware Version Support

In-Sight 5.7.0 software contains three firmware versions:

  • In-Sight 5.7.0
  • In-Sight 5.3.3
  • In-Sight 4.10.5

In-Sight vision systems that have older firmware versions might work properly. However, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, update vision systems that run older firmware to the most recent, supported firmware versions. For a list of models and supported firmware versions, see the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 5.7.0

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7000 Gen2 series vision systems
  • In-Sight 8000 series vision systems
  • In-Sight 9000 series vision systems

In-Sight Firmware 5.3.3

  • In-Sight Advantage Engine

In-Sight Firmware 4.10.5

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7000 Gen2 series vision systems)

Microsoft .NET Framework 4.5

In-Sight software requires Microsoft .NET Framework 4.5. If the In-Sight software installer fails to detect Microsoft .NET Framework 4.5, it attempts to download and install it.

New Features

New Feature | Applicable Firmware Version
Supports the new In-Sight 9912 and 9912C vision systems. | 5.7.0
Added support for the Cognex URCaps plugin, that integrates with Universal Robots to enable a hand-eye calibration protocol for vision-guided pick and place applications between Cognex 2D vision systems and Universal Robots. This plugin uses the Cognex Robot Library for communicating between robots and the vision system. This feature is supported only through EasyBuilder for In-Sight vision systems, and is not supported on In-Sight 2000 vision sensors. | 5.7.0
Added a Robot calibration tool, which links a vision tool to a robot calibration function, transforms the pixel coordinates to the pose, and automatically creates a calibration file in EasyBuilder. This tool is not supported on In-Sight 2000 vision sensors. | 5.7.0
Added a Robot Guidance tool, which allows the vision system to communicate the location of the part to the robot. This tool is not supported on In-Sight 2000 vision sensors. | 5.7.0
High Dynamic Range (HDR) is now supported to provide more evenly exposed images without overexposed or underexposed regions. Two HDR modes are supported: HDR and HDR+. Supported only on In-Sight 7905 and In-Sight 9912 monochrome vision systems. | 5.7.0
The In-Sight 9902L line scan vision system now supports the In-Sight CIO-MICRO and CIO-1400 I/O modules. | 5.7.0

Several improvements have been made to the In-Sight Web HMI:

  • Added an Image Resolution option to the HMI Settings dialog.
  • Added support for loading and saving a job from and to a vision system/sensor, a local PC or a remote location.
 5.7.0
Added a new Spreadsheet Navigator pane, which provides an overview of the spreadsheet and allows you to navigate the job file quickly. | 5.7.0 & 4.10.5
Added support for the passive FTP mode, which enables you to access an FTP client through a firewall that does not allow connections to be initiated from the outside. | 5.7.0 & 4.10.5
Added the CC-Link IE Field Basic protocol to the Network Settings dialog as an Industrial Ethernet protocol selection. | 5.7.0
Added the CC-Link IE Field Basic protocol to the Communication application step. | 5.7.0

Changes & Fixes

Note:

  • For changes and fixes in previous releases, see past In-Sight Explorer release notes. Release notes for previous 5.x.x releases are available in the In-Sight Explorer® Help file.
  • The release notes include Change Request numbers (CR#) (where applicable) to better track known issues reported by Cognex Technical Support.
CR# | Change/Fix | Applicable Firmware Version
N/A | In-Sight Explorer can now be installed as a 32-bit or 64-bit application. Note the default installation path is unchanged, and In-Sight Explorer is installed to C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x for both 32-bit and 64-bit operating systems. | 5.7.0 & 4.10.5
N/A

For In-Sight 2000 series vision sensors, the EasyBuilder Pattern Location and Inspection tools have been changed to improve pattern finding accuracy and processing time for single pattern applications.

Notes:

  • The Patterns (1-10) tool has not changed.
  • When attempting to load a job containing this tool configured on the In-Sight firmware 5.7.0 or later to an In-Sight vision sensor running firmware version 5.6.x earlier, an error message will display and the job load will fail.
 5.7.0
N/A | If a 9902L line scan vision system is upgraded from In-Sight firmware version 5.6.1 PR1 to In-Sight firmware version 5.7.0, the vision system RAM is increased from 512MB to 832MB. Note that if the vision system is later downgraded from In-Sight firmware version 5.7.0 to In-Sight firmware version 5.6.1, the vision system RAM is decreased to the original 512MB. | 5.7.0
81794 | The In-Sight 2000 series vision sensor now supports the Set Integer (SI), Set Float (SF), Set Event 8 (SE8), and Set Event and Wait 8 (SW8) basic Native Mode commands. | 5.7.0
81464

You can now change the AcquireImage Clip Mode or Acquisition Duration parameter values while the In-Sight 9902L line scan vision system is Online without placing the vision system Offline first.

 5.7.0
79652 | For In-Sight 2000 series vision sensors, the maximum view connections (In-Sight Explorer, VisionView or Web HMI) has been increased to 3. | 5.7.0
79547 | The AIM DPM - Contract Compliance option in the VerifyIDCode function's Metrics drop-down list has been updated to ISO 29158 / AIM-DPM-Contract Compliance. | 5.7.0
79345 | When Web HMI is in use, you can now run PROFINET cyclic I/O faster than 8ms. | 5.7.0
79072 | The GetAIDescription function (Vision Data Access > GetAIDescription) and GetFieldIdentifier function (Vision Data Access > GetFieldIdentifier) have been updated to support the GS1 714 Application Identifier. | 5.7.0 & 4.10.5 PR1
47619 | The Set Limits button for EasyBuilder Inspection tools has been renamed to Auto Limits. | 5.7.0

Known Issues

Note: The release notes include Change Request numbers (CR#) (where applicable) to better track known issues reported by Cognex Technical Support.
CR# | Issue | Affected Firmware Version
82479

If you try to install the In-Sight Explorer 5.7.0 on a system with the Microsoft .NET Framework 3.5 disabled when the Windows updates are still being processed, you may receive an error message: Error installing Microsoft .NET Framework; Error code 0x800f081f.

Workaround: Wait for the Windows updates to complete (reboot if necessary), then install the In-Sight Explorer 5.7.0.

 5.7.0
82030

When you try to connect your vision system/sensor to the Web HMI for the first time, you may receive an error message: Permission error appears and connection is denied.

Workaround: Before you connect your vision system/sensor to the Web HMI, reinstall or update the vision system/sensor firmware on the system.

 5.7.0, 5.6.1 & 5.6.0
48478 | If an In-Sight vision system that runs firmware 5.6.0 has a job with many instances of the ReadIDMax function, the job might require more memory than is available on the vision system. Any instances of the ReadIDMax function that exceed the available memory returns #ERR. For example, if an In-Sight 8405 vision system job contains more than 100 instances of the ReadIDMax function, you might encounter this problem. | 5.7.0
45581 | For In-Sight 7600/7800 series vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch might increase to more than 10µs offset from master. | 5.7.0
42550 | In-Sight models that run 5.1.0 and later firmware versions do not support In-Sight Track & Trace job files. | 5.7.0
35828 | If an industrial Ethernet communication protocol triggers the vision system, the JobPass signal is sent only if the job contains a WriteResultsBuffer function. This issue does not occur with EasyBuilder applications. | 5.7.0
32479

If you update the In-Sight vision system firmware while it is connected to a POWERLINK network, it results in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before you update the vision system firmware, complete the following steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer that runs In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.5


In-Sight® Explorer 5.6.1 Release Notes

© Copyright 1999-2018 Cognex Corporation. All rights reserved.

Revision: 5.6.1.15, 07/26/2018

Overview

This document describes the In-Sight Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues

Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized editions. To access the updated documentation from the In-Sight Explorer user interface and Microsoft® Windows® Start menu, complete the following steps:

  1. Log on to the PC with administrative privileges.
  2. Copy the downloaded documentation to the appropriate location in the installation directory. The default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Minimum Requirements

The following minimum hardware requirements are for PCs that you connect to a single low-resolution In-Sight vision system running at a slow production speed:

  • Intel® Celeron® 1000M processor running at 1.8GHz (or equivalent)
  • 2GB of available RAM
  • 4GB of available hard-disk space
  • Video card that can display 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network interface card (at least 100Mbps) for connecting to an In-Sight vision system

PC Hardware Recommended Requirements

The following recommended hardware requirements are for PCs that you simultaneously connect to up to four In-Sight vision systems:

  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 8GB of available hard-disk space
  • Video card that can display 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit network interface card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft Windows 10 Professional (64-bit)
  • Microsoft Windows 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2016

Although you can install and run In-Sight Explorer on other Windows operating systems, PCs that do not meet the preceding requirements are not officially supported.

Supported Languages

  • Chinese (Simplified)
  • English
  • French
  • German
  • Japanese
  • Korean
  • Spanish (European)

Firmware Version Support

In-Sight 5.6.1 software contains three firmware versions:

  • In-Sight 5.6.1
  • In-Sight 5.2.2
  • In-Sight 4.10.5

In-Sight vision systems that have older firmware versions might work properly. However, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, update vision systems that run older firmware to the most recent, supported firmware versions. For a list of models and supported firmware versions, see the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 5.6.1

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7000 Gen2 series vision systems
  • In-Sight 8000 series vision systems
  • In-Sight 9902L line scan vision system

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 4.10.5

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7000 Gen2 series vision systems)

Microsoft .NET Framework 4.5

In-Sight software requires Microsoft .NET Framework 4.5. If the In-Sight software installer fails to detect Microsoft .NET Framework 4.5, it attempts to download and install it.

New Features

New Feature | Applicable Firmware Version
Supports the new In-Sight 9902L line scan vision system. | 5.6.1

Added an Acquisition Duration parameter to the AcquireImage property sheet that specifies when to end image acquisition if the Clip Mode parameter is set to Fill Black or Reduce Image lines. This parameter is supported for only the In-Sight 9902L line scan vision system.

 5.6.1

Several improvements have been made to the Line Scan Settings dialog when connected to the In-Sight 9902L line scan vision system:

  • The Max Image Height drop-down now includes 12288 and 16384 options, to increase the standard area image height.
  • Added the 1K Resolution (Low Light Mode) check box. When selected, the standard area image is decreased to 1024 pixels wide, providing increased light sensitivity.
 5.6.1

Added an Eighth (1/8) image resolution option for live acquisition and Online images to the following areas of the product:

  • Live Acquisition Resolution and Online Resolution drop-down list in the Image Settings dialog box.
  • Image Resolution drop-down list, available from the Record tab of the Record/Playback Options dialog box.
  • Image Resolution drop-down list, available from the Record Defaults panel in the Options dialog box.
  • The EV SetSystemConfig("LiveImage",Resolution,MaxFrameRate) and EV SetSystemConfig("OnlineImage",Resolution,MaxFrameRate) Extended Native Mode commands now support the Eighth resolution option, with a Resolution parameter value of 4.
Note: The Eighth resolution option is not supported for color vision systems.
 5.6.1

Added support for scheduling multiple time-based triggers, sent from a PLC (over an EtherNet/IP connection) to the vision system. The vision system can respond to a PLC trigger within 100 microseconds of the actual trigger that the PLC sends. This feature is supported for In-Sight 7000 Gen2 series and In-Sight 9902L vision systems configured to use CIP-Sync and the Precision Time Protocol (PTP), defined by the IEEE 1588 (version 2) standard.

  • Updated the EV SetSystemConfig("Eip.TriggerTimestampInputOffset",Offset) Extended Native Mode command to set the offset into the EtherNet/IP output assembly, which is used to trigger the vision system. For vision systems that run In-Sight firmware version 5.6.1 and later, it captures the 64-bit system time offset in microseconds, followed by the 64-bit timestamps in microseconds.
  • Added the EV SetSystemConfig("Eip.TriggerTimestampNumInputs",Timestamps) Extended Native Mode command to set the number of timestamps that the vision system can process simultaneously from one PLC user data packet. The PLC can send a maximum of four timestamp triggers in one user data packet.
  • Added the EV SetSystemConfig("Eip.TriggerTimestampMaxQueueLength",Timestamps) Extended Native Mode command to set the maximum number of timestamps the vision system can store simultaneously. The vision system can store a maximum of ten timestamps in the queue.
  • Added the EV SetSystemConfig("Eip.TriggerTimestampOverrideWindowUs",Microseconds) Extended Native Mode command to set the number of microseconds a pending PLC timestamp has to fall within, before it can override an existing timestamp on the vision system.
  • Added the EV SetSystemConfig("Eip.TriggerTimestampLegacyMode",TriggerMode) Extended Native Mode command that enables the legacy mode for single timestamp user data format and triggering. You must issue this command only if you migrate from a vision system that runs 4.5.0 - 4.10.x firmware to a vision system that runs 5.6.1 firmware or later and must reuse the existing PLC logic.
5.6.1

Changes & Fixes

Note:

  • For changes and fixes in previous releases, see past In-Sight Explorer release notes. Release notes for previous 5.x.x releases are available in the In-Sight Explorer® Help file.
  • The release notes include Change Request numbers (CR#) (where applicable) to better track known issues reported by Cognex Technical Support.
CR# | Change/Fix | Applicable Firmware Version
81197 | If you configure the Sensor Filmstrip Queue Size to save the maximum number of images to the vision system, place the vision system Online and select an image in the filmstrip queue, the spreadsheet cell content remains intact. Previously, the contents of the spreadsheet cells might have been erased. | 5.6.1
79668 | When an In-Sight 2000 series color vision sensor is connected to a Web HMI and it acquires images as fast as possible, the vision sensor trigger rate is no longer affected. Previously, the trigger rate could drop significantly. | 5.6.1
79073 | For In-Sight 2000 series vision sensors with the HMI Server enabled, stability issues no longer occur when the sensor is connected to the Web HMI through a high-traffic network. Previously, the vision sensor could become unresponsive and disconnect from the network, requiring a power cycle. | 5.6.1
43186 | When you configure a Serial Text, Serial Native, TCP/IP or UDP device in the Communication application step on an In-Sight 2000 series vision sensor, the FormatString dialog box displays the Output String correctly. Previously, the FormatString dialog box displayed #ERR. | 5.6.1

Known Issues

Note: The release notes include Change Request numbers (CR#) (where applicable) to better track known issues reported by Cognex Technical Support.
CR# | Issue | Affected Firmware Version
81464

If you programmatically change the AcquireImage Clip Mode or Acquisition Duration parameter values while the In-Sight 9902L line scan vision system is Online, when you place the visions system Offline, the changes do not take effect.

Workaround: To update the parameter value after you place the vision system Offline, manually acquire an image.

 5.6.1
79652 | For In-Sight 2000 series vision sensors that run firmware version 5.6.0, the Maximum View Connections (In-Sight Explorer, VisionView or Web HMI) is limited to 2. | 5.6.1
79345 | When Web HMI is in use, do not run PROFINET cyclic I/O faster than 8ms. | 5.6.1
48478 | If an In-Sight vision system that runs firmware 5.6.0 has a job with many instances of the ReadIDMax function, the job might require more memory than is available on the vision system. Any instances of the ReadIDMax function that exceed the available memory returns #ERR. For example, if an In-Sight 8405 vision system job contains more than 100 instances of the ReadIDMax function, you might encounter this problem. | 5.6.1
45581 | For In-Sight 7600/7800 series vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch might increase to more than 10µs offset from master. | 5.6.1
42550 | In-Sight models that run 5.1.0 and later firmware versions do not support In-Sight Track & Trace job files. | 5.6.1
35828 | If an industrial Ethernet communication protocol triggers the vision system, the JobPass signal is sent only if the job contains a WriteResultsBuffer function. This issue does not occur with EasyBuilder applications. | 5.6.1
32479

If you update the In-Sight vision system firmware while it is connected to a POWERLINK network, it results in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before you update the vision system firmware, complete the following steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer that runs In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.5


In-Sight® Explorer 5.6.0 Release Notes

© Copyright 1999-2018 Cognex Corporation. All rights reserved.

Revision: 5.6.0.35, 04/29/2018

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues

Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized editions. To access the updated documentation from the In-Sight Explorer user interface and Windows® Start menu, complete the following steps:

  1. Log on to the PC with administrative privileges.
  2. Copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The minimum hardware requirements are for PCs that you connect to a single low-resolution In-Sight vision system running at a slow production speed.
  • Intel® Celeron® 1000M processor running at 1.8GHz (or equivalent)
  • 2GB of available RAM
  • 4GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network interface card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The recommended hardware requirements are for PCs that you simultaneously connect to up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 8GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit network interface card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft® Windows® 10 Professional (64-bit)
  • Microsoft Windows 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2016

Although you can install and run In-Sight Explorer on other Windows operating systems, PCs that do not meet the preceding requirements are not officially supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

Firmware Version Support

In-Sight 5.6.0 software contains three firmware versions:

  • In-Sight 5.6.0
  • In-Sight 5.2.2
  • In-Sight 4.10.5

In-Sight vision systems that have older firmware versions might work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, update vision systems running older firmware to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, see the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 5.6.0

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7000 Gen2 series vision systems
  • In-Sight 8000 series vision systems

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 4.10.5

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7000 Gen2 series vision systems)

Microsoft .NET Framework 4.5

In-Sight software requires Microsoft .NET Framework 4.5. If the In-Sight software installer fails to detect Microsoft .NET Framework 4.5, it will attempt to download and install it.

New Features

New Feature | Affected Firmware Version
Supports the following new vision sensor models: In-Sight 2000-110, 2000-120, 2000-120C, 2000-130 and 2000-130C, featuring liquid lens with auto-focus capability. | 5.5.0
Supports the following new vision systems: In-Sight 7900 and 7902. | 5.5.0
Supports the following new vision systems: In-Sight 7900C, 7901, 7901C, 7902, 7902C, 7905 and 7905C. | 5.6.0
Introduces the new Web HMI feature, which allows users to access job data (images, graphics controls, pass/fail data, etc.) and interact with the vision system or sensor through a web-based human-machine interface (HMI). | 5.6.0

Added the following abilities to the EasyBuilder Communication Application step:

  • Exports a data file to an FTP server or to the SD card installed to the In-Sight 7000 Gen2 vision system while Online.
  • Appends a data string to a file on an FTP server or on the SD card installed to the In-Sight 7000 Gen2 vision system while Online.
 5.6.0

Several improvements have been made to the In-Sight Network pane:

  • Display or hide the Model, IP address, MAC address and firmware version of the In-Sight devices (vision systems, vision sensors, emulators and host tables).
  • Group the In-Sight devices.
  • Filter the In-Sight devices that use multiple tokens by using the new Filter textbox and the Apply button.
Note: Due to these changes, the SD Card and RAM Disk folders no longer display in the In-Sight Network pane. To display these folders, use the In-Sight Files pane.
 5.6.0 and 4.10.5

Added PatMax RedLine™ Color, a new color pattern matching tool that can locate trained features in the 24-bit color image without converting to greyscale. PatMax RedLine Color consists of two functions: TrainPatMaxRedlineColor and FindPatMaxRedLineColor (Vision Tools > Pattern Match). The TrainPatMaxRedLineColor function trains a pattern, and the FindPatMaxRedLineColor function is used to locate one or more instances of that pattern in an image.

5.6.0
For the In-Sight 2000-130 and 2000-130C vision sensors, the Pattern Location tool and Pattern Absence/Presence tool now return the Pattern score, in addition to the pass/fail status. | 5.6.0
The Explorer Host Table Setup dialog now includes the Sensor Type control, which allows you to select the In-Sight model to display in the In-Sight Network pane. | 5.6.0 and 4.10.5

Changes & Fixes

Notes:

  • For changes and fixes in previous releases, see past In-Sight Explorer Release Notes. Release Notes for previous 5.x.x releases are available in the In-Sight Explorer Help file.
  • The release notes include Change Request numbers (CR#) (where applicable) to improve tracking of Known Issues reported from Cognex Technical Support.
CR# | Change/Fix | Affected Firmware Version
N/A | TestRun can now be initiated by an external device, such as a PLC via EtherNet/IP or PROFINET communications. The EtherNet/IP and PROFINET factory communication protocols have also been modified to support the signal-driven TestRun feature on vision systems. | 5.6.0
77914 | The LatchString function no longer experiences a memory leak if the function is conditionally enabled on In-Sight vision systems running firmware version 4.10.x. | 4.10.5
77750 | For the In-Sight 2000 series vision sensors, the Auto-Timeout option is no longer part of the Pattern Location and the Pattern Presence/Absence Inspection tools. | 5.6.0
46620 | The GreysScaleDistance function no longer causes the In-Sight vision system or emulator to become unresponsive when a partially acquired image is loaded. | 5.6.0 and 4.10.5

Known Issues

Note: The release notes include Change Request numbers (CR#) (where applicable) to improve tracking of Known Issues reported from Cognex Technical Support.
CR# | Issue | Affected Firmware Version
79668 | When an In-Sight 2000 series color vision sensor is connected to a Web HMI and acquiring images as fast as possible, the trigger rate may drop significantly. | 5.6.0
79652 | For In-Sight 2000 series vision sensors running firmware version 5.6.0, the Maximum View Connections (In-Sight Explorer, VisionView or Web HMI) is limited to 2. | 5.6.0
79345 | When Web HMI is in use, do not run PROFINET cyclic I/O faster than 8ms. | 5.6.0
79073

For In-Sight 2000 series vision sensors with the HMI Server enabled, stability issues have been observed when the sensor is connected to the HMI through a high-traffic network, resulting in unresponsiveness and disconnection from the network. Under these conditions, try moving the vision sensor and HMI to a more isolated network or connect the vision sensor directly to the HMI.

Workaround: Power-cycle the vision sensor.

 5.6.0
78064

If an In-Sight 8000 series vision system or In-Sight 2000 series vision sensor is running firmware version 5.6.0 and downgraded to 5.5.x firmware or earlier, non-English files may be deleted from the vision system/sensor. Even if the files are manually backed up using the Backup dialog prior to the process, non-English files may not be restored after the downgrade.

Workarounds: To restore non-English files, do one of the following workarounds:

  • Use In-Sight Explorer 5.6.0 to downgrade the firmware. You can select a different firmware version using the drop-down menu in the New Version column in the Select Vision System for Firmware Update dialog (System > Update Firmware).
  • If using In-Sight Explorer 5.5.x or earlier to downgrade the firmware, perform the firmware update process twice. The second firmware update process restores non-English files to the vision system/sensor.
5.5.x and earlier
48636 | If an In-Sight 7600/7800 series vision system is shipped with 5.5.0 or later firmware and then downgraded to 5.4.1 firmware or earlier, it may take approximately four minutes for the vision system to reboot when power-cycled. | 5.4.1 and earlier
48478 | If an In-Sight vision system running firmware 5.6.0 has a job with many instances of the ReadIDMax function, the job may require more memory than is available on the vision system and any instances of the ReadIDMax function that exceed the available memory will return #ERR. For example, if an In-Sight 8405 vision system job contains more than 100 instances of the ReadIDMax function, this problem may be encountered. | 5.6.0
45581 | For In-Sight 7600/7800 series vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch may increase to greater than 10µs offset from master. | 5.6.0
43186 | While configuring a Serial Text, Serial Native, TCP/IP or UDP device in the Communication application step on an In-Sight 2000 series vision sensor, the FormatString dialog will show #ERR in the Output String box. To see the Output String, you must click OK to close the dialog, and then the Output String is displayed correctly in the Format Output String tab. | 5.6.0
42550 | In-Sight Track & Trace job files are not supported on In-Sight models running 5.1.0 and later firmware versions. | 5.6.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.6.0
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.5


In-Sight® Explorer 5.5.0 Release Notes

© Copyright 1999-2017 Cognex Corporation. All rights reserved.

Version: 5.5.0.37, 09/25/2017

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. To access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The minimum hardware requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Celeron® 1000M processor running at 1.8GHz (or equivalent)
  • 2GB of available RAM
  • 4GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The recommended hardware requirements are for PCs that will be used to simultaneously connect to up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 8GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft® Windows® 10 Professional (64-bit)
  • Microsoft® Windows® 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may install and run on other Windows operating systems, PCs that do not meet the preceding requirements are not officially supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

Firmware Version Support

In-Sight 5.5.0 software contains three firmware versions: In-Sight 5.5.0, In-Sight 5.2.2 and In-Sight 4.10.4. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 5.5.0

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7600/7800 series vision systems
  • In-Sight 8000 series vision systems

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 4.10.4

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7600/7800 series vision systems)

Microsoft .NET Framework 4.5

In-Sight software requires Microsoft .NET Framework 4.5. The In-Sight software installer will attempt to download and install Microsoft .NET Framework 4.5 if it is not detected on the PC.

New Features

New Feature | Affected Firmware Version
Supports the following new color vision systems: In-Sight 7600C, 7800C, 7801C, 7802C, 8200C, 8400C, 8401C and 8402C. | 5.5.0
Supports the following new In-Sight 2000 Mini vision sensor models: In-Sight 2000-110 Mini, 2000-120 Mini, 2000-120C Mini, 2000-130 Mini and 2000-130C Mini, featuring liquid lens with auto-focus capability. | 5.5.0
Supports the new In-Sight 2000-23M vision sensor, which provides an expanded set of EasyBuilder Tools, including Location Tools, Presence/Absence Tools, Measurement Tools, Counting Tools, Geometry Tools, Math & Logic Tools, Plot Tools and Calibration Tools. | 5.5.0
Added the BeadFind and BeadInspection functions (Vision Tools > InspectEdge) for glue bead inspection applications. | 5.5.0

For In-Sight 2000 series vision sensors:

  • Added the Show Details toggle button to the EasyBuilder Pixel Count and Color Pixel Count Presence/Absence Inspection tools. This control defines whether the counted pixels are always displayed in the image area in EasyBuilder and to display the counted pixels on VisionView.
  • The EasyBuilder Set Up Image application step is now a tabbed user interface.
  • Added the Focus tab to the EasyBuilder Set Up Image application step. The tab allows you to configure focus settings, such as Autofocus (In-Sight 2000 Mini vision sensors only).

  • Added the Calibration Type drop-down to the Image tab within the EasyBuilder Set Up Image application step, to select the Field of View or Import option to convert or calibrate the Inspection tools from pixels into real world units of measurement.

    Note: Calibration Type and Field of View options are only available on In-Sight 2000-130/130C and 2000-23M vision sensors. The Import option is only available on the In-Sight 2000-23M vision sensor.
  • Added support for the Group Math & Logic Inspection tool, which combines Location and/or Inspection tools into a group, and creates a share enabled status between the tools in the group, tying together their execution (In-Sight 2000-130 and 2000-130C vision sensors only).

  • Added support for multiple, independent Location tool fixtures within a job (In-Sight 2000-130 and 2000-130C vision sensors only).

    Note: The In-Sight 2000-110, 2000-120 and 2000-120C vision sensors still support only one fixture.
  • Added support for the Get Value (GV) basic Native Mode command for Serial Native communication protocol.
 5.5.0

Added the SD card features for In-Sight 7600/7800 series vision systems:

  • Added the WriteLocal and WriteImageLocal functions (Input/Output > LocalStorage), for writing inspection data and images to the SD card while Online.
  • Added the ability to export images to the SD card from the EasyBuilder Communication application step.
  • Added the Use SD Card option to the Backup and Restore dialogs. The SD Card and Backup Set options have also been added to the Restore From dialog.
 5.5.0
In the EasyBuilder view, the Train Input control has been added to the Pattern/Patterns (1-10) Location tool, Pattern Presence/Absence Inspection tool and Patterns Counting tool. This control allows you to train a Model pattern over an Input line. | 5.5.0

Added the ability to display separate pass and fail results within the Sensor filmstrip for vision systems running In-Sight 5.5.0 firmware. The Sensor Filmstrip Settings dialog has been updated to include a Separate Pass and Fail Results option from the Queue drop-down. When selected:

  • Pass Results and Fail Results controls are enabled in the Sensor Filmstrip Settings dialog, and used to specify the number of passing and failing results stored to the vision system.
  • Pass Results and Fail Results buttons are displayed from the filmstrip and used to separately toggle the display of passing and failing results in the filmstrip.
 5.5.0
Added the ability to load jobs by file names using EtherNet/IP and PROFINET communications. Previously, jobs could only be loaded by a PLC using Job ID. | 5.5.0
Added a button to launch the Startup dialog from the Startup Options group box in the EasyBuilder Save Job application step. | 5.5.0 & 4.10.4

Several improvements have been made to the Startup dialog:

  • Added the Load Job on Startup checkbox, which allows you to select a startup job stored on the connected vision system, SD card installed to the connected In-Sight 7600/7800 series vision system or the emulator.

  • Added the Load Remote Job on Startup checkbox, which allows you to select a startup job stored on the job server.

    Note: This checkbox is displayed only when a Job Server is enabled in the Job Server Settings dialog.
  • The Online checkbox has been renamed to Start the Sensor in Online Mode. When this checkbox is checked, the In-Sight vision system will boot into Online mode.
5.5.0 & 4.10.4

Show All and Show New radio buttons have been added to the Add Sensor/Device to Network dialog.

  • When Show New is selected (default), the dialog displays only In-Sight devices with invalid network settings on the subnet. If an In-Sight device is power-cycled while the dialog is open, it is also added to the list.
  • When Show All is selected, the dialog displays all In-Sight devices detected on the subnet.
 5.5.0 & 4.10.4
Added the ability to undo an action when in interactive graphics mode. To undo the last action, either click the Undo button from the Standard toolbar or use the CTRL+Z keyboard shortcut. | 5.5.0 & 4.10.4

Changes & Fixes

Notes:

  • Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases. Release Notes for previous 5.x.x releases are available in the In-Sight Explorer Help file.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix | Affected Firmware Version

47602

47414

In the Spreadsheet view, the TrainMatchColor function and GetSaturation Color Vision Data Access function now properly return the correct HSI Saturation value, ranging from 0 to 255. In the EasyBuilder view, the Color tool now properly returns the correct HSI Saturation value, ranging from 0 to 255. Previously, the returned HSI Saturation value was 0 to 181, even for highly saturated images that exceeded this range.

Note: If a job containing this function or tool was created using In-Sight firmware version 5.4.x or earlier and loaded to a vision system running In-Sight firmware version 5.5.0, you will need to retrain the colors to return the correct HSI Saturation value.
 5.5.0

47535

Several improvements have been made to the ExtractColor function:

  • Speed improvements have been made to the ExtractColor function.
  • The ExtractColor function's Output Image parameter default value is now Binary Image and outputs a binary, greyscale image. Previously the default value was Marked Image and output a marked image, which requires longer processing time.
 5.5.0

46771

Several improvements have been made to the ExtractColorHistogram function. These changes are compatible with previous firmware versions.

  • Speed and processing improvements have been made to the ExtractColorHistogram function.
  • The ExtractColorHistogram function now properly returns the correct HSI values. Previously, the Saturation may have incorrectly returned a value of 255, even if the image’s Saturation value was lower than 255.
  • The ExtractColorHistogram function’s HSI parameter has been renamed to Color Mode.
  • The following changes have been made to the ExtractColorHistogram function’s Color Mode parameter:
    • For optimized HSI performance, a new HSI parameter value (Color Mode = 2) has been added. When this option is selected, the hue, saturation and intensity components of every input pixel are calculated and displayed in the histogram representation.
    • The HSI parameter value has been renamed to RGB+HSI (Color Mode = 1).
    • If RGB (Color Mode = 0) is specified, #ERR is returned for the Hue, Saturation and Intensity Vision Data Access functions. If HSI (Color Mode = 2) is specified, #ERR is returned for the Red, Green and Blue Vision Data Access functions.
Note: If a job containing this function was created using In-Sight firmware version 5.4.x or earlier and loaded to a vision system running In-Sight firmware version 5.5.0, there may be a slight difference in the Region’s X, Y, High and Wide pixel values and the mean RGB results compared to previous firmware versions.
5.5.0
43237 | The supported pulse length for high-speed outputs is now 1ms to 1000ms for In-Sight 7600/7800 series and In-Sight 8000 series vision systems. Previously, the supported pulse length was 10ms to 1000ms. | 5.5.0

32797

32781

32761

32639

Several improvements have been made for PatMax RedLineTM:

  • The FindPatMaxRedLine function has been improved to better detect overlapping results. Due to these changes, jobs that rely on carefully tuned values for the tool’s XY Overlap parameter may need to have this parameter adjusted.
  • The following functions and tools have been improved so there is no time penalty for fixtured search regions, reducing inspection cycle time. In addition, they now provide more accurate scoring for poor matches when Ignore Polarity is enabled or multiple matches are present in the field of view.
    • Spreadsheet FindPatMaxRedLine and TrainPatMaxRedLine functions.
    • EasyBuilder Location Tools: PatMax RedLine Pattern and PatMax RedLine Patterns (1-10).
    • EasyBuilder Inspection Tools: PatMax RedLine Pattern Presence/Absence, PatMax RedLine Patterns Counting and PatMax RedLine Patterns (1-10) Identification.
Note: If a job containing these functions or tools is created using In-Sight firmware 5.5.0 and loaded to a vision system running In-Sight firmware version 5.4.x or earlier, an error message is displayed and any cells that contain these functions will result in #ERR.
 5.5.0
N/A | Improvements have been made to the EditPolygon and EditPolylinePath functions (Graphics Functions > Controls) to provide ease-of-use for editing polylines. | 5.5.0

32542

EasyBuilder sample jobs are now supported on vision systems or vision sensors running firmware version 5.5.0 and later.

  • The default location for EasyBuilder 5.x.x sample jobs is:

    C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Explorer 5.5.0\Sample Jobs\EasyBuilder\5x

  • The default location for EasyBuilder 4.x.x sample jobs is:

    C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Explorer 5.5.0\Sample Jobs\EasyBuilder\4x

 5.5.0
31638 | After using the Add Sensor/Device to Network dialog to modify the Host Name of an In-Sight vision system or sensor configured for PROFINET, when attempting to re-connect to PROFINET, the connection is now properly established. | 5.5.0
27483

While editing the SLMP Scanner protocol in the EasyBuilder view Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file no longer becomes corrupted.

 4.10.4
26990 | When connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is now properly issued. | 4.10.4

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
48636 | If an In-Sight 7600/7800 series vision system is shipped with In-Sight 5.5.0 firmware and then downgraded to In-Sight 5.4.1 firmware or earlier, it may take approximately four minutes for the vision system to reboot when power-cycled. | 5.4.1 and earlier
48478 | If an In-Sight vision system running In-Sight firmware 5.5.0 has a job with many instances of the ReadIDMax function, the job may require more memory than is available on the vision system and any instances of the ReadIDMax function that exceed the available memory will return #ERR. For example, if an In-Sight 8405 vision system job contains more than 100 instances of the ReadIDMax function, this problem may be encountered. | 5.5.0
46914 | If an EasyBuilder job was created using In-Sight 4.7.3 firmware or earlier and loaded to a vision system running In-Sight 5.x.x firmware, symbolic tags within the job may be removed. | 5.1.0 and higher
45581 | For In-Sight 7600/7800 series vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch may increase to greater than 10µs offset from master. | 5.5.0
43186 | While configuring a Serial Text, Serial Native, TCP/IP or UDP device in the Communication application step on an In-Sight 2000 series vision sensor, the FormatString dialog will show #ERR in the Output String box. To see the Output String, you must click OK to close the dialog, and then the Output String is displayed correctly in the Format Output String tab. | 5.5.0
42550 | In-Sight Track & Trace job files are not supported on In-Sight models running 5.1.0 and later firmware versions. | 5.5.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.5.0
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.4
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.5.0


In-Sight® Explorer 5.4.1 Release Notes

© Copyright 1999-2017 Cognex Corporation. All rights reserved.

Version: 5.4.1.11, 05/23/2017

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft® Windows® 10 Professional (64-bit)
  • Microsoft® Windows® 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements have not been tested and are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

Firmware Version Support

In-Sight 5.4.1 software contains three firmware versions: In-Sight 4.10.4, In-Sight 5.2.2 and In-Sight 5.4.1. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 4.10.4

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7600/7800 series vision systems)

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 5.4.1

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7600/7800 series vision systems
  • In-Sight 8000 series vision systems

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight software. The installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

Changes & Fixes

Notes:

  • Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases. The past 5.x.x Release Notes are available in the In-Sight Explorer Help file.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix | Affected Firmware Version
41201

In the EasyBuilder view, up to two communication protocols can now be added to a job in the Communication application step. When adding two protocols, the TCP/IP or UDP protocol can be added in addition to other communication protocols. Previously, only one communication protocol was allowed to be added in the EasyBuilder view.

 5.4.1
46302 | The WriteResultsBuffer function (Input/Output Functions > Network), ReadUserDataBuffer function (Input/Output Functions > Network) and ReadLatchedUserDataBuffer function (Input/Output Functions > Network) have been updated to support the Byte/Word Order parameter for EtherNet/IP, PROFINET and SLMP Scanner protocols. Previously, the Byte/Word Order parameter was only supported for the Modbus TCP Server protocol. | 5.4.1
46381

In the EasyBuilder Communication application step, when configuring Format Input Data or Format Output Data for EtherNet/IP, PROFINET and SLMP Scanner protocols:

  • The Data Type drop-down has been updated to include the Byte-Swapped String option.
  • The High Byte/Low Byte and High Word/Low Word checkboxes are now available.

Previously, these options were only supported for the Modbus TCP Server protocol.

 5.4.1

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
45581 | For In-Sight 7600/7800 series vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch may increase to greater than 10µs offset from master. | 5.4.1
43186 | While configuring a Serial Text, Serial Native, TCP/IP or UDP device in the Communication application step on an In-Sight 2000 series vision sensor, the FormatString dialog will show #ERR in the Output String box. To see the Output String, you must click OK to close the dialog, and then the Output String is displayed correctly in the Format Output String tab. | 5.4.1
42550 | In-Sight Track & Trace job files are not supported on In-Sight models running 5.1.0 and later firmware versions. | 5.4.1
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.4.1
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.4.1
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.4.1
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.4.1
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.4.1
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.4
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.4
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.4


In-Sight® Explorer 5.4.0 Release Notes

© Copyright 1999-2017 Cognex Corporation. All rights reserved.

Version: 5.4.0.21, 05/04/2017

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft® Windows® 10 Professional (64-bit)
  • Microsoft® Windows® 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements have not been tested and are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

Firmware Version Support

In-Sight 5.4.0 software contains three firmware versions: In-Sight 4.10.4, In-Sight 5.2.2 and In-Sight 5.4.0. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 4.10.4

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems (except In-Sight 7600/7800 series vision systems)

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 5.4.0

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 7600/7800 series vision systems
  • In-Sight 8000 series vision systems

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight software. The installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

New Features

New Feature | Affected Firmware Version
This release introduces support for the In-Sight 7600, 7800, 7801 and 7802 vision systems. The In-Sight 7600/7800 series vision systems can be configured for use with C-Mount or S-Mount lenses. The vision system supports a wide-range of accessory configurations, such as standard and extended C-mount lens covers, the S-mount autofocus accessory, the In-Sight illumination accessory and DataMan illumination accessories. The vision system supports the CIO-MICRO and CIO-1400 I/O modules, provides CIP Sync/1588 support and ships with an SD Card pre-installed for storing job files and images. | 5.4.0
In the Spreadsheet view, the Discrete Input Settings and Discrete Output Settings dialogs have been combined into a single, Discrete I/O Settings dialog. | 5.4.0 & 4.10.4
In the Spreadsheet view, a Job Pass/Fail Cell output signal type was for use with the In-Sight 7600/7800 series vision system. When selected, the vision system's Pass/Fail LED and indicator ring illuminate green (pass) or red (fail) based on the current state of the specified Job Pass/Fail cell. | 5.4.0
In the EasyBuilder view, the Inputs and Outputs application steps have been combined into a single Inputs/Outputs application step. | 5.4.0
In the EasyBuilder view, a Job Pass/Fail output signal type was added for use with the In-Sight 7600/7800 series vision system. When selected, the vision system's Pass/Fail LED and indicator ring illuminate green (pass) or red (fail) based on the current state of the overall Job Pass/Fail status. | 5.4.0
Added bi-directional I/O support for vision systems that support signals that can be configured as either an input or an output. | 5.4.0
Added a Tri-color LED option to the Output Details dialog to configure the behavior of In-Sight 7600/7800 series vision system tri-color LED lines. | 5.4.0
The External Light Settings dialog has been renamed to the Light Settings dialog. | 5.4.0 & 4.10.4
In Easybuilder, a Light Settings button was added to the Setup Image application step for the In-Sight 7600/7800 series vision system. When pressed, the Light Settings dialog is launched to configure the attached integrated or external lighting device. | 5.4.0
The Light Settings dialog has been updated to support the In-Sight 7600/7800 series vision system. The appearance of the dialog will vary depending on the vision system (In-Sight 7000 series or In-Sight 7600/7800 series) and the type of lighting accessory that is connected. | 5.4.0
The IntegratedLightControl function (Input/Output) has been added to configure integrated In-Sight and DataMan illumination accessories connected to the In-Sight 7600/7800 series vision system’s faceplate. | 5.4.0
The ExternalLightControl function (Input/Output) has been added to configure external lighting accessories connected to the In-Sight 7600/7800 series vision system’s Light connector. | 5.4.0
The Event function (Input/Output) has been updated to include a Tune Button parameter. When configured, the spreadsheet will update when the Tune button on the In-Sight 7600/7800 vision system is pressed. | 5.4.0
The EditFocusPosition and GetCurrentFocusPosition functions (Focus Functions) have been updated to support the In-Sight 7600/7800 vision system. | 5.4.0
Added a Reset button that is available in Live Video mode when connected to an In-Sight 7000 series or In-Sight 7600/7800 series vision system that has an autofocus accessory installed. When pressed, it resets the default focus position. | 5.4.0 & 4.10.4
Added the SurfaceFX function (Vision Tools > Image), which uses lighting and software algorithms to create high contrast images enhancing three dimensional features on a part. It removes noise/clutter from the surface background and isolates features/defects that are recessed or embossed. Once a contrast image is attained, other vision tools such as OCRMax, Redline, Blob and InspectEdge can perform their inspections. | 5.4.0

Added the Encrypt function (Text > String), which is used to encrypt result data with a user-defined key. The encrypted data can be sent to a PC or a remote device using an In-Sight function or a native mode command, where the data is decrypted with a decryption application.

Note: The Cognex In-Sight Encryption sample applications are available for the key generation and data decryption.
5.4.0

Changes & Fixes

Notes:

  • Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases. The past 5.x.x Release Notes are available in the In-Sight Explorer Help file.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix | Affected Firmware Version
39213

The Mitsubishi PLC/Motion Controller drop-down has been modified and now has a separate option for the iQ-F Series (3E Frame) controller. Previously, you needed to select the iQ-F/R/Q/L Series (3E Frame) option from the drop-down when using the iQ-F Series, although the supported Deice Types on the iQ-F Series were different from other 3E Frame controllers.

The affected drop-downs are:

  • "Controller Type" in the SLMP Scanner Settings dialog
  • "Controller Type" in the Settings tab for the SLMP Device and the SLMP Scanner Device in the Communication application step (EasyBuilder)
  • "PLC Series" in the ReadMC and WriteMC property sheets
 5.4.0
N/A | The GetStringIDMax (Vision Data Access > IDMax) has been modified and now includes new Translation Modes (0 and 3). Mode 0 will not translate any non-printable ASCII characters (returns the raw string). Mode 3 will not translate non-printable ASCII characters (returns the raw string), except the null characters that are replaced with "<NUL>". | 5.4.0 & 4.10.4
31905 | The ability to specify the Link Speed network setting for the In-Sight 2000 series vision sensors and In-Sight 8000 series vision systems has been corrected. Previously, even if a different option was chosen, the vision system always used Auto-Negotiate to determine the fastest Ethernet speed and duplex modes supported by the network device. | 5.4.0
36100 | The min/max range limit handles on the Pixel Count Meter and Pass Range slider bar for the Pixel Count tool have been corrected. Previously, when the tool was using a polygon region, the handles shifted left and right after each inspection. | 5.4.0
37342

The GetAIDescription function ( Vision Data Access > GetAIDescription) and GetFieldIdentifier function (Vision Data Access > GetFieldIdentifier) have been updated to support the following GS1 Application Identifiers:

  • 16: Sell By Date (YYMMDD)
  • 255: Global Coupon Number (GCN)
  • 710: National Healthcare Reimbursement Number - Germany IFA
  • 711: National Healthcare Reimbursement Number - France CIP
  • 712: National Healthcare Reimbursement Number - Spain National Code
  • 713: National Healthcare Reimbursement Number - Brazil ANVISA
  • 80101: Component / Part Identifier (CPID)
  • 80111: Component / Part Identifier Serial Number (CPID SERIAL)
 5.4.0

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
45581 | For In-Sight 7600/7800 series vision systems configured for CIP-Sync/PTP, 1588 synchronization accuracy through a transparent clock-switch may increase to greater than 10µs offset from master. | 5.4.0
44771 | After downgrading firmware on an In-Sight 2000-130/130C vision sensor from version 5.4.0 to 5.3.0, the sensor’s resolution will be set to 800 x 600 (Image Magnification). To change the resolution, open the System menu > Image Settings dialog and change the Acquisition Resolution setting to 640 x 480. | 5.4.0
43186 | While configuring a Serial Text, Serial Native, TCP/IP or UDP device in the Communication application step on an In-Sight 2000 series vision sensor, the FormatString dialog will show #ERR in the Output String box. To see the Output String, you must click OK to close the dialog, and then the Output String is displayed correctly in the Format Output String tab. | 5.4.0
42550 | In-Sight Track & Trace job files are not supported on In-Sight models running 5.1.0 and later firmware versions. | 5.4.0
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.4.0
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.4.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.4.0
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.4.0
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.4.0
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.4.0
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.4.0
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.4.0
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.4.0 & 4.10.4
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.4.0 & 4.10.4
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.4.0 & 4.10.4
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.4
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.4
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.4
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.4


In-Sight® Explorer 5.3.0 Release Notes

© Copyright 1999-2016 Cognex Corporation. All rights reserved.

Version: 5.3.0.57, 10/21/2016

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight software has been tested on the following operating systems:

  • Microsoft® Windows® 10 Professional (64-bit)
  • Microsoft® Windows® 7 Professional, Service Pack 1 (64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements have not been tested and are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

Firmware Version Support

In-Sight 5.3.0 software contains three firmware versions: In-Sight 4.10.3, In-Sight 5.2.2 and In-Sight 5.3.0. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

In-Sight Firmware 4.10.3

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 5.3.0

  • In-Sight 2000 series vision sensors
  • In-Sight 5705 and 5705C vision systems
  • In-Sight 8000 series vision systems

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight software. The installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

New Features

In-Sight Explorer

New Feature
Supports the new In-Sight 2000-120C and 2000-130C color vision sensors.
In-Sight 2000 series vision sensors running In-Sight 5.3.0 firmware now support the In-Sight CIO-1400 I/O module.
In-Sight 5705, 5705C, 5715 and In-Sight 8000 series vision systems running In-Sight 5.3.0 firmware now support the In-Sight CIO-MICRO I/O module.

Added the Modbus TCP Server protocol to the Network Settings dialog as an Industrial Ethernet protocol selection for the In-Sight vision systems running 5.3.0 firmware.

Note: The Modbus TCP Server protocol is also supported on the In-Sight vision systems running In-Sight firmware version 4.10.3 or earlier; however the Modbus TCP Server 5.3.0 implementation is different from the 4.x.x implementation. For more information, refer to the Modbus TCP Communications topic in the In-Sight Explorer Help file.
Added support for the Mitsubishi MELSEC iQ-F and iQ-R series controllers (SLMP Scanner Settings dialog).

The following basic native mode commands are now supported on the In-Sight 2000 series vision sensors:

  • File & Job Commands: Load File (LF), Store File (TF), Read File (RF), Write File (WF), Delete File (DF), Get File (GF), Set Job (SJ), Store Job (TJ), Read Job (RJ), Write Job (WJ), Delete Job (DJ) and Get Job (GJ)
  • Image Commands: Read BMP (RB) and Write BMP (WB)
  • Settings & Cell Value Commands: Get Info (GI), Read Settings (RS), Write Settings (WS), Store Settings (TS), Set IP Address Lock (SL) and Get IP Address Lock (GL)
  • Execution & Online Commands: Set Online (SO), Get Online (GO) and Reset System (RT).

The Sensor filmstrip now displays passing and failing results separately within the filmstrip for In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 7000 series vision systems running 4.10.3 firmware. The Sensor Filmstrip Settings dialog has been updated to include a Separate Pass and Fail Results option from the Queue drop-down. When selected:

  • New Pass Results and Fail Results controls are enabled in the Sensor Filmstrip Settings dialog, and used to specify the number of passing and failing results stored to the vision system.
  • New Pass Results and Fail Results buttons are displayed from the filmstrip and used to separately toggle the display of passing and failing results in the filmstrip.

EasyBuilder

New Feature

The following features have been added to the In-Sight 2000 series color vision sensors:

  • Added the Color Pixel Count Presence/Absence Inspection tool, which is used to detect the presence/absence of specific colors in a region of interest.
  • Added the White Balance Region and Set White Balance buttons to the Set Up Image application step, for removing inaccurate color casts in the image.

The following features have been added to the In-Sight 2000-130 and 2000-130C vision sensors:

  • Added the Field of View (Width) control to the Set Up Image application step, which converts the Distance and Diameter Measurement Inspection tools' results to real-world units.

    Note: The Angle Measurement Inspection tool returns an angle value.
  • The Measurement and Counting Inspection tools now return the results in numeric value, in addition to pass/fail status.

Added the Modbus TCP Server protocol to the Communication application step for the In-Sight vision systems/sensors running 5.3.0 firmware.

Note: The Modbus TCP Server protocol is also supported on the In-Sight vision systems running firmware version 4.10.3 or earlier.
Added support for the Mitsubishi MELSEC iQ-F and iQ-R series controllers (Communication application step).

Added the Shape control (Composite Region, Model and Search tabs) and the Change Region to right-click option (displayed when right-clicking on a composite, model or search region in the image), which allow you to change the shape of selected region (Rectangle, Circle, Annulus or Polygon). This feature is supported on the following tools:

Note: The Shape control is not available on the In-Sight 2000 series vision sensors.
  • Composite Region:
    • Location tools: Blob, Blobs (1-10), Color Blob and Color Blobs (1-10)
    • Presence/Absence tools: Brightness, Contrast, Pixel Count, Color Pixel Count, Blob and Color Blob
    • Measurement tools: Blob Area, Blob Areas (1-10), Color Blob Area and Color Blob Areas (1-10)
    • Counting tools: Blobs and Color Blobs
    • Identification tools: Color and Color Model
    • Defect Detection tool: Surface Flaw
  • Model and Search Region:
    • Location tools: PatMax RedLine Pattern, PatMax Pattern, PatMax RedLine Patterns (1-10) and PatMax Patterns (1-10)
    • Presence/Absence tools: PatMax RedLine Pattern and PatMax Pattern
    • Counting tools: PatMax RedLine Patterns and PatMax Patterns
    • Identification tools: PatMax RedLine Patterns (1-10) and PatMax Patterns (1-10)

The Sensor filmstrip now displays passing and failing results separately within the filmstrip for In-Sight Micro 1000 series, In-Sight 5000 series and In-Sight 7000 series vision systems running 4.10.3 firmware. The Filmstrip application step has been updated to include a Separate Pass and Fail Results option from the Queue drop-down. When selected:

  • New Pass Results and Fail Results controls are enabled in the Filmstrip application step, and used to specify the number of passing and failing results stored to the vision system.
  • New Pass Results and Fail Results buttons are displayed from the filmstrip and used to separately toggle the display of passing and failing results in the filmstrip.

Changes & Fixes

Notes:

  • Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases. The past 5.x.x Release Notes are available in the In-Sight Explorer Help file.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix
40635 | It is now possible to connect to In-Sight 2000 vision sensors with a static IP address on remote subnet. Previously, connecting over a subnet worked only when the sensor was configured for DHCP.
35848 & 36340 | The SLMP Scanner Setting dialog no longer displays the status message “Connection has not been established” or “ERR String index: -1” incorrectly when a connection has been successfully established.
N/A

The following changes have been made to the ReadUserDataBuffer, ReadLatchedUserDataBuffer and WriteResultsBuffer functions for the In-Sight vision systems running 5.3.0 firmware:

  • Now support the Modbus TCP Server protocol via the Protocol parameter.
  • Added the Byte/Word Order parameter. This parameter is available only when the Modbus TCP Server protocol is selected.
43088 | In-Sight 2000 series vision sensors now support the Image Buffers dialog (Sensor menu > Image Buffers), which allows the number of image buffers allocated in vision sensor memory to be changed. In some higher speed applications, increasing the number of image buffers will minimize the possibility of missed acquisition triggers.
N/A | EasyBuilder has been modified to display the Results tab (Palette) by default in all Application Steps.
N/A | EasyBuilder tools that display a Histogram chart while the vision system is Offline will now display the Histogram chart when the vision system is Online.
N/A | The Repeating Trigger option (Image menu) is now available for In-Sight 8000 series vision systems and In-Sight 5705 and 5705C vision systems. Previously, this option was available only for 2000 series vision sensors.
N/A | The TCP/IP and UDP protocols (Communication application step) are now supported on all In-Sight 2000 series vision sensor models. Previously the TCP/IP and UDP protocols were not supported on the In-Sight 2000-110 and 2000-120 vision sensors.
N/A | The ± 10% Pattern Tolerance button (Pattern Location and Pattern Presence/Absence tools) is now available on all In-Sight 2000 series vision sensor models. Previously, this button was not available on the In-Sight 2000-110 vision sensor.
N/A

EasyBuilder has been modified to display the result graphics of the Pixel Count and Color Pixel Count tools for In-Sight 2000 series vision sensors in all Application Steps.

Note: When the vision sensor is online, the result graphics of the selected Pixel Count or Color Pixel Count tool will be displayed. When the vision sensor is offline, the result graphics for all the Pixel Count or Color Pixel Count tool will be displayed.
41507 | The Real-Time Ethernet Trigger option (AcquireImage property sheet and Set Up Image application step) has been renamed to Industrial Ethernet. The Real-Time Ethernet Protocols group box in the Network Settings dialog has also been renamed to Industrial Ethernet Protocols.
N/A | The Q/L Series (3E Frame) Controller Type in the SLMP Scanner Settings dialog has been renamed to iQ-F/R/Q/L Series (3E Frame). The Q/L Series (3E Frame) Controller Type in the Communication Application Step in EasyBuilder has also been renamed to iQ-F/R/Q/L Series (3E Frame).
42667

The following Set Up Image control/selections have been renamed.

  • The Target Brightness control has been renamed to Target Image Brightness.
  • Light Control Mode's Exposure Controlled, Always On and Disabled selections have been renamed to On (Exposure), On (Continuous) and Off, respectively.

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
43098

When loading a job saved using 5.2.3 or earlier firmware on an In-Sight 2000 series vision sensor, the maximum Light Intensity will increase for some ranges of Exposure settings, resulting in a brighter image:

  • 640x480 resolution: Exposures of 3.5ms - 8.2ms
  • 640x480 resolution, Image Magnification Mode: Exposures of 1.8ms - 4.9ms
  • 800x600 resolution, Image Magnification Mode: Exposure of 2.2ms - 5.1ms
 5.3.0
42511

When using Manual Exposure with an In-Sight 2000 series monochrome vision sensor, the image that is acquired for any Exposure value will be slightly brighter than with previous firmware versions. For applications that are highly sensitive to changes in image brightness, you may need to reduce the Exposure value in the Set Up Image step by up to 0.180 ms in order to match the image brightness achieved with a previous firmware version.

Note: If you are using Auto Exposure, this change has no effect because the Exposure setting will be adjusted after every acquisition.
 5.3.0
43186 | While configuring a Serial Text, Serial Native, TCP/IP or UDP device in the Communication application step on an In-Sight 2000 series vision sensor, the FormatString dialog will show #ERR in the Output String box. To see the Output String, you must click OK to close the dialog, and then the Output String is displayed correctly in the Format Output String tab. | 5.3.0
42550 | In-Sight Track & Trace job files are not supported on In-Sight models running 5.1.0 and later firmware versions. | 5.3.0
36100 | When a Pixel Count tool is using a polygon region, the min/max range limit handles on the Pixel Count Meter and Pass Range slider bar will shift left and right after each inspection. The min/max limit values themselves are not changed, and the result of the inspection is not affected. | 5.3.0
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.3.0
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.3.0
31905 | The ability to specify the Link Speed network setting is not available for In-Sight 2000 series vision sensors and In-Sight 8000 series vision systems. Even if a different option is chosen, the vision system always uses Auto-Negotiate to determine the fastest Ethernet speed and duplex modes supported by the network device. | 5.3.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.3.0
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.3.0
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.3.0
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.3.0
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.3.0
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.3.0
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.3.0 & 4.10.3
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.3.0 & 4.10.3
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.3.0 & 4.10.3
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.3
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.3
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.3
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.3


In-Sight® Explorer 5.2.4 Release Notes

© Copyright 1999-2016 Cognex Corporation. All rights reserved.

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight Explorer has been tested on the following operating systems:

  • Microsoft® Windows® 7 Professional, Service Pack 1 (32- and 64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

In-Sight Firmware 4.10.2

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems

In-Sight Firmware 5.2.0 PR1

  • In-Sight 5705 and 5705C vision systems
  • In-Sight 8000 series vision systems

In-Sight Firmware 5.2.2

  • In-Sight Advantage Engine

In-Sight Firmware 5.2.4

  • In-Sight 2000 series vision sensors

Firmware Version Support

In-Sight Explorer 5.2.4 contains four firmware versions: In-Sight 4.10.2, In-Sight 5.2.0 PR1, In-Sight 5.2.2 and In-Sight 5.2.4. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight Explorer software. The In-Sight Explorer installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

New Features

EasyBuilder

New Feature

Added a Job Change (Pulsed) signal type to the Inputs Application step, to load a job file to an In-Sight 2000 series sensor. To use the Job Change (Pulsed) signal type, at least one job must be saved to the sensor and the job must be saved with a numerical prefix of 0 to 31, in the format of #jobfilename.job (e.g., 1PinInspection.job).

The In-Sight 2000 series sensors and In-Sight 8000 series vision systems are supported with VisionView® 1.6.7 software/firmware and support EasyViews, to customize how data is displayed from VisionView.

Changes & Fixes

Notes:

  • Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix
35809 | If an In-Sight 5705, 5705C or 8405 sensor’s job contains an EasyView, the EasyView is now properly displayed from VisionView.

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
36100 | When a Pixel Count tool is using a polygon region, the min/max range limit handles on the Pixel Count Meter and Pass Range slider bar will shift left and right after each inspection. The min/max limit values themselves are not changed, and the result of the inspection is not affected. | 5.2.4
35848 & 36340 | Under some circumstances, the SLMP Scanner Setting dialog may incorrectly display the status message “Connection has not been established” or “ERR String index: -1” even when a connection has been successfully established. | 5.2.4
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.2.4 & 5.2.0 PR1
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.2.4 & 5.2.0 PR1
31905 | The ability to specify the Link Speed network setting is not available for the In-Sight 2000 series vision sensor and the In-Sight 8000 series vision system. Even if another option is chosen, the vision system always uses the Auto-Negotiate option to determine the fastest Ethernet speed and duplex modes supported by the network device. | 5.2.4 & 5.2.0 PR1
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.2.0 PR1
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.2.0 PR1
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.2.0 PR1
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.2.0 PR1
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.2.0 PR1
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.2.0 PR1
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.2.0 PR1 & 4.10.2
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.2.0 PR1 & 4.10.2
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.2.0 PR1 & 4.10.2
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.2
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.2
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.2
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.2


In-Sight® Explorer 5.2.3 Release Notes

© Copyright 1999-2016 Cognex Corporation. All rights reserved.

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight Explorer has been tested on the following operating systems:

  • Microsoft® Windows® 7 Professional, Service Pack 1 (32- and 64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

In-Sight Firmware 4.10.2

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems

In-Sight Firmware 5.2.0

  • In-Sight 5705 and 5705C vision systems
  • In-Sight 8000 series vision systems

In-Sight Firmware 5.2.3

  • In-Sight 2000 series vision sensors

Firmware Version Support

In-Sight Explorer 5.2.3 contains three firmware versions: In-Sight 4.10.2, In-Sight 5.2.0 and In-Sight 5.2.3. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight Explorer software. The In-Sight Explorer installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

New Features

EasyBuilder

New Feature

Added a Job Change (Pulsed) signal type to the Inputs Application step, to load a job file to an In-Sight 2000 series sensor. To use the Job Change (Pulsed) signal type, at least one job must be saved to the sensor and the job must be saved with a numerical prefix of 0 to 31, in the format of #jobfilename.job (e.g., 1PinInspection.job).

The In-Sight 2000 series sensors and In-Sight 8000 series vision systems are supported with VisionView® 1.6.7 software/firmware and support EasyViews, to customize how data is displayed from VisionView.

Changes & Fixes

Notes:

  • Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix
35809 | If an In-Sight 5705, 5705C or 8405 sensor’s job contains an EasyView, the EasyView is now properly displayed from VisionView.

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
36100 | When a Pixel Count tool is using a polygon region, the min/max range limit handles on the Pixel Count Meter and Pass Range slider bar will shift left and right after each inspection. The min/max limit values themselves are not changed, and the result of the inspection is not affected. | 5.2.3
35848 & 36340 | Under some circumstances, the SLMP Scanner Setting dialog may incorrectly display the status message “Connection has not been established” or “ERR String index: -1” even when a connection has been successfully established. | 5.2.3
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.2.3 & 5.2.0
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.2.3 & 5.2.0
31905 | The ability to specify the Link Speed network setting is not available for the In-Sight 2000 series vision sensor and the In-Sight 8000 series vision system. Even if another option is chosen, the vision system always uses the Auto-Negotiate option to determine the fastest Ethernet speed and duplex modes supported by the network device. | 5.2.3 & 5.2.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.2.0
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.2.0
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.2.0
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.2.0
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.2.0
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.2.0
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.2.0 & 4.10.2
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.2.0 & 4.10.2
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.2.0 & 4.10.2
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.2
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.2
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.2
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.2


In-Sight® Explorer 5.2.2 Release Notes

© Copyright 1999-2016 Cognex Corporation. All rights reserved.

Overview

This document describes the In-Sight® Explorer software, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight Explorer has been tested on the following operating systems:

  • Microsoft® Windows® 7 Professional, Service Pack 1 (32- and 64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

In-Sight Firmware 4.10.2

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems

In-Sight Firmware 5.2.0

  • In-Sight 5705 and 5705C vision systems
  • In-Sight 8000 series vision systems

In-Sight Firmware 5.2.1

  • In-Sight 2000 series vision sensors

Firmware Version Support

In-Sight Explorer 5.2.2 contains three firmware versions: In-Sight 4.10.2, In-Sight 5.2.0 and In-Sight 5.2.1. In-Sight vision systems with older firmware versions may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight Explorer software. The In-Sight Explorer installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

Licensing

In-Sight Explorer software is distributed in two different packages: a full version and a trial version. The full version is completely functional and does not expire. The trial version runs for 30 days and then ceases to function. An Offline Programming Key is required for the full version to use In-Sight Explorer in emulator mode if no In-Sight vision systems are present on your network.

New Features

Note: The following features are only available when using In-Sight Explorer 5.2.2 with In-Sight vision sensors running firmware version 4.10.2.

In-Sight Explorer

New Feature
Support for the GetPolygon function has been added. The GetPolygon function returns a data structure that can be used as an input for functions that have an External Region parameter, allowing for image processing to be performed within the boundary of a blob.

Changes & Fixes

Notes:

  • This section describes changes and fixes to In-Sight Explorer 5.2.2 with In-Sight vision sensors running firmware version 4.10.2. Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Change/Fix
32578 | When connected to an In-Sight 5600 series vision system and the AcquireImage function’s Light Control Mode parameter is set to Always Enabled, the LEDs on the attached light ring are now always on. Previously when set to Always Enabled, the LEDs on the attached light ring were only on for the duration of the specified Exposure time.
36198 | If an In-Sight 7000 series vision system is directly connected to a PC via a DHCP network connection, the vision system now remains properly connected to the network. Previously, if the vision system was running firmware version 4.9.3 and connected directly to a PC via a DHCP connection, the vision system could become unresponsive and no longer connected to the network.
37313 | Improved UNIX-style FTP LIST responses to correctly parse directory names and display the correct file names in the Load or Save As dialogs within In-Sight Explorer.

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
36100 | When a Pixel Count tool is using a polygon region, the min/max range limit handles on the Pixel Count Meter and Pass Range slider bar will shift left and right after each inspection. The min/max limit values themselves are not changed, and the result of the inspection is not affected. | 5.2.1
35848 & 36340 | Under some circumstances, the SLMP Scanner Setting dialog may incorrectly display the status message “Connection has not been established” or “ERR String index: -1” even when a connection has been successfully established. | 5.2.1
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.2.1 & 5.2.0
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.2.1 & 5.2.0
31905 | The ability to specify the Link Speed network setting is not available for the In-Sight 2000 series vision sensor and the In-Sight 8000 series vision system. Even if another option is chosen, the vision system always uses the Auto-Negotiate option to determine the fastest Ethernet speed and duplex modes supported by the network device. | 5.2.1 & 5.2.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.2.0
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.2.0
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.2.0
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.2.0
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.2.0
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.2.0
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.2.0 & 4.10.2
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.2.0 & 4.10.2
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.2.0 & 4.10.2
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.2
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.2
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.2
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.2


In-Sight® Explorer 5.2.1 Release Notes

© Copyright 1999-2016 Cognex Corporation. All rights reserved.

Overview

This document describes the In-Sight® Explorer 5.2.1 release, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues
Note: Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.x.x\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight Explorer has been tested on the following operating systems:

  • Microsoft® Windows® 7 Professional, Service Pack 1 (32- and 64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems/Sensors

In-Sight Firmware 5.2.1

  • In-Sight 2000 series vision sensors

In-Sight Firmware 5.2.0

  • In-Sight 5705 and 5705C vision systems
  • In-Sight 8000 series vision systems

In-Sight Firmware 4.10.1

  • In-Sight Micro 1000 series vision systems
  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight 7000 series vision systems

Firmware Version Support

In-Sight Explorer 5.2.1 contains three firmware versions: In-Sight 5.2.1, In-Sight 5.2.0 and In-Sight 4.10.1. In-Sight vision systems running In-Sight firmware 5.2.0 or 4.10.1 do not support any new 5.2.1 features and cannot be updated to In-Sight firmware 5.2.1.

In-Sight vision systems with firmware older than version 4.10.1 and 5.2.1 may work properly; however, some features are unsupported with older firmware versions and are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

Microsoft .NET Framework 4.5

Microsoft .NET Framework 4.5 must be installed prior to installing the In-Sight Explorer software. The In-Sight Explorer installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

Licensing

In-Sight Explorer software is distributed in two different packages: a full version and a trial version. The full version is completely functional and does not expire. The trial version runs for 30 days and then ceases to function. An Offline Programming Key is required for the full version to use In-Sight Explorer in emulator mode if no In-Sight vision systems are present on your network.

New Features

Note: The following features are only available when using In-Sight Explorer 5.2.1 with In-Sight vision sensors running firmware version 5.2.1.

In-Sight Explorer

New Feature
This release introduces support for the new In-Sight 2000 series vision sensors, including the 2000-110, 2000-120 and 2000-130 models.
Added the Repeating Trigger option to the Image menu, which allows you to acquire images continuously to help you verify that your application is working as expected against live images.

EasyBuilder View

New Feature

The following application steps display a simplified user interface when connected to the In-Sight 2000 series vision sensor.

  • Set Up Image
  • Locate Part (Pattern Tool)
  • Inspect Part (Brightness, Contrast, Pattern and Pixel Count Presence/Absence tools and Logic Math & Logic tool)

Changes & Fixes

Notes:

  • This section describes changes and fixes to In-Sight Explorer 5.2.1 with In-Sight vision sensors running firmware version 5.2.1. Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
Change/Fix

Several changes were made to the Live Video feature:

  • Added the Live Video option to the Image menu and the Job Display toolbar in the EasyBuilder view, which allows you to enable Live Video mode in all EasyBuilder application steps. Previously, the Live Video option was only available in the Set Up Image application step.
  • The image acquisition settings in the Set Up Image application step can now be modified when in Live Video mode. Previously, all the image acquisition settings were disabled when in Live Video mode.
  • The Live Video icon (Image menu and Job Display toolbar) has been changed.
Added the Startup option to the Sensor menu in the EasyBuilder view, which allows you to configure the Startup settings in all EasyBuilder application steps except the Locate Part and Inspect Part application steps. Previously, the Startup option was only available in the Save Job application step.
A point graphic is no longer displayed in the image area when the EasyBuilder Logic or Math inspection tool is added. Previously, a point graphic was displayed in addition to the tool name (for example, Logic_1), and to move the tool name in the image area, the point graphic was needed to be dragged.
The Filter search box in the Locate Part and Inspect Part application steps has been renamed to the Tool search box.

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
37985 | When a Pixel Count tool is using a polygon region, the min/max range limit handles on the Pixel Count Meter and Pass Range slider bar will shift left and right after each inspection. The min/max limit values themselves are not changed, and the result of the inspection is not affected. | 5.2.1
35848 & 36340 | Under some circumstances, the SLMP Scanner Setting dialog may incorrectly display the status message “Connection has not been established” or “ERR String index: -1” even when a connection has been successfully established. | 5.2.1
32542 | EasyBuilder sample jobs are not supported on vision systems or vision sensors running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.2.1 & 5.2.0
31638

After renaming the Host Name of an In-Sight vision system or vision sensor configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system or vision sensor to PROFINET, the connection is not established.

Workaround: Restart the vision system or vision sensor after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the Host Name of the vision system or vision sensor, which prompts the user to restart the vision system or vision sensor to make configuration changes to take effect.

 5.2.1 & 5.2.0
31905 | The ability to specify the Link Speed network setting is not available for the In-Sight 2000 series vision sensor and the In-Sight 8000 series vision system. Even if another option is chosen, the vision system always uses the Auto-Negotiate option to determine the fastest Ethernet speed and duplex modes supported by the network device. | 5.2.1 & 5.2.0
35828 | If the vision system is triggered via an industrial Ethernet communication protocol, the JobPass signal is only sent if the job contains a WriteResultsBuffer function. This is not an issue for EasyBuilder applications. | 5.2.0
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.2.0
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.2.0
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.2.0
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.2.0
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.2.0
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.2.0 & 4.10.1
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.2.0 & 4.10.1
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.2.0 & 4.10.1
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.1
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.1
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.1
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.1


In-Sight® Explorer 5.1.1 Release Notes

© Copyright 1999-2015 Cognex Corporation. All rights reserved.

Overview

This document describes Release 5.1.1 of In-Sight® Explorer, including the following topics:

  • System Requirements
  • New Features
  • Changes & Fixes
  • Known Issues

Visit the In-Sight Online Support Center to download the latest release notes and documentation, including localized versions. In order to access the updated documentation from the In-Sight Explorer user interface and Windows Start menu, you will need to first log on to the PC with administrative privileges. Next, you will need to copy the downloaded documentation to the appropriate location within the installation directory; the default location is: C:\Program Files (x86)\Cognex\In-Sight\In-Sight Explorer 5.1.1\Documentation.

System Requirements

This section describes system requirements for the In-Sight Explorer 5.1.1 software.

PC Hardware Requirements

Minimum

Note: The Minimum Hardware Requirements are for PCs that will be connecting to a single low resolution In-Sight vision system running at a slow production speed.
  • Intel® Pentium® 4 processor running at 2GHz (or equivalent)
  • 1GB of available RAM
  • 2GB of available hard-disk space
  • Video card capable of displaying 1024 x 768 resolution at 24-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Network Interface Card (at least 100Mbps) for connecting to an In-Sight vision system

Recommended

Note: The Recommended Hardware Requirements are for PCs that will be connecting up to four In-Sight vision systems.
  • Intel Core™ i7 processor running at 2.7GHz (or equivalent)
  • 4GB of available RAM
  • 2.5GB of available hard-disk space
  • Video card capable of displaying 1920 x 1080 resolution at 32-bit color depth (the DPI Display setting must be set to 96 DPI)
  • Gigabit Network Interface Card for connecting to In-Sight vision systems

Operating System Requirements

In-Sight Explorer has been tested on the following operating systems:

  • Microsoft® Windows® 7 Professional, Service Pack 1 (32- and 64-bit)
  • Microsoft Windows Server 2008 R2, Service Pack 1 (64-bit)

Although In-Sight Explorer may function on other operating systems, systems not meeting the preceding requirements are not supported.

Supported Languages

  • English
  • Japanese
  • French
  • German
  • Spanish (European)
  • Korean
  • Chinese (Simplified)

Supported In-Sight Vision Systems

In-Sight firmware 5.1.1

  • In-Sight 8405 vision system

In-Sight firmware 5.1.0

  • In-Sight 5705 and 5705C vision systems

In-Sight firmware 4.10.0

  • In-Sight 5000 series vision systems (except In-Sight 5705 and 5705C vision systems)
  • In-Sight Micro 1000 series vision systems
  • In-Sight 7000 series vision systems

Notes:

  • In-Sight vision systems running In-Sight firmware 4.10.0 do not support any new 5.1.1 features and cannot be updated to In-Sight 5.1.0 or later.
  • In-Sight Explorer 5.1.1 does not support vision systems running In-Sight firmware 4.10.0 with less than 64MB non-volatile flash memory.

Old Firmware Version Support

In-Sight Explorer 5.1.1 contains three firmware versions: In-Sight 5.1.1, In-Sight 5.1.0 and In-Sight 4.10.0. In-Sight vision systems with In-Sight 4.9.3 or older firmware may work properly with In-Sight Explorer 5.1.1; however, firmware versions prior to 4.10.0 are not fully tested. For optimal performance, vision systems running older firmware should be updated to the most recent, supported firmware versions.

Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In-Sight® Explorer Help file.

Microsoft .NET Framework 4.5

In-Sight Explorer 5.1.1 requires the Microsoft .NET Framework 4.5. The In-Sight Explorer installer will attempt to download/install .NET 4.5 prior to installation if it is not detected on the system.

Licensing

In-Sight Explorer 5.1.1 is distributed in two different packages: a full version and a trial version. The full version is completely functional and does not expire. The trial version runs for 30 days and then ceases to function. An Offline Programming Key is required for the full version to use In-Sight Explorer in emulator mode if no In-Sight vision systems are present on your network.

New Features

In-Sight Explorer Enhancements

  • For In-Sight vision systems running In-Sight firmware version 4.10.0, TestRun can now be initiated by an external device, such as a PLC via EtherNet/IP or PROFINET communications. The EtherNet/IP and PROFINET factory communication protocols have also been modified to support the signal-driven TestRun feature on vision systems running In-Sight firmware version 4.10.0.

Changes & Fixes

Notes:

  • This section describes changes and fixes to In-Sight Explorer 5.1.1.
  • Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.

  • In-Sight Explorer now contains three firmware versions: the firmware version 5.1.1, 5.1.0 and the last supported 4.x.x firmware 4.10.0. When updating firmware, the firmware version to be installed is determined by the vision system's Model type and the vision system can only be updated to the last supported version for that Model type. For example, In-Sight Micro 1000 series vision systems can only be updated to firmware version 4.10.0, and cannot be updated to 5.1.0 and later.

    Note: For a complete list of models and supported firmware versions, refer to the Firmware Versions topic in the In‑Sight® Explorer Help file.
  • The SetSymbolMinStringLength function has been modified to support reading shorter Pharmacode symbologies. Previously, only Pharmacode symbologies with 3 or more characters could be read correctly.

Please see past In-Sight Explorer Release Notes for changes and fixes in previous releases.

Known Issues

Note: Change Request numbers (CR#) have been included (where applicable) to improve tracking of Known Issues reported via Cognex Technical Support.
CR# | Issue | Affected Firmware Version
31717 | The In-Sight 8405 vision system only supports the Normal Orientation setting when acquiring images, and the Orientation parameter in the AcquireImage Property Sheet is disabled. | 5.1.1
35259

The In-Sight 8405 is reporting an incorrect maximum segment size during TCP connection establishment. As a result, In-Sight Explorer may not be able to connect to the 8405 (or may lose the connection) if the network adapter of the PC is configured to support jumbo Ethernet frame sizes.

Workaround: To prevent loss of connection, configure the PC’s network adapter to use the default Ethernet MTU (Maximum Transmission Unit) of 1500 bytes.

 5.1.1
31638

After renaming the Host Name of an In-Sight vision system configured for PROFINET using the Add Sensor/Device to Network dialog, when attempting to re-connect the vision system to PROFINET, the connection is not established.

Workaround: Restart the vision system after renaming the Host Name. Alternatively, use the Network Settings dialog to rename the vision system's Host Name, which prompts the user to restart the vision system to make configuration changes to take effect.

 5.1.1 & 5.1.0
32781 | The FindPatMaxRedLine function’s XY Overlap setting may be ignored. For example, when searching for two targets which overlap by a very small amount, only one match may be found, regardless of the XY Overlap setting. | 5.1.1 & 5.1.0
32751

The FindPatMaxRedLine function's Ignore Polarity setting can produce unexpected results when the search image has the inverse polarity from the training image. For example, false matches may be found on a blank background having the inverse polarity from the training image.

Workaround: If Ignore Polarity is necessary in the application, it is recommended to set the Fine Granularity setting to 1 or widen the Angle/Scale Find Tolerances.

5.1.1 & 5.1.0
32642

For EtherNet/IP communications, when using Rockwell RSLogix Studio 5000, version 21 through 24, the In-Sight EDS generated profile’s default Input and Output Assembly sizes (496 bytes for each) cannot be edited.

Workaround: If it is necessary to edit the default size, use and configure a generic Ethernet module. Once the updated In-Sight Add-On Profile (AOP) has been published to the Cognex Support Website, download the latest version, and use it instead of the EDS file or generic Ethernet module.

5.1.1 & 5.1.0
31706

In the TCPDevice, UDPDevice, WriteFTP, WriteImageFTP, ImportData, ExportData and List Property Sheet, the Host Name drop-down menu does not list Host Names of In-Sight vision systems and/or emulators on the network.

Workaround: Manually enter the host name or the IP address of the target vision system/emulator in the Host Name field.

 5.1.1 & 5.1.0
30814

In-Sight Explorer may recognize a valid symbolic tag name as invalid when the symbolic tag name is in the form of a cell name with the value greater than 32766. For example, when the Extended Native Mode command EV SetCellName(B3,"A32767") is issued, the command will be executed successfully and the symbolic tag name "A32767" will be inserted in cell B3. However, when the Symbolic Tag Editor dialog is opened from In-Sight Explorer, a symbolic tag name error is displayed in cell B3.

Workaround: Do not use a cell name or the form of a cell name for a symbolic tag name.

 5.1.1 & 5.1.0
32542 | EasyBuilder sample jobs are not supported on vision systems running firmware version 5.1.0 and later, however jobs with compatible tools may still load properly. | 5.1.1 & 5.1.0
32821

When attempting to load a job containing the PointFilter and/or NeighborFilter functions that are no longer supported on In-Sight 5.1.x firmware, and the function is password-protected using the Format Cells dialog’s Protection tab, the job load will fail.

Workaround: Load the job to an In-Sight vision system running In-Sight firmware 4.x.x and modify the job. For more information on accessing or removing password-protected cells, refer to the Licensing topic in the In-Sight® Explorer Help file.

5.1.1 & 5.1.0
32253

When connected to a color In-Sight vision system, and the Record/Playback Options dialog is configured to record color images as 16-bit JPEG image files, the images will be recorded at 24-bit depth.

Workaround: If 16-bit depth is necessary, record the images as Bitmap files (*.bmp).

 5.1.1, 5.1.0 & 4.10.0
28320

If a SurfaceFlaw function is configured with an angled or curved region, and the Straighten Images parameter is enabled and the Show parameter is set to the "input and results graphics" option, the only output that will be displayed will be the red overlay graphics.

Workaround: In this type of application scenario, set the Show parameter to the "results graphics" option to view the straightened image and graphics.

 5.1.1, 5.1.0 & 4.10.0
28114

If the In-Sight Explorer application is left running for several days with multiple Spreadsheet View connections open, the Spreadsheet View toolbars may be drawn in the wrong location, regardless of user interaction (i.e. turning the toolbars on or off, or attempting to move them to the correct location). The toolbars and menus still function, but they cannot be repositioned.

Workaround: To re-enable the repositioning of the toolbars, close and restart the In-Sight Explorer application (it may be necessary to use the Windows Task Manager to force the application to exit).

 5.1.1, 5.1.0 & 4.10.0
27205

In high-precision applications, differences of less than a pixel may be reported if a FindPatMaxPatterns function is constructed to find the patterns returned by a TrainPatMaxPattern function, and the two functions use different external regions for their search and training, respectively. However, if either of the two functions reference an external region that is angled and/or curved, the pixel differences may be much larger.

Workaround: When constructing the job, ensure that the FindPatMaxPatterns and TrainPatMaxPattern function reference the same external region for both searching and training, or use the internal regions of both functions for the searching and training.

 5.1.1, 5.1.0 & 4.10.0
32479

Updating the firmware of an In-Sight vision system while connected to a POWERLINK network will result in a code 13710, with the vision system needing to be power cycled and the files restored (the firmware will be successfully updated, however).

Workaround: Before updating the vision system's firmware, follow these steps:

  1. Remove the vision system from the POWERLINK network, and connect the vision system to a network port on the same subnet as the computer running In-Sight Explorer.
  2. Power cycle the vision system.
  3. Update the firmware while the vision system in Ethernet mode.
  4. Place the vision system back onto the POWERLINK network.
  5. Power cycle the vision system.
 4.10.0
27377

If a PLC project created in the English version of GXWorks2 is downloaded to the PLC, and then uploaded to a Japanese version of GXWorks2, In-Sight 5000 and In-Sight 7000 series vision systems will be missing their icons and descriptive information. This issue also occurs if the process is reversed, i.e. the PLC project is created in the Japanese version of GXWorks2 and then uploaded to an English version of GXWorks2.

Workaround: Keep PLC projects within the same language of GXWorks2.

 4.10.0
27483

While editing the SLMP Scanner protocol in the EasyBuilder View Communications Application Step, if changes are made in the Format Output Data and/or Format Input Data tabs, and the user leaves the Communications Application Step and then selects Undo Communications Changes from the Edit menu, the slmpoutaddressmap file will be corrupted.

Workaround: Do not use the Undo Communications Changes option from the Edit menu; manually edit the necessary changes instead.

 4.10.0

21041

If an In-Sight vision system is on a POWERLINK network and connected to In-Sight Explorer, attempting to download a change to the PLC, or performing a software reboot of the PLC, may cause the vision system to no longer be able to connect to In-Sight Explorer.

Workaround: Disconnect the vision system from In-Sight Explorer before performing any changes or rebooting the PLC. Power cycle the vision system if this situation has been encountered to restore the connection to In-Sight Explorer.

 4.10.0
26990

While connected to a Mitsubishi iQ Sensor Solution and an In-Sight vision system, if an attempt is made to change parameter settings (such as Set Parameter or Set IP) while the vision system is Online, a failure code (C05C) is not properly issued.

Workaround: Do not attempt to change parameter settings of the vision system while it is Online. If attempting to change settings while Online, a C05C code, which indicates that write processing has been aborted, should be issued.

 4.10.0
21234

The following list describes known limitations of the operation of In-Sight vision systems on POWERLINK networks. The following known limitations apply:

  • If the MTU value for Asynchronous Packet transfers is not set to the same MTU value being used by the POWERLINK network, TCP/IP communications will not function correctly.
  • If a POWERLINK enabled vision system is taken off the POWERLINK network and placed on a standard Ethernet network, Ethernet communications may lock up and bandwidth may be limited to 1Mbps. To edit a job, disable POWERLINK communications while on the standard Ethernet network.
 4.10.0


Glossary

The following table defines terminology used throughout this help document:

Term | Definition

Active Cell

 The cell that is currently highlighted in the spreadsheet. For more information, see Spreadsheet View or Active Cell.

Active In-Sight vision system

 The In-Sight vision system whose job you are currently editing. This vision system can be said to have "focus" in the spreadsheet, usually indicated by the active cell.

Active Job

 The job file currently loaded into memory on an In-Sight vision system.

Blobs

 A group of dark or light-colored connected pixels, such as a splotch of white paint on a black background, or a black screw on a white conveyor belt. Also one of the fastest features to find, and allows for variations of the blob feature's shape and size, but has limited angular orientation value.

Cell Data File
  • Cell Data files (*.CXD) store spreadsheet cell data. The spreadsheet cell, or group of cells, is exported to a .CXD file which can be stored on one of the following: a central server via FTP, a local or remote In-Sight vision system or emulator, the RAMDisk folder of a local or remote In-Sight vision system or emulator or the Snippets folder on the local PC. The cell data can then be imported from any of the above locations to the spreadsheet. For more information, see RAM Disk Settings Dialog or Palette: Spreadsheet View.
  • There are several methods for exporting and importing .CXD files. The .CXD file can be exported using the Export Cells dialog, the ExportData function or the Snippet dialog. The .CXD file can then be imported using the Import Cells dialog, the ImportData function, the Snippet dialog or dragging-and-dropping snippets from the Palette. For more information, see Import/Export Cells Dialog, ExportData, Snippet Dialog, or ImportData.

Character Instance (OCV/OCR)

 A greyscale pattern used as an input to create an OCV/OCR model.

Character Model (OCV/OCR)

 A composite character of a font, formed by taking into account all trained instances of that character.

Codes

 1D barcodes and 2D data-matrix codes and symbols containing alphanumeric data strings.

Col

(Column)

Defines the X direction of the In-Sight vision system pixel coordinate system.

EasyBuilder Tag

 Provides information for the EasyBuilder View. For more information, see EasyBuilder Tags and Tag Labels.

EasyView Tag

 A symbolic tag that is used to denote a cell that contains data to be used to create an EasyView, which is displayed from VisionView.

Edges

 Areas of transition between light and dark pixels; in the horizontal or vertical directions, or circular or arced. Edges can be things like the ends of parts, pins on a circuit board, threads on a screw, the bottoms of bottles or the coils of a spring. These types of features are generally the fastest and easiest to detect.

Explorer Host Table

The Explorer Host Table allows In-Sight Explorer to communicate with In-Sight vision systems on different subnets. For more information, see Explorer Host Table Setup Dialog. Vision systems defined in this Host Table will appear within the In-Sight Network, as well as any dialogs (such as Save & Open, Snippet, Import/Export Cells, Backup, Restore, Clone, Update Firmware) that perform file operations on one or more In-Sight vision systems. For more information, see Save & Open Dialogs, Backup Dialog, Restore Dialog, or Clone Dialog.

Note: If any vision systems in the In-Sight Host Table are configured to use DHCP, then the Host Table entries may become invalid if the vision system's IP address changes. Cognex strongly recommends configuring static IP addresses for all vision systems defined in the Host Table.

Feature

(Feature of Interest)

 In machine vision, features are referred to as the "objects of interest in the image," and vision inspections are designed around the types of features found in the image.

Firmware

 Firmware is software code that runs within a physical In-Sight vision system. Vision systems can be updated to the latest firmware version by loading the appropriate firmware update file (*.UPD) from an In-Sight emulator. For more information, see Update Firmware Dialog.

Fixture

A fixture is an output of a Vision Tool that acts as a reference point for other Vision Tools, providing Row, Column and Angle coordinate values. When choosing a fixture, look at the part in the image and determine which type of feature is the most quickly and easily recognizable, and will be in every image of the part. Then, based on the type of feature, select an appropriate Vision Tool to define the feature. When a feature is used as a fixture during an inspection, the In-Sight vision system will first search for that feature; once the feature has been located, the feature's position serves as a reference point for the other Vision Tools to perform their inspections, based on the position of the fixtured featured.

Note:
  • A fixture is unnecessary if your part will be presented to the vision system in the same exact location, in every image.
  • More than one fixture can be created and used in a job, and fixtures can be linked to each other.

HOSTS.NET

 A virtual file that contains In-Sight Host Table entries for a vision system. HOSTS.NET is a system file and cannot be deleted. For more information, see Host Table Dialog.

Image

(Image File)

 Images acquired by In-Sight vision systems can be saved on your PC as .BMP or .JPG files. These files may then be loaded by any In-Sight vision system or emulator for use in job testing. In-Sight vision systems can store only one image (image.bmp); if you want to save a permanent copy of an image, you must save the image to a PC's hard disk. An image file may be opened using drag-and-drop from the In-Sight Network or from Microsoft Windows Explorer. For more information, see In-Sight Network.

IMAGE.BMP

 A virtual file that contains the active image data being displayed on an In-Sight vision system. Identical to IMAGE.JPG. Note that IMAGE.BMP is a system file and cannot be deleted.

IMAGE.JPG

 A virtual file that contains the active image data being displayed on an In-Sight vision system. Identical to IMAGE.BMP. Note that IMAGE.JPG is a system file and cannot be deleted.

In-Sight Emulator

(Emulator)

(In-Sight Offline Emulator)

 The In-Sight emulator is offline programming software that can mimic various types of In-Sight vision systems, depending on which Emulation Mode is selected in the Emulation Panel. Emulators can be accessed just like In-Sight vision systems from the In-Sight Network. For more information, see Emulation Panel.

In-Sight Host Table

The In-Sight Host Table defines static IP addresses for remote hosts. This is required when In-Sight vision systems need to communicate with one another across different subnets. In-Sight vision systems use their host tables for communication in functions such as TCPDevice, WriteImageFTP, and WriteSMTP. For more information, see Internet Protocol (IP) Address, TCPDevice, WriteImageFTP, or WriteSMTP.

Note: If any vision systems in the In-Sight Host Table are configured to use DHCP, then the Host Table entries may become invalid if the vision system's IP address changes. Cognex strongly recommends configuring static IP addresses for all vision systems defined in the Host Table.

In-Sight Vision System

(In-Sight Sensor)

(In-Sight Vision Sensor)

 An In-Sight vision system consists of a digital greyscale or color camera to acquire images and a CCD chip to digitize them; a PC processor to run the programmed image analysis; and Input/Output hardware and communication links to report results and send/receive messages from other devices, such as robots or PLCs. For a complete list of Cognex vision system products, see: cognex.com/products.

Job

(Job File)

 A job file (*.JOB) is configured to perform a specific set of machine vision tasks. On In-Sight vision systems, job file storage is limited to the amount of available flash memory. File storage on an In-Sight emulator (running on a PC) is based upon the size of the hard disk in the PC. Job files can be loaded onto In-Sight vision systems from an In-Sight FTP server as well as from non In-Sight FTP servers. The name of the active job file is displayed in the title bar if it has been saved at least once. A job file can also be opened using drag-and-drop from the In-Sight Files pane or from Microsoft Windows Explorer. For more information, see Status Bar or In-Sight Files.

OCR

 Optical Character Recognition; the process of reading unknown characters and pattern-matching the results against character models to "read" characters and pass them along as a string. For more information, see OCV/OCR Overview.

OCV

 Optical Character Verification; the process of reading known characters and pattern-matching the results against character models to "verify" that an expected string was present.

Offline Programming Key

If In-Sight Explorer does not detect any In-Sight vision systems on your network, then you will be required to enter an Offline Programming Key into the Options dialog in order to configure In-Sight jobs locally in the In-Sight offline emulator environment. For more information, see Emulation Panel.

Note:
  • If you have purchased Offline programming licenses for any version of PC Host, then these licenses will work as valid Offline Programming Keys for In-Sight Explorer.
  • If an Offline Programming Key has not been entered, you may see Error 6001 or Error 6047 when launching In-Sight Explorer. For more information, see Error Messages.

OPC Tag

 A symbolic tag that is used to denote a cell that contains data that should be communicated over the OPC channel.

Patterns

 A pattern can be anything from a simple group of repeating shapes to complex configurations, like logos or labels. The most reliable type of feature, patterns allow for the greatest range of positional rotation, movement and scale variations, but generally they also require the most amount of time to inspect.

PC Host

 The In-Sight PC Host is legacy programming software for In-Sight vision systems. In-Sight Explorer incorporates PC Host's capabilities as the emulator, which allows for offline programming and testing of In-Sight jobs.

PROC.SET

Vision system settings are stored in the proc.set file. This file contains configuration details for serial ports, discrete input/output, the user list, startup parameters (user & job), and date/time settings.

Note: proc.set is a system file and cannot be deleted.

ROI

 Region of Interest; defines the area of the image that will be inspected.

Row

Defines the Y direction of the In-Sight vision system pixel coordinate system.

Closed Example

Symbolic Tag

 Used to denote a cell that contains data to be used by the EasyBuilder View and communicated to other devices, such as Location or Inspection Tool results, job data and parameter controls (for example, “Blobs_1.Pass_Count”). Also used to denote cells containing data that can either be transmitted over the OPC channel to the In-Sight OPC Server, to generate audit messages to an audit message server, or used to create an EasyView, which allows you to customize how data is displayed on a Cognex VisionView device and determine if the data is editable by the operator. For more information, see Audit Message Settings Dialog or EasyView Settings Dialog.

Text

 Alphanumeric (ABC, 123, etc.) text strings.
VisionView Application | The Cognex VisionView® application software can be deployed on the VisionView Operator Interface Panel, the VisionView VGA, a PC or a Windows CE-based HMI panel. The VisionView application software can be used to connect to multiple vision systems and display the vision systems' acquired image and critical pass/fail data to the operator on the factory floor.


Technical Support

Help Documentation

In addition to this help file, you may also refer to the following product documentation resources to learn more about the In-Sight vision system and its interface:

  • In-Sight Micro Series Vision System Installation Manual
  • In-Sight 2000 Series Vision Sensor Reference Guide
  • In-Sight 5000 Series Vision System Reference Guide
  • In-Sight 7000 Series Vision System Installation Manual
  • In-Sight 7000 Gen2 Series Vision System Reference Guide
  • In-Sight 8000 Series Vision System Reference Guide
  • In-Sight 9000 Series Vision System Reference Guide
  • In-Sight CIO-MICRO and CIO-MICRO-CC I/O Modules Installation Manual
  • Model 1460 I/O Expansion Module Installation and Reference
  • Model 1450 I/O Expansion Module Installation and Reference
  • Model 1400 I/O Expansion Module Installation and Reference

Online Resources

  • In-Sight Support, located at cognex.com/support/insight, is a valuable medium for answering your In-Sight questions. The Support Center includes the following resources:
    • Downloads of In-Sight software and firmware
    • In-Sight documentation and mechanical drawings
    • Training Materials
    • Cognex Knowledge Base: help.cognex.com
    • E-mail Support Lists
    • Online catalog of parts and accessories
    • Case submissions
  • On-demand training, located at: cognex.com/on-demand-training.aspx.
    • Recorded Training Courses
    • Technical Webinars
    • Interactive Tutorials and Training Material
    • Online Training Courses

Telephone Support

If you are unable to find the answer to your In-Sight question in the standard product documentation or online, phone support is available at the following locations:

  • United States: +1-508-650-4100
  • Japan: +81-3-5977-5214
  • France: +33 (0)1 4777 1550
  • United Kingdom: +44 (0)1908 206000
  • Germany: +49 (0) 7 21 / 66 39 - 0
  • Italy: +39 (0)267471200

Repair and Returns

Email: product_services@cognex.com


Software Registration

If In-Sight Explorer does not detect any In-Sight vision systems on your network, then you will be required to enter an Offline Programming Key into the Options dialog in order to configure In-Sight jobs locally in the In-Sight offline emulator environment. For more information, see Emulation Panel.

Note:
  • If you have purchased Offline programming licenses for any version of PC Host, then these licenses will work as valid Offline Programming Keys for In-Sight Explorer.
  • If an Offline Programming Key has not been entered, you may see Error 6001 or Error 6047 when launching In-Sight Explorer. For more information, see Error Messages.


Legal Notices

The software described in this document is furnished under license, and may be used or copied only in accordance with the terms of such license and with the inclusion of the copyright notice shown on this page. Neither the software, this document, nor any copies thereof may be provided to, or otherwise made available to, anyone other than the licensee. Title to, and ownership of, this software remains with Cognex Corporation or its licensor. Cognex Corporation assumes no responsibility for the use or reliability of its software on equipment that is not supplied by Cognex Corporation. Cognex Corporation makes no warranties, either express or implied, regarding the described software, its merchantability, non-infringement or its fitness for any particular purpose.

The information in this document is subject to change without notice and should not be construed as a commitment by Cognex Corporation. Cognex Corporation is not responsible for any errors that may be present in either this document or the associated software.

Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, nor transferred to any other media or language without the written permission of Cognex Corporation.

2019 August 02 5:00 PM

Revision: 5.7.3.6

Copyright © 1999 - 2019. Cognex Corporation. All Rights Reserved.

Portions of the hardware and software provided by Cognex may be covered by one or more U.S. and foreign patents, as well as pending U.S. and foreign patents listed on the Cognex web site at: cognex.com/patents.

The following are registered trademarks of Cognex Corporation:

Cognex, 2DMAX, Advantage, AlignPlus, Assemblyplus, Check it with Checker, Checker, Cognex Vision for Industry, Cognex VSOC, CVL, DataMan, DisplayInspect, DVT, EasyBuilder, Hotbars, IDMax, In‑Sight, Laser Killer, MVS‑8000, OmniView, PatFind, PatFlex, PatInspect, PatMax, PatQuick, SensorView, SmartView, SmartAdvisor, SmartLearn, UltraLight, Vision Solutions, VisionPro, VisionView

The following are trademarks of Cognex Corporation:

The Cognex logo, 1DMax, 3D‑Locate, 3DMax, BGAII, CheckPoint, Cognex VSoC, CVC‑1000, FFD, iLearn, In‑Sight (design insignia with cross‑hairs), In‑Sight 2000, InspectEdge, Inspection Designer, MVS, NotchMax, OCRMax, PatMax RedLine, ProofRead, SmartSync, ProfilePlus, SmartDisplay, SmartSystem, SMD4, VisiFlex, Xpand

Portions copyright © Microsoft Corporation. All rights reserved.

Portions copyright © MadCap Software, Inc. All rights reserved.

Other product and company trademarks identified herein are the trademarks of their respective owners.


Cognex Connect

Integrating In-Sight vision systems into your existing automation control system is easy with Cognex Connect™, the most comprehensive suite of communications capabilities available in a vision system. Whether you are connecting In-Sight directly to a PLC or robot controller or managing multiple In-Sight vision systems remotely from a networked PC or HMI, Cognex Connect assures a seamless reliable communications link between In-Sight and all of your equipment on the factory floor. A simple point and click configuration interface makes it easy to control multiple vision systems from any network PC, and allows users to easily transfer data and images to an enterprise file server or display them in the user’s own operator interface.

Cognex Connect delivers built-in support, from either the EasyBuilder or Spreadsheet View, for the following controls and communications:

  • PLC: Cognex Connect supports open standard industrial Ethernet communications protocols such as SLMP, EtherNet/IP and PROFINET for trouble-free connection to a wide range of PLCs including Mitsubishi, Rockwell and Siemens.
  • PC or HMI: Cognex Connect supports OPC server, Active X display controls, and standard TCP/IP Ethernet communications protocols.
  • Robots: Pre-configured drivers, ready-to-use templates and sample code are available for robots by ABB, Denso, Fanuc, Kawasaki, Kuka, Motoman and Staubli. Communication with robots by Mitsubishi, Adept, Epson and many other manufacturers is also supported.
  • Fieldbus: Cognex Connect supports all established standards, including CC-Link, DeviceNet, and PROFIBUS.

The Cognex Connect suite of communication capabilities is supported on all Cognex In-Sight models. For more information on Cognex Connect, visit cognex.com/connect.


Implicit Messaging

In-Sight Assembly Data Configuration (Implicit Messaging)

Input Assembly | Class | 0x04
 | Instance | 0x01
 | Size | 132-bytes (33 32-bit words)
Data Configuration | Bytes 0-3 (4-bytes) - Reserved for future use.
 | Bytes 4-132 (128-bytes) - Spreadsheet data (user definable).
Output Assembly | Class | 0x04
 | Instance | 0x02
 | Data Size | 132-bytes (33 32-bit words)
Data Configuration | Bytes 0-2 (3-bytes)
 | Byte 3 (1 byte)
 | Bytes 4-132 (128-bytes)
Note: The Minimum Request Packet Interval (RPI) is 10ms (data only), and 40ms (if acquisition trigger byte is included, using default setting in the AcquireImage property sheet).


User Data Holding Buffer

The User Data Holding Buffer is a temporary storage location for user data that is written from a PLC using the Transfer User Data service. This buffer can be used to build up a large data transfer into the vision system, ensuring data integrity during a large transfer. When the Transfer User Data service is executed, the In-Sight Spreadsheet will not be able to read the data until the Set User Data service is executed. Once that service is executed, all transferred data will be accessible to the In-Sight spreadsheet. This mechanism ensures that the In-Sight spreadsheet is always accessing consistent data.


FTP

File Transfer Protocol (FTP)

In-Sight vision systems have an integrated FTP client/server that allows them to share files with other vision systems on the network using the FTP protocol. The Save & Open dialogs act as FTP clients and can establish connections with FTP servers on the network to transfer job, image, and firmware update files. For more information, see Save & Open Dialogs.

Vision system settings are stored in the proc.set file. This file contains configuration details for serial ports, discrete input/output, the user list, startup parameters (user & job), and date/time settings. An FTP connection to a vision system may also be initiated from a non-In-Sight host on the network (in which case, the vision system acts as the FTP server.) This is the only method for saving the vision system proc.set file (.SET). This settings file may then be loaded onto other vision systems to replicate a configuration.

Custom applications that automate both the logon process and the issuance of FTP commands to a vision system can be written to run on the remote host.

Note:
  • Only one FTP server can be running on a PC. To ensure proper FTP communications with vision systems, close any third-party FTP servers that might be running on the local PC.
  • The vision system's performance may be degraded if attempting to save or load files while the vision system is Online.

  • File transfers over FTP on an In-Sight 5600 vision system may be slower than on other vision systems.

In-Sight vision systems support standard FTP commands. The following table lists frequently used commands:

FTP Command | Description
open [Address] | Establishes an FTP connection between a remote host and a vision system.
help | Displays a list of available FTP commands.
help [Command] | Displays information about an individual FTP command.
dir | Displays a list of files that are currently stored on a vision system.

prompt

Toggles Y/N prompting when multiple commands are used. The default setting for prompt is on.
get [File Name] | Downloads a file from an In-Sight system and saves it to the default directory of the FTP client on the remote host.1
mget [File Names] | Downloads multiple files from a vision system and saves them to the default directory of the FTP client on the remote host.1,2
put [File Name] | Uploads a file to a vision system from the default directory of the FTP client on the remote host.1
mput [File Names] | Uploads multiple files to an In-Sight system from the default directory of the FTP client on the remote host.1,2
del | Deletes a specified file from the vision system.
mdel | Deletes multiple files from the vision system.3
disconnect

Breaks the FTP connection between the remote host and the vision system, and returns user to the FTP command prompt.

Note: a vision system may have a maximum of two FTP connections at any one time.
quit | Breaks the FTP connection between the remote host and the vision system, and returns user to the DOS command prompt.
1 FTP will replace an existing copy of the file being transferred without any prompting or warning.

2 Use the "*" wildcard character (i.e., *.job) to specify multiple files. You will be prompted to respond Y or N for each file to be transferred.

3 Use the "*" wildcard character (i.e., *.job) to specify multiple files. You will be prompted to respond Y or N for each file to be deleted.

Example 1: Establishing a FTP Connection Between a Vision System and a Remote Host

  1. Identify the IP address of the vision system.

    Note: The About In-Sight Explorer dialog displays IP addresses for all devices in the In-Sight network. For more information, see About In-Sight Explorer Dialog.
  2. Open the FTP application on the remote host. In Microsoft Windows, you can open a DOS Command Prompt window and type: FTP
  3. At the FTP command prompt, type open Address, where Address is the IP address obtained in Step 1. If the connection is successful, a message similar to the following will appear: 220 In-Sight (R) 5100 Release 3.40.00 (2240) ready (is5100_010203).
  4. At the User prompt, enter a User Name that exists in the vision system's user list. If the User Name is accepted, the following message will appear: 331 User Name OK, need password. For more information, see User Access Settings Dialog.

  5. At the Password prompt, enter the corresponding password for the user name. If the password is accepted, the following message will appear: 230 User UserName logged in.

Example 2: Saving & Loading Vision System Settings Using FTP

Vision system settings are stored in the proc.set file. This file contains configuration details for serial ports, discrete input/output, the user list, startup parameters (user & job), and date/time settings.

Note: Copying the proc.set file to a vision system while it is Online is not allowed.

To save the proc.set file from a vision system to the FTP client:

  1. Establish an FTP connection to a vision system as described in Example 1.

  2. After log on, issue the following command: get proc.set. To verify that the file transfer was successful, look for the proc.set file in the default local directory on the FTP client.

    Note: Issuing the LCD command at the FTP prompt will show the default local directory.

To load the settings file from an FTP client onto a vision system:

  1. Establish an FTP connection to a vision system as described in Example 1.

  2. After log on, issue the following command: put proc.set.

    CAUTION: This command will overwrite the current settings file on the target vision system without any prompting or warning. Once the file has loaded successfully, restart the target vision system. Any settings in a file that do not apply to the target vision system will be discarded on the target system.


Get Value

Get Value: EasyBuilder View

Returns the contents of a specified symbolic tag, such as an EasyBuilder Location or Inspection Tool result or job data.

Get Value Inputs

Syntax: GV["Symbolic Tag"]

Parameter | Description
"Symbolic Tag" | The name of the symbolic tag, such as a Location or Inspection Tool result or job data (for example, "Job.Robot.FormatString.", "Job.FormatString").

Get Value Outputs

Returns a status code, followed by a line terminator, followed by the value contained in the specified symbolic tag. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The "Symbolic Tag" is invalid.
-2 | The command could not be executed.
Note: A symbolic tag containing any numeric value will return a float value formatted to 3 decimal places when requested by the Get Value command, regardless of whether the tool result or job data contains an integer or a floating-point value. If the symbolic tag contains a non-printing character, such as a Structure, a pound character (#) will replace the non-printing character. If the tool result or job data is empty, a null string will be sent.

Get Value Examples

In-Sight Vision Systems

You can return the data contained in a symbolic tag, such as an EasyBuilder Location or Inspection Tool result or job data, by sending a Get Value command.

  1. Assume that your job is configured to communicate with a Mitsubishi robot controller:

  2. You need to retrieve the data string from the In-Sight vision system, using the Get Value Native Mode command. Issue the command GVJob.Robot.FormatString, as shown in the following telnet client window:

  3. The In-Sight vision system responds with 1, indicating that the command was successfully executed, and the data in the formatted string.

In-Sight 2000 Series Vision Sensors

When the In-Sight 2000 series vision sensor is configured to communicate with Serial Native, you can return the data, such as an EasyBuilder Location or Inspection Tool result or job data, by sending a Get Value command, GVJob.FormatString.

The data type returned from the Location or Inspection tool depends on the In-Sight 2000 series models.

Tool | Models | Returned Results
Location Tools | In-Sight 2000 series 1XX vision sensors (110, 120, 130) | Pass/Fail only (0 = False, 1 = True)
In-Sight 2000 series 2XX vision sensors (23M, 230) | No Limitations
Inspection Tools | In-Sight 2000-110, 120 & 120C vision sensors | Pass/Fail only (0 = False, 1 = True)
In-Sight 2000-130 & 130C
  • Measurement & Counting tools: Result value
  • Other tools: Pass/Fail only (0 = False, 1 = True)
In-Sight 2000 series 2XX vision sensors (23M, 230) | No Limitations
  1. Go to the Communication application step. Click Add Device and select Serial Native.

  2. On the Format Output String tab, click Format String. In the FormatString dialog, add the items you would like to return. In this example, the dialog is configured as follows.

  3. Configure the Set Serial Port Settings tab.
  4. Place the In-Sight vision sensor Online.

  5. Issue the command: GVJob.FormatString as shown in the following telnet client window:

  6. The In-Sight vision sensor responds with 1, indicating that the command was successfully executed, and the data in the formatted string (Brightness_1.Pass = True, Circle_1.Pass = True, Pixels_1.Fail = False, Distance_1.Distance = 307.532898).


Get Value

Get Value: Spreadsheet View

Returns the value contained in the specified spreadsheet cell.

Get Value Inputs

Syntax: GV[Column][Row]

Parameter | Description
Column | The column letter of the cell value to get (A to Z).
Row | The row number of the cell value to get. The row number must consist of three digits (000 to 399).

Get Value Outputs

Returns a status code, followed by a line terminator, followed by the value contained in the specified cell. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid.
-2 | The command could not be executed.
Note: An In-Sight cell containing any numeric value will return a float value formatted to 3 decimal places when requested by the Get Value command, regardless of whether the cell contains an integer or a floating-point value. If the cell contains a non-printing character, such as a Structure, a pound character (#) will replace the non-printing character. If the cell is empty, a null string will be sent.

Get Value Example

Assume that cells A1, B0 and B1 are populated as follows:

  • A1 = 4.000
  • B0 = EditInt(0,10)
  • B1 = EditFloat(0,10)

A1 currently contains the value 4. B0 contains the value 5. B1 contains the value 3.230. The spreadsheet looks like this:

Issuing various GV commands produces the following results:


In-Sight Ports

The following ports are used for In-Sight communications:

Port Number | Service
TCP 21 | FTP. For more information, see FTP Settings Dialog.
TCP 23 | Telnet. For more information, see Dynamic Host Configuration Protocol (DHCP) Server.
UDP 68 | DHCP (In-Sight vision system only)
TCP 80 | HTTP
TCP 502 | Modbus
TCP 1069 | In-Sight Protocol
UDP 1069 | In-Sight Discovery
TCP 1070 | Machine Status data. For more information, see Sensor Status View.
UDP 2222 | EtherNet/IP
TCP 5753 | Audit Message Server
TCP 8087 | Web HMI HTTP (Default)
TCP 8443 | Web HMI HTTPS (Default)
UDP 45237 | Base SLMP messaging (GetCommunicationSetting). For more information, see Configure In-Sight Vision Systems for SLMP Scanner Communications.
TCP 44818 | EtherNet/IP
UDP 44818 | EtherNet/IP
UDP 45237 | iQ Sensor Solution. For more information, see Communicate with a Mitsubishi Automation Controller via iQ Sensor Solution.
TCP 50000 | DataChannel. For more information, see DataChannel Communications.
UDP 61450 | CC-Link IE Field Basic: Cyclic request/response messages. For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.
UDP 61451 | CC-Link IE Field Basic: NodeSearch and IPAddressSet messages. For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.


Robot Communications - Kuka Robot Controller - Serial

Kuka robot controllers communicate with other devices over RS-232 serial ports using a complex, but highly robust, error checking protocol. When configured for Kuka serial communications, the In-Sight vision system understands this protocol and is able to respond to the commands it receives from the Kuka controller.

Kuka Mode is an extension of In-Sight's Native Mode communications. Because Kuka Mode is based on Native Mode, an In-Sight job may be developed and tested in Native Mode, then switched to Kuka Mode only when the actual robot controller is connected to the In-Sight vision system. No other changes to the job are required.

Note:
  • The Kuka robot must be in P3964R mode to communicate with an In-Sight vision systems; Kuka must be the selected Mode for the Serial Port Setting on the vision system, as described below.
  • In-Sight vision systems are configured to use Kuka's default protocol settings (i.e., the Kuka robot is high priority, the In-Sight vision system is low-priority for transactions).
  • While serial-based robot communications are supported with the Breakout cable (In-Sight 5000 series or In-Sight 7000 series only), an I/O module is recommended for ease of setup.
  • In-Sight Micro 1000 series vision systems only support serial communication when connected to the CIO-MICRO or CIO-MICRO-CC I/O module.
  • There are two options for enabling serial communication for the In-Sight 70xx - 74xx series vision system: using the Breakout cable or using the CIO-MICRO or CIO-MICRO-CC I/O module. When connected to the Breakout cable (and there is no connection to an I/O module), the vision system allows one discrete input line and one discrete output line to be configured as Serial Receive and Serial Transmit, respectively. For more information, see Enable Serial Communication: In-Sight 70xx - 74xx.
  • In-Sight 8000 series vision systems only support serial communication when connected to the CIO-MICRO I/O module.
  • The CIO-WENET Ethernet I/O module does not support serial communication.

Configure an In-Sight Vision System for Kuka Communication

  1. On the Sensor menu, click Serial Port Settings.
  2. In the Serial Port Settings dialog, open the Mode drop-down list and select Kuka.

The In-Sight vision system will now default to standard Kuka controller serial port settings. However, if your controller uses different settings, make sure to configure In-Sight to use the same serial port settings as the Kuka controller.

Note: Kuka KR C2 and KR C2 Edition 2005 robot controllers are supported.

Kuka Commands

Whether sending data and commands or receiving data, the Kuka robot controller initiates all data communication between itself and an In-Sight vision system, using Native Mode commands.

The following Native Mode commands are supported in Kuka mode:

Native Mode Command | Syntax | Related Topics
Get Job | GJ | Get Job
Get Online | GO | Get Online
Get Value | GV[EncodedLocation] | Get Value: Spreadsheet View
Get Value | GV[Symbolic Name] | Get Value: Spreadsheet View
Load File | LF[Filename] | Load File
Set Event | SE[Int] | Set Event
Store File | TF[Filename] | Store File
Set Float | SF[Symbolic Name][Float Value] | Set Float: Spreadsheet View
Set Integer | SI[Symbolic Name][Integer Value] | Set Integer: Spreadsheet View
Set Job | SJ[ID] | Set Job
Set Online | SO[Integer Value] | Set Online
Set String | SS[Symbolic Name][String] | Set String


Native Mode Checksum

Cyclical Redundancy Check (CRC)

The checksum that is used by Native Mode file transfer commands is a standard 16-bit Cyclical Redundancy Check (CRC). The algorithm for calculating the CRC follows. In this example the variable CRC is unsigned 16 bits and the input byte is 8 bits.

  1. Set CRC to 0.
  2. Get next byte from data stream.

  3. Test the most significant bit of CRC and the input byte and do the following:

    If they are equal shift CRC left 1.

    If one bit is 0 and the other 1 then shift CRC left 1 and XOR with 4129.

  4. Shift the input byte left 1.
  5. If you have not shifted the input byte 8 times go to step 3.
  6. If you have remaining bytes in the data stream go to step 2.

A theoretical explanation of this algorithm can be found in Numerical Recipes in C:The Art of Scientific Computing.Press, William H., et al. Cambridge, MA: Cambridge University Press, 1992, 896-901. 1
A C function that calculates the CRC one bit at a time follows:

rt CalculateCRC(char* buffer, int size)

{

  unsigned short cword = 0;

  unsigned short ch;

  int i,j;

  for (i = 0; i < size; i++) {

    ch = buffer[i] << 8;

    for (j = 0; j < 8; j++) {

      if ((ch & 0x8000) ^ (cword & 0x8000)) {

        cword = (cword <<= 1) ^ 4129;

      }

      else {

        cword <<= 1;

      }

      ch <<= 1;

    }

  }

  return cword;

}


Set Float

Set Float: EasyBuilder View

Sets the floating-point value of a symbolic tag, such as an EasyBuilder Location or Inspection Tool parameter, or job data, to the specified floating-point value. The symbolic tag must be a Floating Point Data Type.

Set Float Inputs

Syntax: SF["Symbolic Tag"][Space][Float]

Parameter | Description
"Symbolic Tag" | The name of the symbolic tag [such as a Location or Inspection Tool parameter ("Pattern_1.Horizontal_Offset", for example) or EasyBuilder job data ("Acquistion.Exposure_Time", for example)] to be set.
Space | A blank space to separate the "symbolic tag" from the floating-point value.
Float | The floating-point value to set, including the decimal point (.) character.

Set Float Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The "Symbolic Tag" is invalid, or the specified value does not contain a floating-point number.
-2 | The command could not be executed, or the specified floating point value is outside of the control's valid range. For example, the specified name may not contain a control of the valid Data Type.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Float Example

You can set the floating-point value of a Location or Inspection Tool parameter, or job data, by sending a Set Float command containing the new floating-point value.

  1. Assume that your job contains a Pattern Location Tool, and the tool's current Horizontal Offset parameter setting is the default, 0.000:

  2. However, you would like to change that parameter's setting via the Set Float Native Mode command. Issue the command SFPattern_1.Horizontal_Offset 100.302 as shown in the following telnet client window:

  3. The In-Sight vision system responds with 1, indicating that the command was successfully executed. The tool's Horizontal Offset parameter has been successfully changed from 0.000 to 100.302:


Set Float

Set Float: Spreadsheet View

Sets an edit box control contained in a cell to a specified floating-point value. The edit box control must be of the EditFloat type.

Set Float Inputs

Syntax: SF[Column][Row][Float]

Parameter | Description
Column | The column letter of the cell value to set (A to Z).
Row | The row number of the cell value to set. The row number must consist of three digits (000 to 399).
Float | The floating-point value to set, including the decimal point (.) character.

Set Float Outputs

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid, or the specified value does not contain a floating-point number.
-2 | The command could not be executed. For example, the specified cell may not contain an edit box control, or the edit box control was not created by the EditFloat function.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Float Example

The command to set an edit box contained in cell A2 to the floating point value 7.2 is: SFA0027.2

  1. Assume cell A2 is populated as follows:

    A2 = EditFloat(0,10)

    A2 currently contains a value of 3.5.

    The spreadsheet looks like this:

  2. To change this value to 7.2 using the Set Float Native Mode command; issue the command SFA0027.2 as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The EditFloat control has been successfully changed from 3.5 to 7.2:


Set Integer

Set Integer: EasyBuilder View

Sets the integer value of a symbolic tag, such as a parameter contained in an EasyBuilder Location or Inspection Tool, or job data, to the specified integer value. The parameter or job data must be an Integer Data Type.

Set Integer Inputs

Syntax: SI["Name"][Space][Int]

Parameter | Description
"Name" | The name of the Location or Inspection Tool parameter ("Pattern_1.Model_Type", for example) or EasyBuilder job data ("Job.External_Reset_Counters", for example) to be set.
Space | A blank space to separate the "name" from the integer value.
Int | The integer value to set.

Set Integer Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The EasyBuilder "Name" is invalid, or was not an Integer Data Type.
-2 | The command could not be executed, or the specified integer value is outside of the control's valid range. For example, the specified name may not contain a control of the valid Data Type.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Change the Value of a Parameter Containing an Integer Value

You can set the integer value of a Location or Inspection Tool parameter, or job data, by sending a Set Integer command containing the new integer value.

  1. Assume that your job contains a Pattern Location Tool, and the tool's current Timeout parameter setting is the default, 5000 milliseconds:

  2. However, you would like to change that parameter's setting via the Set Integer Native Mode command. Issue the command SIPattern_1.Timeout 500 as shown in the following telnet client window:

    The In-Sight vision system responds with 1, indicating that the command was successfully executed. The tool's Timeout parameter has been successfully changed from 5000 to 500:

Example: Uncheck or Check a Parameter Containing a Checkbox

You can enable or disable a tool's checkbox parameter by using the Set Integer command to send a value of 1 (enable) or 0 (disable)

  1. Assume that your job contains a Pattern Location Tool, and the tool's current Scale Tolerance parameter setting is the default, disabled (unchecked):

  2. However, you would like to change that parameter's setting programmatically, to either enabled or disabled, based on a particular part. Issue the command SIPattern_1.Scale_Tolerance 1, as shown in the following telnet client window:

    The In-Sight vision system responds with 1, indicating that the command was successfully executed. The tool's Scale Tolerance parameter has been successfully changed from disabled (unchecked) to enabled (checked):

Example: Change the Selection Within a Drop-Down List

You can change the selection of a tool's drop-down menu list parameter by using the Set Integer command to send an integer indicating the desired selection. The items within the drop-down menu correspond to a ListBox control, which has an integer value (zero-based) assigned to it. You can "choose" a different value from the list by using the Set Integer Native Mode command to assign a different value to the parameter that contains the drop-down menu.

  1. Assume that your job contains a Blobs Counting Tool, and the tool's current Blob Color parameter setting is the default, Either/2:

  2. However, you would like to change that parameter's setting programmatically, to either Black/0 or White/1, based on a particular product part. Issue the command SIBlobs_1.Blob_Color 1, as shown in the following telnet client window:

    The In-Sight vision system responds with 1, indicating that the command was successfully executed. The tool's Blob Color parameter has been successfully changed from Either/2 to White/1:


Set Integer

Set Integer: Spreadsheet View

Sets the control contained in a cell to the specified integer value. The control must be of the types EditInt, Checkbox, or ListBox.

Set Integer Inputs

Syntax: SI[Column][Row][Int]

Parameter | Description
Column | The column letter of the cell value to set (A to Z).
Row | The row number of the cell value to set. The row number must contain a three-digit number (000 to 399).
Int | The integer value to set.

Set Integer Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid, or was not an integer.
-2 | The command could not be executed, or the specified integer value is outside of the control's valid range. For example, the specified cell may not contain a control of the valid type.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Change the Value of an EditInt Control

The command to set an EditInt control in cell A2 to the integer value 8 is: SIA0028

  1. Assume cell A2 is populated as follows:

    A2 = EditInt(0,10)

    A2 currently contains the value 3. The spreadsheet looks like this:

  2. We would like to change the value in A2 to 8 using the Set Integer Native Mode command; issue the command SIA0028 as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The EditInt control has been successfully changed from 3 to 8 within the spreadsheet:

Example: Toggle the State of a CheckBox Control

You can enable or disable a CheckBox control using the Set Integer command by sending a value of 1 (enable) or 0 (disable) to the cell that contains the check box.

  1. Assume cells B2, D2 and E2 are populated as follows:

    • B2 = CheckBox("Draw circle")
    • D2 = 'Check box integer value =
    • E2 = $B$2

    The check box is currently cleared, as shown:

    Note: Cell E2 is simply reporting the integer value of the CheckBox control.

  2. To select this check box using the Set Integer Native Mode command, issue the command SIB0021, as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The check box is now selected:

    Cell E2 changed from 0 to 1 to reflect the new integer value of the CheckBox control.

Example: Change the Selection within a ListBox Control

Each item within a ListBox control has an integer value (zero-based) assigned to it. You can "choose" a different value from the list by using the Set Integer Native Mode command to assign a different value to the cell that contains the ListBox control.

  1. Assume cells B2, C2 and D2 are populated as follows:

    • B2 = ListBox("Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet")
    • C2 = ' Integer List Value =
    • D2 = $B$2

    The ListBox control is currently set to Yellow; this corresponds with an integer value of 2, as shown in the following spreadsheet:

    Note: Cell D2 is simply reporting the integer value of cell B2.

  2. To change the current list selection to Blue using the Set Integer Native Mode command, issue the command SIB0024, as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The list selection has been changed from Yellow to Blue within the spreadsheet:

    Cell D2 changed from 2 to 4 to reflect the new integer value of the ListBox control.


Set Region

Set Region: EasyBuilder View

Sets a region contained in a symbolic tag, such as an EasyBuilder Location or Inspection Tool's region. The tool's region must contain an edit region control from an EditRegion function.

Set Region Inputs

Syntax: SR["Symbolic Tag"][Space][Row][Space][Col][Space][High][Space][Wide][Space][Angle][Space][Curve]

Parameter | Description
"Symbolic Tag" | The name of the Location or Inspection Tool ("Edge_1.Region", for example).
Space | A blank space to separate the "name" from the floating-point value.
Row | The x-offset of the origin, in image coordinates.
Space | A blank space to separate the value from the next value.
Col | The y-offset of the origin, in image coordinates.
Space | A blank space to separate the value from the next value.
High | The dimension along the region's x-axis.
Space | A blank space to separate the value from the next value.
Wide | The dimension along the region's y-axis.
Space | A blank space to separate the value from the next value.
Angle | The orientation, in image coordinates.
Space | A blank space to separate the value from the next value.
Curve | The angular deviation between the region's x-axis and the opposing boundary line.

Set Region Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The "Symbolic Tag" is invalid.
-2 | The command could not be executed because the "Symbolic Tag" does not contain an edit region control, or the edit region control was not created by the EditRegion function.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Region Example

You can set the Region of an EasyBuilder Location or Inspection Tool by sending a Set Region command containing the new region's position, dimensions, orientation and shape.

  1. Assume that your job contains an Edge Location Tool, and the tool's region is currently in another position, with different dimensions, orientation and shape.

  2. However, you would like to move and re-orient the tool's region settings via the Set Region Native Mode command. Issue the command SREdge_1.Region 192.000 119.000 167.000 20 0.5 0 as shown in the following telnet client window:

  3. The In-Sight vision system responds with 1,indicating that the command was successfully executed.


Set Region

Set Region: Spreadsheet View

Sets an edit region control contained in a cell; the edit region control must be an EditRegion function.

Set Region Inputs

Syntax: SR[Column][Row][Row][Space][Col][Space][High][Space][Wide][Space][Angle][Space][Curve]

Parameter | Description
Column | The column letter of the cell value to set (A to Z).
Row | The row number of the cell value to set. The row number must consist of three digits (000 to 399).
Row | The x-offset of the origin, in image coordinates.
Space | A blank space to separate the value from the next value.
Col | The y-offset of the origin, in image coordinates.
Space | A blank space to separate the value from the next value.
High | The dimension along the region's x-axis.
Space | A blank space to separate the value from the next value.
Wide | The dimension along the region's y-axis.
Space | A blank space to separate the value from the next value.
Angle | The orientation, in image coordinates.
Space | A blank space to separate the value from the next value.
Curve | The angle of orientation, in the image coordinate system.

Set Region Outputs

Returns a status code. The status codes are:

Status Codes | Description
1 | The command was executed successfully.
0 | Unrecognized command.
-1 | The cell ID is invalid.
-2 | The command could not be executed because the specified cell does not contain an edit region control, or the edit region control was not created by the EditRegion function.
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Set Region Example

The command to set an edit region contained in cell A2 to a new location and dimensions.

  1. Assume cell A2 is populated as follows: A2 = EditRegion($A$0,0,0,0,1,1,1,1,"Region",0)

    The spreadsheet looks like this:

  2. To change the region's location and dimensions using the Set Region Native Mode command; issue the command SRA002437.0 581.2 333.12 441 2 2.3as shown in the following telnet client window:

    The In-Sight sensor responds with 1,indicating that the command was successfully executed:


Auto-Tune

The Auto-Tune dialog is used in conjunction with the OCRMax function to configure the Segmentation parameters of the OCRMax function and train a font database, through the construction of Auto-Tune Records to create an Auto-Tune Model. An Auto-Tune Record consists of an image, the training string and the user-verified location of the characters within the image. The Auto-Tune Model consists of one or more Auto-Tune Records, plus the settings that best segments all of the images within the Auto-Tune Records. For more information, see Segmentation Tab.

Note:
  • The Auto-Tune dialog is unavailable when the In-Sight vision system is Online.
  • The Auto-Tune dialog will be unavailable if this parameter is set as a reference to an OCRMaxSettings or GetInternalSettings function (this parameter must be set to 0 to enable the Auto-Tune dialog). For more information about enabling the Auto-Tune dialog in conjunction with a GetInternalSettings function, see GetInternalSettings(OCRMax)
  • Cognex recommends that when using the Auto-Tune dialog, the segmentation tuning be performed on an In-Sight Emulator instead of an In-Sight vision system. The OCRMax function's Auto-Tune algorithm requires a large amount of computational resources, and performance will be better on the Emulator versus a vision system.
  • When training a font database and using the Auto-Tune dialog to segment the characters, Cognex recommends beginning the process with images that best represent how the characters should look (i.e., use your best images first), working from best to worst. Also include images that represent all of the variations that will be expected to be encountered during run-time. This will allow the OCRMax function's Auto-Tune algorithm to tune more successfully.
  • The Auto-Tune algorithm will not work on text that exhibits an angle larger than +/- 5 degrees within the ROI. In this scenario, either ensure that the ROI is fixtured so that it is aligned with the text within the angle range, or set the Angle Range parameter to a value greater than 5, at which point the Auto-Tune algorithm will utilize the value in its calculations. For more information, see Region and Angle Range.
  • The Auto-Tune algorithm will not work when characters are overlapped. Perform manual segmentation to segment and classify overlapped characters.
  • The OCRMaxAutoTune function provides external access to the Auto-Tune dialog, for use with external devices, such as the VisionView Operator Interface Panel.

Overview

With the Auto-Tune dialog running, each image is examined to verify that the characters are being correctly segmented and classified. If the characters are not being correctly segmented, the OCRMax function's Auto-Tune algorithm will calculate the optimal Segmentation parameter settings that segment the current image (the Auto-Tune Record), as well as the previously trained images (the Auto-Tune Model). As more images are trained, the OCRMax function's Auto-Tune algorithm will become more reliable and accurate. Once satisfactory results are achieved, the Auto-Tune dialog is closed, the new Segmentation parameters are applied and the font database is updated with the newly trained characters.

The Auto-Tune dialog provides two primary advantages over manually tuning the Segmentation parameters:

  1. Images only need to be cycled through once, instead of twice (once to tune the Segmentation parameters, and the second to train).
  2. Read accuracy should improve because the characters are trained automatically with the Segmentation parameters obtained during the tuning process.

Auto-Tune Dialog Tabs and Controls

To display the Auto-Tune Dialog, press the Auto-Tune button from the OCRMax property sheet.

The Auto-Tune dialog is composed of four different tabs: Auto-Tune, Settings, Records and Font.

In addition to the tabs, the Auto-Tune dialog contains a toolbar with the following controls:

  • Reset: Specifies that the Segmentation tab parameters will be reset to their default settings, clear font information and remove any Auto-Tune record (.rec) files associated with the function.
  • Open: Launches the Open dialog, which is used to navigate to a previously saved Auto-Tune Model (as a .REC file). By default, the Auto-Tune dialog will automatically load the last saved Auto-Tune Model.
  • Save As: Launches the Save As dialog, which is used to navigate to a directory in which to save and store an Auto-Tune Model (as a .REC file). By default, the Auto-Tune Model is saved to memory on the connected In-Sight device (either Emulator or In-Sight vision system, depending upon which is connected and being used to develop the job).

  • Edit Region: Launches interactive graphics mode, where the ROI of the OCRMax function may be modified. For more information, see Interactive Graphics Mode

    Note: If the referenced OCRMax function's Region parameter is defined by a cell reference or a formula, the Edit Region control will be disabled. For more information, see Cell References - Relative/Absolute.
  • Play First: Go to the first image stored in the Playback Folder (configured using the Record/Playback Options Dialog).
  • Play Previous: Go to the previous image stored in the Playback Folder.
  • Play Next: Go to the next image stored in the Playback Folder.
  • Play Last: Go to the last image stored in the Playback Folder.
  • Open Image: Launches the Open Image dialog, which is used to navigate to an image directory.
  • Live Video: Enter Live Video mode, where images are continuously acquired from an In-Sight vision system and displayed in the display area. This option is only available when connected to a vision system.

Auto-Tune

The Auto-Tune tab is used to enter the text string to be trained, activating automatic or manual character segmentation, and adding characters to the font database.

  • Text field: Specifies the text string to be trained. If there are spaces in the string, enter them using the keyboard Space bar.
  • Fix Segmentation (Automatic): Specifies that the OCRMax function will attempt to automatically segment the characters by creating character regions and using different combinations of Segmentation parameters, until the correct number of characters are found. For more information, see GetCharacterRegion(OCRMax, Char_Index, Show).
  • Fix Segmentation (Manual): Specifies that the character regions will be manually adjusted, while in interactive graphics mode, by editing the size and position of the individual character regions. The OCRMax function will then calculate the optimal Segmentation parameters based on the shape and position of the character regions.
  • Train Characters Only: Specifies that the text specified in the Text field will be trained and added to the font; no adjustments to the Segmentation parameters will be made.

Settings

The Settings tab is used to configure the OCRMax function's auto-tuning algorithm.

  • Number of Results: Specifies the maximum number (1 to 9,999,999; default = 30) of candidate results to generate.

    Note: When connected to an In-Sight vision system, a maximum of 15 results may be generated for the Auto-Tune Model.

  • Parameter Steps: Specifies the maximum number of iterations (1 to 100; default = 5) to attempt for each Segmentation parameter.

    Note: The higher the number of iterations, the longer the Auto-Tune process will take to complete.

  • Auto Save File Name: Specifies the name of the .REC file; the default name is "ocrs_{cell}.rec" (when specifying the name, do not add a file path or an extension). The maximum length of the file name is 255 characters, and may only contain alpha-numeric characters and the underscore character. When closing the Auto-Tune dialog via the OK button, the .REC file will automatically be exported to the In-Sight vision system's memory. Afterwards, the .REC file will be automatically imported when the Auto-Tune dialog is re-opened.

    Note: To load and/or save a .REC file to a specific location, use the Open and Save As options in the Auto-Tune dialog toolbar controls.

  • Lock Parameters: Launches the Lock Parameters dialog, which is used to specify which OCRMax parameters the Auto-Tune dialog should not modify when calculating the optimal Segmentation parameters (which are configured prior to launching the Auto-Tune process).

    Note: A parameter will automatically be locked and disabled if that parameter has been created as a cell reference in the Spreadsheet.

Records

The Records tab displays a list of the Auto-Tune Records. An Auto-Tune Record consists of an image, the trained text string and the user-verified location of the characters in the image.

  • Table: Displays the name of the image used to train, the text string trained, and whether or not segments and characters were verified.

  • View Record: Select a record to enable, and press to launch the Auto-Tune Record dialog, which displays the previously trained character regions above the current Auto-Tune results. If the current results segment the characters better than the trained results, press the Replace Record with Current Results button to overwrite the previously trained character regions with the current Auto-Tune results.

  • Delete Record: Select a record, and then press this button to remove the record from the list.

    Note: Deleting a record may take a few moments to complete.

Font

The Font tab displays a read-only view of the trained characters and their instances.

Use the Auto-Tune Dialog

All of the steps below assume that a database of sample images that contain the characters to be trained has been created and placed in a directory. Also, the steps assume that an OCRMax function has been inserted into the Spreadsheet. The process of training and segmenting characters for OCR applications using the Auto-Tune dialog consists of the following: loading training images, training images with automatic character segmentation, training images with manual character segmentation, and finally, correcting character identifications.

Load Training Images

  1. Load the images; select Record/Playback Options from the Image Menu.
  2. The Record/Playback Options dialog should automatically open with the Playback tab presented; if not, click on the Playback tab.
  3. From the Playback Folder section, press the Browse button to launch the Browse for Folder dialog. Navigate to the directory containing the training images and press the OK button to continue.
  4. The Playback Folder should now display the directory specified, and the Image Count indicates the number of images in the directory. Press the OK button in the Record/Playback Options dialog to continue.
  5. Once the Playback Folder directory has been specified, the Play First, Play Previous, Play Next, and Play Last buttons in the Auto-Tune dialog toolbar may be used to navigate the images.

Train Images Using Automatic Character Segmentation

  1. In the Auto-Tune dialog, by default, the Auto-Tune tab will be displayed. In the Text field, enter the text string to be trained.
  2. From the Auto-Tune dialog's toolbar, press the Edit Region button to enter interactive graphics mode and position the OCRMax function’s ROI over the line of text to be read. When configuring the ROI, ensure that it accounts for any angular rotation and/or skew.
  3. The function will automatically create character regions around the text that the function determines to be characters, based on the default settings in the Segmentation tab.
  4. Press the Fix Segmentation (Automatic) button to allow the OCRMax function to automatically adjust the Segmentation parameters.

  5. After the OCRMax function has segmented the characters, the Auto-Segment Results dialog will be displayed, with a list of results.

  6. Examine the result(s) to determine which result provides the best segmentation of characters. Selecting a result in the list will update the character regions in the image. If necessary, press the Edit Result button to enter interactive graphics mode and manually adjust the character regions around the character(s).
  7. Once the best result has been determined, select the result from the list and press the OK button to close the Auto-Segment Results dialog.
  8. A new Auto-Tune Record will be created, and the image will be updated with the new character regions. The Font will also be updated with the newly trained characters.
  9. Load the next image, and repeat steps 1 through 8.
  10. Once all of the training images have been used, press the OK button to close the Auto-Tune dialog.

Train Images Using Manual Character Segmentation

  1. In the Auto-Tune dialog, by default, the Auto-Tune tab will be displayed. In the Text field, enter the text string to be trained.
  2. From the Auto-Tune dialog's toolbar, press the Edit Region button to enter interactive graphics mode and position the OCRMax function’s ROI over the line of text to be read. When configuring the ROI, ensure that it accounts for any angular rotation and/or skew.
  3. The function will automatically create character regions around the text that the function determines to be characters, based on the default settings in the Segmentation tab.
  4. Press the Fix Segmentation (Manual) button to enter interactive graphics mode.
  5. Manually edit the position and size of the character regions, as needed.
  6. Once all of the character regions have been resized and re-positioned as needed, press the OK button on the Job Edit toolbar to exit interactive graphics mode.
  7. The Auto-Tune dialog will once again be displayed, and a new Auto-Tune Record will be created, and the image will be updated with the new character regions. The Font will also be updated with the newly trained characters.
  8. Load the next image, and repeat steps 1 through 8.
  9. Once all of the training images have been used, press the OK button to close the Auto-Tune dialog.

Correct Character Identifications

This option is used when the image has been segmented correctly, however the characters were misidentified.

  1. In the Auto-Tune dialog, by default, the Auto-Tune tab will be displayed. In the Text field, enter the text string to be trained.
  2. Press the Train Characters Only button.

  3. The Font will be updated with the newly trained characters, and a new Auto-Tune Record will be created.

    Note: If the error message "Incorrect Auto-Tune Record text string in the Auto-Tune Model" is encountered, this error indicates that an Auto-Tune Record has been added that is identical to another Auto-Tune Record, except the classification between the two is different. For example, if the first Auto-Tune Record has a zero classified as the letter "O" in the first, but in the second it is correctly classified as "0," this error will occur. In this error condition, go to the Records tab and verify the text strings specified for the Auto-Tune Record are correct.


Batch Run

The Batch Run dialog is used to load multiple In-Sight job files for use by TestRun, and to execute the tests as a single operation.

Batch Run Dialog Controls

To display the Batch Run dialog, navigate to the TestRun tab of the Palette, and press the Batch Run button on the TestRun toolbar.

  • Selected Jobs table: Displays a checkbox, the job name, directory location, and the status of the job while in TestRun and after completion (pass/fail).
  • Add Jobs: Press to launch the Open dialog, which will be used to select one or more jobs and/or directories. If a directory is selected, all the .job files within the directory will be added.
  • Remove: Select a job and press to remove from the list of jobs.
  • Remove All: Selects all of the jobs in the list and removes them.
  • Load Job: Select a job from the table of jobs and press to load that job to the currently connected In-Sight Emulator or vision system.
  • Include All: Press to automatically enable all of the jobs in the table for inclusion in the batch operation.
  • Exclude All: Press to automatically disable all of the jobs in the table from the batch operation.

  • Report Location: Displays the directory location of the Batch Run report log.

    Note:

    If the Report Location is set to use an FTP server, a slash must be used after the host name.

    • Correct: ftp://192.168.0.6/
    • Wrong: ftp://192.168.0.6
  • Browse: Press to launch the Open dialog, which is used to specify the directory location for storing the Batch Run report log.
  • Report Name: Displays the name of the Batch Run report log.
  • Credentials: Press to launch the Credentials dialog, where user credentials are entered for access to the folder containing the jobs (if necessary). The user credentials should match those supplied in the Image Database Folder step of the TestRun configuration. For more information, see Image Database Folder.
  • Include date & time in report name: Specifies whether or not the date and time should be appended to the Batch Run report log file name. When enabled, a date/time stamp will be inserted between the name and the file format. For example, if the report's name is "MyReport" and the file format is XML, then the report name will be "MyReport.20121011_082345.xml."
  • Report Format: Specifies the file format of the Batch Run report (Plain Text, XML or HTML; default = XML).
  • Run: Press to begin the batch TestRun operations. A job and/or jobs must be selected, a report location specified and a report name created before the Run button is enabled. After pressing the Run button, the Status column of the Selected Jobs table will display the progress of the test execution.
  • Close: Press to exit the dialog.


CC-Link IE Field Basic Settings Dialog

The CC-Link IE Field Basic Settings dialog is used to configure an In-Sight vision system to communicate with a Mitsubishi Automation Controller using the CC-Link IE Field Basic protocol. For more information, see Communicating with a Mitsubishi Automation Controller on CC-Link IE Field Network Basic.

Display the CC-Link IE Field Basic Settings Dialog

From the Network Settings dialog, with the CC-Link IE Field Basic option enabled, press the Settings button.

CC-Link IE Field Basic Settings Dialog Controls

Enable User Data Bypass: Check this checkbox to bypass the cached data and read the raw user data directly. For the CC-Link IE Field Basic protocol, RY20 -3F [User Data (Bit Area)] and RWw1 - 1F (User Data) will be reflected on the In-Sight vision system when this checkbox is checked.

  • Unchecked (default): The User Data is reflected only when RY10 (Set User Data) is turned ON.
  • Checked: The User Data is reflected regardless of the ON/OFF status of RY10 (Set User Data).
Note: For more information on the data blocks, see CC-Link IE Field Network Basic Factory Interface.


I/O Module

I/O Module Support

An I/O module can be used to provide additional discrete inputs and outputs. The number of discrete inputs and outputs varies per applicable I/O module, as follows. For more information, see Default Input and Output Lines.

I/O Modules | Supported In-Sight Vision Systems | Discrete Input Lines | Discrete Output Lines
CIO-1400 | In-Sight 5000 series (except 5604), In-Sight 7000 Gen2 series, In-Sight 9000 series | 7 general-purpose inputs | 6 general-purpose outputs
CIO-MICRO | In-Sight Micro 1000 series, In-Sight 5000 series, In-Sight 70xx - 79xx series, In-Sight 8000 series, In-Sight 9000 series | 8 general-purpose inputs | 8 general-purpose outputs
CIO-MICRO-CC | In-Sight Micro 1000 series, In-Sight 5000 series (except 5705, 5705C and 5715), In-Sight 70xx - 74xx series | 8 general-purpose inputs | 8 general-purpose outputs
CIO-1450 | In-Sight 5000 series (except 5604, 5705, 5705C and 5715) | 8 general-purpose inputs | 8 general-purpose outputs
CIO-1460 | In-Sight 5000 series (except 5604, 5605, 5705, 5705C and 5715) | 8 general-purpose inputs | 8 general-purpose outputs
CIO-WENET | In-Sight Micro 1000 series | 8 general-purpose inputs | 8 general-purpose outputs
Note:
  • The CIO-1400 I/O module supports the In-Sight 7000 Gen2 series vision system using In-Sight Explorer 5.4.0 and higher. If you log onto the vision system using an earlier version of In-Sight Explorer, connect to the CIO-1400 I/O module and configure the I/O lines, the changes will not be retained.
  • The CIO-MICRO I/O module supports In-Sight 5705, 5705C, 5715 and In-Sight 8000 series vision systems with firmware version 5.3.0 and higher.
  • The CIO-MICRO & CIO-MICRO-CC I/O modules support In-Sight 5100 series and 5400 series vision systems with 128MB non-volatile flash memory or higher. Models can be identified by the Type number (821-xxxx-xx). The Type number is located on the label affixed to the vision system. For a complete list of models and supported firmware versions, see Firmware Versions.
  • The CIO-1450, CIO-1460 and CIO-WENET I/O modules are obsolete and no longer available for purchase, however these modules are still supported within In-Sight Explorer for backward compatibility only.
  • In-Sight vision systems may also be used to communicate with standard Ethernet I/O solutions available from other vendors, including Opto 22, Wago, and Sixnet, to provide a virtually unlimited number of I/O channels. However, the In-Sight TCPDevice function, configured for Modbus packet type communications, must be used to configure Ethernet-based I/O on these vision systems. For more information, see TCPDevice.
  • In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.


Format Input/Output Buffer Dialogs

The FormatInputBuffer and FormatOutputBuffer dialogs are used to automatically configure data for the FormatInputBuffer and FormatOutputBuffer functions, and return a Buffer structure containing the formatted data. For more information, see FormatInputBuffer and FormatOutputBuffer.

The data will typically be sent from and/or to a PLC, and can also be used by some Input/Output functions, depending on the type of communication being used. For some protocols, it may be necessary to pad the data, i.e. add unused data in between the desired data, so that the data matches the data alignment of the PLC. For the Ethernet/IP protocol, RSLogix pads User-Defined data types into 4-byte boundaries (The FormatOutputBuffer dialogs do not support aligning data to 4-byte boundaries.). When the Inspection Results data array is received, RSLogix 5000 will assign a single data type to the entire array, regardless if the data that was sent contained multiple data types (integers, floating point, and/or bits). If the results contain different data types, you need to copy the byte offset into the Inspection Results array, and the length, in bytes, into a User-Defined data type in RSLogix, based on the expected data type being sent.

When sending packaged data via one of the supported industrial Ethernet protocols, consult the protocol vendor's documentation to determine the data alignment and packing behavior of the protocol

Display the Format Input Buffer Dialog

  1. Select an empty spreadsheet cell.
  2. On the Insert menu, click Function.
  3. From the Insert Function dialog, expand the Input/Output category.

  4. From the right-hand pane, double-click FormatInputBuffer.

Format Input Buffer Dialog Controls

  • Data Type: Specifies the type of data to automatically configure.

  • Element Size (bytes): When String or Byte-Swapped String is the selected Data Type, specifies the size of the data, in bytes. All other Data Types have a fixed, non-editable size. Up to 4,000 bytes can be entered in the Element Size field; however, the protocols cannot read more than the maximum input length. If the input data exceeds the limit, the protocols will only read a portion of them.

    Note:

    • The maximum length for input data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for input data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for input data is 128 bytes. The maximum length for all other communications is 256 bytes.

    • If the total message size exceeds 4,000 bytes, #ERR is returned.
    Data Type | Size Range (in bytes)
    Bit* | 1 bit
    8 bit integer

    1
    8 bit unsigned integer

    1
    16 bit integer

    2
    16 bit unsigned integer

    2
    32 bit integer

    4
    32 bit floating point

    4
    String
    • Modbus TCP, EIP or PROFINET = 1 to 4000 (or 1 to 2000 for word-based protocols).
    • SLMP or SLMP Scanner with iQ-R/Q/L Series or iQ-F Series = 1 to 1920 (or 1 to 960 words for word-based protocols).
    • SLMP or SLMP Scanner with FX Series = 1 to 128 (or 1 to 64 words for word-based protocols).
    • All other communications = 1 to 256 (or 1 to 128 words for word-based protocols).
    Byte-Swapped String
    • Modbus TCP, EIP or PROFINET = 1 to 4000 (or 1 to 2000 for word-based protocols).
    • SLMP or SLMP Scanner with iQ-R/Q/L Series or iQ-F Series = 1 to 1920 (or 1 to 960 words for word-based protocols).
    • SLMP or SLMP Scanner with FX Series = 1 to 128 (or 1 to 64 words for word-based protocols).
    • All other communications = 1 to 256 (or 1 to 128 words for word-based protocols).

    *The Bit Data Type is only available for SLMP and CC-Link communications.

  • Add: Adds a Data Type to the list.
  • Remove: Removes the highlighted Data Type from the list.
  • Move Up: Moves the highlighted Data Type up in the list. If the Data Type is already the first item in the list, the Move Up button is disabled.
  • Move Down: Moves the highlighted Data Type down in the list. If the Data Type is already the last item in the list, the Move Down button is disabled.

Display the Format Output Buffer Dialog

  1. Select an empty spreadsheet cell.

  2. On the Insert menu, click Function.

  3. From the Insert Function dialog, expand the Input/Output category.

  4. From the right-hand pane, double-click FormatOutputBuffer.

Format Output Buffer Dialog Controls

  • Cell(s): Specifies a referenced cell (or range of cells) containing a value for the selected Data Type.

    Note: Each Data Type must reference a cell containing valid data or the dialog will return #ERR.
  • Data Type: Specifies the type of data to automatically configure.

  • Element Size (bytes): When String or Byte-Swapped String is the selected Data Type, specifies the size of the data, in bytes. All other Data Types have a fixed, non-editable size. Up to 4,000 bytes can be entered in the Element Size field; however, the protocols cannot write more than the maximum output length. If the output data exceeds the limit, the protocols will only write a portion of them.

    Note:

    • The maximum length for output data, when using Modbus TCP, EIP or PROFINET communications, is 4,000 bytes. When using SLMP or SLMP Scanner and iQ-R/Q/L Series or iQ-F Series is the selected Controller Type, the maximum length for output data is 1920 bytes. When using SLMP or SLMP Scanner and FX Series is the selected Controller Type, the maximum length for output data is 128 bytes. The maximum length for all other communications is 256 bytes.

    • If the total message size exceeds 4,000 bytes, #ERR is returned.
    • An individual 16-bit integer is 3 characters, thus, when using 16-bit integers, the maximum length for output data is 140 bytes. Exceeding this limit will result in the function returning an "Error String too long." If the output data exceeds the limit, use the CombineOutputBuffers function.
    Data Type | Size Range (in bytes)
    Bit* | 1 bit
    8 bit integer | 1
    8 bit unsigned integer | 1
    16 bit integer | 2
    16 bit unsigned integer | 2
    32 bit integer | 4
    64 bit integer | 8
    32 bit floating point | 4
    String
    • Modbus TCP, EIP or PROFINET = 1 to 4000 (or 1 to 2000 for word-based protocols).
    • SLMP or SLMP Scanner with iQ-R/Q/L Series or iQ-F Series = 1 to 1920 (or 1 to 960 words for word-based protocols).
    • SLMP or SLMP Scanner with FX Series = 1 to 128 (or 1 to 64 words for word-based protocols).
    • All other communications = 1 to 256 (or 1 to 128 words for word-based protocols).
    Byte-Swapped String
    • Modbus TCP, EIP or PROFINET = 1 to 4000 (or 1 to 2000 for word-based protocols).
    • SLMP or SLMP Scanner with iQ-R/Q/L Series or iQ-F Series = 1 to 1920 (or 1 to 960 words for word-based protocols).
    • SLMP or SLMP Scanner with FX Series = 1 to 128 (or 1 to 64 words for word-based protocols).
    • All other communications = 1 to 256 (or 1 to 128 words for word-based protocols).
    *The Bit Data Type is only available for SLMP and CC-Link communications.
  • Message size (bytes): Displays the total Message size in bytes.
  • Add: Invokes cell selection mode to reference one or more cells. Cells can be selected while the dialog is open.
  • Remove: Removes the highlighted Data Type from the list. If no items are highlighted, the Remove button is disabled.
  • Move Up: Moves the highlighted Data Type up in the list. If the Data Type is already the first item in the list, the Move Up button is disabled.
  • Move Down: Moves the highlighted Data Type down in the list. If the Data Type is already the last item in the list, the Move Down button is disabled.

Format Output Buffer Example

  1. Assume cells A2, A3 and A4 are populated as follows:

    A2 = EditInt(0,255)

    A3 = EditFloat(0,100)

    A4 = EditString(8)

    The spreadsheet looks like this:

  2. Insert the FormatOutputBuffer function in cell C2. The FormatOutputBuffer dialog automatically opens.

  3. Click the Add button to reference the cell containing the appropriate data. For example, highlight cell A2.

  4. Press the ENTER key to accept the referenced cell selection and return to the FormatOutputBuffer dialog. The referenced cell should now be listed in the dialog.

  5. Continue to click the Add button to add additional cell references. You can change the Data Type, delete or reorder existing items in the list.

  6. Click OK to close the dialog and return to the spreadsheet. A Buffer data structure is returned.


Format String Dialog

EasyBuilder View

The FormatString dialog is used to select and format Location and Inspection Tool data to generate an Output String that can be sent to a remote device, such as a robot controller. When configuring a string for a robot (in the Communication group-box of the Communication Application Step, the Device is set to Robot, or the Protocol is set to Serial Kuka or Serial Motoman), the FormatString dialog will automatically select the fixture output generated in the job.

Within the FormatString dialog, each referenced tool result is listed as an individual item. Each item can be formatted by assigning a Label, Data Type, number of Decimal Places, Fixed Width and Pad. In order to format an item, it must first be highlighted in the list. The entire Output String can be formatted by adding Leading Text, Trailing Text, Terminators and Delimiters.

Note:
  • To format multiple, non-consecutive items, hold down the CTRL key and highlight the items.
  • To format multiple, consecutive items, hold down the SHIFT key and highlight the first item, and then the last item, in the list.

Format String Dialog Controls

  • Leading Text: The Output String prefix. The maximum string length is 30 characters.
  • Trailing Text: The Output String suffix. The maximum string length is 30 characters.

  • Terminators: Appends the selected terminator character(s) to the Output String.

    • None: No terminator is appended to the Output String.
    • Line Feed (LF): Appends a line feed to the Output String.
    • Carriage Return (CR): Appends a carriage return to the Output String.
    • Carriage Return and Line Feed (CR+LF): Appends a carriage return and a line feed to the Output String.

  • Use Delimiter: Enabled by default; the items are delimited. The maximum string length is 1 character.
    • Standard: Allows you to select a standard delimiter: Comma, Space, Tab, Semicolon or Underscore.
    • Other: Allows you to enter a custom, single-character delimiter.
  • Add: Launches the Select Output Data dialog, which contains data from any Location or Inspection Tools that were added to the job. After selecting the desired results, the FormatString dialog returns and creates one item for each selected result.
  • Delete: Removes the highlighted item from the item list. If no items are highlighted, the Delete button is disabled.
  • Move Up: Moves the highlighted item up in the item list. If the item is first in the list, the button is disabled.
  • Move Down: Moves the highlighted item down in the item list. If the item is last in the list, the button is disabled.
  • Label: Each item may be assigned a label to help identify it. The maximum string length is 12 characters.
  • Include Label: When enabled, the item's Label is included in the Output String, preceding the item's string.
  • Data Type: The FormatString dialog automatically determines the Data Type for each item, based on the contents of the referenced result.
    • Integer: Returns a string containing an integer value.
    • Unsigned Integer: Returns a string containing an unsigned integer value.
    • Integer (hex): Returns a lower-case string containing the hexadecimal value for an integer value, or the first character in an alphanumeric string.
    • Integer (HEX): Returns an upper-case string containing the hexadecimal value for an integer value, or the first character in an alphanumeric string.
    • Integer (Octal): Returns a string containing the octal value for an integer, or the first character in an alphanumeric string.
    • Floating Point: Returns a string containing a floating point value.
    • Scientific Notation: Returns a string containing a Scientific Notation value.
    • Character: Returns the ASCII character corresponding to an integer value. When supplied with an alphanumeric text string, returns the first character.
    • String: Returns a string containing an integer value.
  • Decimal Places: Selects the number of decimal places for Floating Point or Scientific Notation Data Types. (0 to 6; default = 6)
  • Fixed Width: Each item's string may be configured to be a fixed width.
    • Field Width: Specifies the minimum number of characters contained in each item's string. (1 to 30; default = 8)
    • Pad: If the item's string has fewer characters than the specified Field Width, it is padded in one of the following ways:
      • Leading Spaces: Right justified with leading spaces.
      • Trailing Spaces: Left justified with trailing spaces.
      • Leading Zeros: Right justified with leading zeros.

  • Output String: Displays the Output String. The characters that correspond to the currently highlighted item are bolded. The total character count is displayed. Syntax: <Leading Text (optional)><Label (optional)><Item0><Delimiter (optional)><Item1><Delimiter (optional)>...<Terminator>

Spreadsheet View

The FormatString dialog is used to easily format referenced cell data and generate an Output String that can be sent to a remote device. Within the FormatString dialog, each referenced cell is listed as an individual item. Each item can be formatted by assigning a Label, Data Type, number of Decimal Places, Fixed Width and Pad. In order to format an item, it must first be highlighted in the list. The entire Output String can be formatted by adding Leading Text, Trailing Text, Terminators and Delimiters.

Note:
  • To format multiple, non-consecutive items, hold down the CTRL key and highlight the items.
  • To format multiple, consecutive items, hold down the SHIFT key and highlight the first item, and then the last item, in the list.

Display the Format String Dialog

  1. Select an empty spreadsheet cell.

  2. On the Insert menu, click Function.

  3. From the Insert Function dialog, expand the Text category.

  4. From the right-hand pane, double-click FormatString. For more information, see FormatString(Format-string, [Text or Value, ...]).

Format String Dialog Controls

  • Leading Text: The Output String prefix. The maximum string length is 30 characters.

  • Trailing Text: The Output String suffix. The maximum string length is 30 characters.

  • Terminators: Appends the selected terminator character(s) to the Output String.

    • None: No terminator is appended to the Output String.
    • Line Feed (LF): Appends a line feed to the Output String.
    • Carriage Return (CR): Appends a carriage return to the Output String.
    • Carriage Return and Line Feed (CR+LF): Appends a carriage return and a line feed to the Output String.

  • Use Delimiter: When enabled, the items are delimited. The maximum string length is 1 character.
    • Standard: Allows you to select a standard delimiter: Comma, Space, Tab, Semicolon or Underscore.
    • Other: Allows you to enter a custom, single-character delimiter.

  • Add: Invokes cell selection mode to reference one or more cells. After selecting the cells, the dialog returns and creates one item for each selected cell.

  • Delete: Removes the highlighted item from the item list. If no items are highlighted, the Delete button is disabled.

  • Move Up: Moves the highlighted item up in the item list. If the item is first in the list, the button is disabled.

  • Move Down: Moves the highlighted item down in the item list. If the item is last in the list, the button is disabled.

  • Label: Each item may be assigned a label to help identify it. The maximum string length is 12 characters.

  • Include Label: When enabled, the item's Label is included in the Output String, preceding the item's string.

  • Cell: Each item has an expression. Most of the expressions are cell references. The cells references in the expression are color-coded to match the graphics in the spreadsheet.

    Tip: Placing the cursor in the Cell text box and pressing F4 cycles through the four cell reference types.
  • Data Type: The FormatString dialog automatically determines the Data Type for each item, based on the contents of the referenced cell.
    • Integer: Returns a string containing an integer value.
    • Unsigned Integer: Returns a string containing an unsigned integer value.
    • Integer (hex): Returns a lower-case string containing the hexadecimal value for an integer value, or the first character in an alphanumeric string.
    • Integer (HEX): Returns an upper-case string containing the hexadecimal value for an integer value, or the first character in an alphanumeric string.
    • Integer (Octal): Returns a string containing the octal value for an integer, or the first character in an alphanumeric string.
    • Floating Point: Returns a string containing a floating point value.
    • Scientific Notation: Returns a string containing a Scientific Notation value.
    • Character: Returns the ASCII character corresponding to an integer value. When supplied with an alphanumeric text string, returns the first character.
    • String: Returns a string containing an integer value.
  • Decimal Places: Selects the number of decimal places for Floating Point or Scientific Notation Data Types. (0 to 6; default = 6)
  • Fixed Width: Each item's string may be configured to be a fixed width.
    • Field Width: Specifies the minimum number of characters contained in each item's string. (1 to 30; default = 8)
    • Pad: If the item's string has fewer characters than the specified Field Width, it is padded in one of the following ways:
      • Leading Spaces: Right justified with leading spaces.
      • Trailing Spaces: Left justified with trailing spaces.
      • Leading Zeros: Right justified with leading zeros.
  • Output String: Displays the Output String. The characters that correspond to the currently highlighted item are bolded. The total character count is displayed. Syntax: <Leading Text (optional)><Label (optional)><Item0><Delimiter (optional)><Item1><Delimiter (optional)>...<Terminator>

Closed FormatString Example

In the example below, the ExtractBlobs function is used to find the position and angle of a feature in an image. The FormatString function references this data and returns an Output String that can be sent to a remote device.

  1. Insert an DetectBlobs function into cell A3. A Blobs data structure is returned.

  2. Insert the FormatString function into cell A5. The FormatString dialog automatically opens.

  3. Click the Add button to reference cell(s) containing the appropriate data. For example, highlight cells C3, D3 and E3 cells returned in the Blobs data structure.

  4. Press the ENTER key to accept the referenced cell selection and return to the FormatString dialog. The referenced cells should now be listed, as items, in the dialog. You can add, remove or reorder existing items in the list.

  5. In the Leading Text text box, type ABC.

  6. In the Trailing Text text box, type XYZ.

  7. From the Terminators drop-down list, select CR+LF.

  8. Enable the Delimiter checkbox.

  9. From the Standard Delimiter drop-down list, select Space.

  10. Highlight the first item in the list, referencing cell C3. In the Label text box, type X (to correspond with the Row spreadsheet cell).

  11. Highlight the second item in the list, referencing cell D3. In the Label text box, type Y (to correspond with the Col spreadsheet cell).

  12. Highlight the third item in the list, referencing cell E3. In the Label text box, type Angle (to correspond with the Angle spreadsheet cell).

  13. Holding down the SHIFT key, select the first item in the list and then the last item in the list. All items should be highlighted and can be formatted at once.

  14. Enable the Include Label checkbox.

  15. Ensure the Data Type is Floating Point.

  16. In the Decimal Places entry box, type 3.

  17. Enable the Fixed Width checkbox.

  18. In the Fixed Width text box, type 8.

  19. From the Pad drop-down list, select Leading Zeros.

  20. Click OK to exit the FormatString dialog and return to the spreadsheet. The Output String is displayed in cell A5.


SLMP Scanner Settings Dialog

The SLMP Scanner Settings dialog configures an In-Sight vision system to communicate with a Mitsubishi Automation Controller (PLC, and Motion Controller or Robot Controller).

Note:
  • In this topic, PLC/MC and Robot Controllers are referred as "Automation Controller".
  • The In-Sight 2000 series vision sensor does not support robot controllers.

Display the SLMP Scanner Settings Dialog

Mitsubishi PLC Controllers (iQ-R/Q/L Series, iQ-F Series or FX Series)

  1. From the Network Settings dialog, with the SLMP Scanner Industrial Ethernet Protocols option enabled, click the Settings button.

Mitsubishi Robot Controllers

  1. From the Network Settings dialog, with the Robots option enabled, click the Settings button.

Settings Tab Controls

The Settings tab is used to configure the connection information required to establish a connection between the In-Sight vision system and the Mitsubishi Automation Controllers (PLC/MC and Robot Controller).

Note: Please refer to the MELSEC Communication Protocol Reference Manual for more information on the Mitsubishi network configuration.

  • Controller Type: Specifies the type of Mitsubishi Automation Controller to communicate with.

    Note: Available Controller Types vary, depending on the settings on the Network Settings dialog.

    • PLC/MC: iQ-R/Q/L Series (3E Frame), iQ-F Series (3E Frame) or FX Series (1E Frame). Default = iQ-R/Q/L Series (3E Frame).

      Note: The iQ-F Series (3E Frame) option is not available on the In-Sight vision systems running In-Sight 4.x.x firmware.
    • Robot: CR800-D Series (3E Frame)

  • IP Address: Specifies the IP address of the Automation Controller that will be connected to by the In-Sight vision system.

  • Host Port: Specifies the TCP port number, in decimal (Dec: 1 - 65535) or in hexadecimal (Hex: 1 - FFFF) format, of the SLMP channel that will be used by the Automation Controller (default = 12288 in Dec).

    Note:
    • This value should match the Host Port setting established on the SLMP Port of the Mitsubishi Automation Controller.
    • The format of the Host Port number will be reset to decimal (Dec) when In-Sight Explorer is closed.

  • Timeout (ms): Specifies the timeout (5 to 30000; default = 1000), in milliseconds, for a response from the Automation Controller to an SLMP message.

  • Poll Interval (ms): Specifies the amount of time (5 to 30000; default = 1000), in milliseconds, between successive polls of the Vision Control block on the Automation Controller.

  • Connect to Remote Station: By default, the checkbox is unchecked and the In-Sight vision system is directly connected to the Automation Controller with an Ethernet Module specified by the entered IP Address.
    • When this checkbox is checked and iQ-R/Q/L Series (3E Frame), iQ-F Series (3E Frame) or CR800-D Series (3E Frame) is the selected Controller Type, the Network Number, PC Number and Destination Module controls are enabled.
    • When this checkbox is checked and FX Series (1E Frame) is the selected Controller Type, the PC Number control is enabled.

  • Network Number: Specifies the SLMP network number (0 to 239; default = 0) that will be used to communicate (0 = the local network).

  • PC Number (hex): Specifies the station identifier on the specified network of the destination module in hexadecimal.

    Hex | Description
    0xFF (default) | A direct connect to local station.
    0x7E | The Master station on CC-Link IE field.
    0x1 - 0x78 | A station on the CC-Link IE field network adapter

  • Destination Module: Specifies the identifier of the device module that the vision system will be connected to.

    Identifier | Module Type
    0x3FF (default) | Local Station
    0x3D0 | Control System CPU
    0x3D1 | Standby System CPU
    0x3D2 | System A CPU
    0x3D3 | System B CPU
    0x3E0 | CPU 1
    0x3E1 | CPU 2
    0x3E2 | CPU 3
    0x3E3 | CPU 4

  • Reset button: Press the Reset button to restore the values to the default settings.

  • Test Connection button: The Test Connection button is used to establish a "test" connection between the In-Sight vision system and the Mitsubishi Automation Controller over SLMP. Pressing the Test Connection button will initiate a connection, and an attempt will be made to establish a connection. After 30 seconds, if the connection is not established or goes into an error state before the timeout, an error message will be displayed, indicating an error reported by SLMP.

    Note: If you attempt to apply changes to the SLMP Scanner Settings dialog, but SLMP is not enabled on the vision system, a message will be displayed indicating that the vision system must be restarted to enable SLMP. The vision system must be restarted to enable SLMP.

Device Addressing Tab

The Device Addressing tab is used to configure the Automation Controller device addresses and sizes of the various data blocks that will be communicated from the In-Sight vision system to the Mitsubishi Automation Controller. The Device Type and size of the data blocks vary, depending on the Controller Type (iQ-F/R/Q/L Series or FX Series) defined in the Settings Tab.

  • Name column: Specifies the name (read-only) of the data block that will be communicated to or from the Automation Controller.
  • Selected Device column: Specifies the Automation Controller device that will be used to read or write the data block. The available Automation Controller devices are as follows:

    • PLC/Motion Controllers:

      Controller Type | Device
      iQ-R/Q/L Series | X - Input Relay; Y - Output Relay; M - Internal Relay; L - Latch Relay; F - Annunciator; B - Link Relay; D - Data Register; W - Link Register; R - File Block Register; and ZR - File Register.
      iQ-F Series | X - Input Relay; Y - Output Relay; M - Internal Relay; F - Annunciator; D - Data Register.
      FX Series | X - Input Relay; Y - Output Relay; M - Internal Relay; D - Data Register; R - Extension Register; and S - State Relay.

    • Robot Controllers:

      Controller Type | Device
      CR800-D Robot Controller | D - Data Register
  • Offset column: Specifies an offset within the device table used to read or write the data block. The offset value should be entered in decimal, hexadecimal or octal, depending on the Selected Device type.

    • PLC/Motion Controllers:

      Controller Type Device
      iQ-R/Q/L Series

      • Decimal: M - Internal Relay; L - Latch Relay; F - Annunciator; D - Data Register; R - File Block Register; and ZR - File Register.

      • Hexadecimal: X - Input Relay; Y - Output Relay; B - Link Relay; and W - Link Register.
      iQ-F Series

      • Decimal: M - Internal Relay; F - Annunciator; D - Data Register.

      • Octal: X - Input Relay; Y - Output Relay.
      FX Series
      • Decimal: M - Internal Relay; D - Data Register; R - Extension Register; and S - State Relay.
      • Octal: X - Input Relay; and Y - Output Relay.

    • Robot Controllers:

      Controller Type Device
      CR800-D Robot Controller
      • Decimal: D - Data Register

  • Number of Devices column: Specifies the size of the data block that will be communicated with the Automation Controller. The size is expressed in units of Automation Controller "devices" (either words or bits), and is configurable only for those data blocks that do not have a fixed size, or where the size is automatically set by the referenced FormatInputBuffer or FormatOutputBuffer functions. The maximum data size for the Input Block, Output Block, Command and Command Result varies depending on the selected Controller Type (iQ-R/Q/L Series, iQ-F Series or FX Series).

    • PLC/Motion Controllers

      • iQ-R/Q/L Series

        Name | Selected Device | Offset | Number of Devices | Description
        Control | None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; L - Latch Relay; F - Annunciator; B - Link Relay; D - Data Register; W - Link Register; R - File Block Register; ZR - File Register | 0 - | 32 (read-only) | The starting PLC address of the vision control data block.
        Status | None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; L - Latch Relay; F - Annunciator; B - Link Relay; D - Data Register; W - Link Register; R - File Block Register; ZR - File Register | 32 (read-only) | The starting PLC address of the vision status data block.
        Input Block None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register

        2 devices1 + Input Data length (in words)

        (Maximum: 960 words)

                 The starting PLC address of the inspection results data block.
        Output Block None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register

        5 devices2 + Output Data length (in words)

        (Maximum: 960 words)

                 The starting PLC address of the user data block.
        Command | None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register | 0 - 960 (default = 0) | The starting PLC address of the command string.
        Command Result | None (default); D - Data Register; W - Link Register; R - File Block Register; ZR - File Register | 0 - 960 (default = 0) | The starting PLC address of the command result data.

        1 2 devices (4 bytes/2 words) are used for the Job Load ID and User Length.

        2 5 devices (10 bytes/5 words) are used for the Job ID, Acquisition ID, Inspection ID, Inspection Result Code and Inspection Result Length.

      • iQ-F Series

        Name | Selected Device | Offset | Number of Devices | Description
        Control | None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; F - Annunciator; D - Data Register | 0 - | 32 (read-only) | The starting PLC address of the vision control data block.
        Status | None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; F - Annunciator; D - Data Register | 32 (read-only) | The starting PLC address of the vision status data block.
        Input Block None (default); D - Data Register

        2 devices1 + Input Data length (in words)

        (Maximum: 960 words)

                 The starting PLC address of the inspection results data block.
        Output Block None (default); D - Data Register

        5 devices2 + Output Data length (in words)

        (Maximum: 960 words)

                 The starting PLC address of the user data block.
        Command | None (default); D - Data Register | 0 - 960 (default = 0) | The starting PLC address of the command string.
        Command Result | None (default); D - Data Register | 0 - 960 (default = 0) | The starting PLC address of the command result data.

        1 2 devices (4 bytes/2 words) are used for the Job Load ID and User Length.

        2 5 devices (10 bytes/5 words) are used for the Job ID, Acquisition ID, Inspection ID, Inspection Result Code and Inspection Result Length.

      • FX Series

        Name | Selected Device | Offset | Number of Devices | Description
        Control | None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; D - Data Register; R - Extension Register; S - State Relay | 0 - | 32 (read-only) | The starting PLC address of the vision control data block.
        Status | None (default); X - Input Relay; Y - Output Relay; M - Internal Relay; D - Data Register; R - Extension Register; S - State Relay | 32 (read-only) | The starting PLC address of the vision status data block.
        Input Block None (default); D - Data Register; R - Extension Register

        2 devices1 + Input Data length (in words)

        (Maximum: 64 words)

                 The starting PLC address of the inspection results data block.
        Output Block None (default); D - Data Register; R - Extension Register

        5 devices2 + Output Data length (in words)

        (Maximum: 64 words)

                 The starting PLC address of the user data block.
        Command | None (default); D - Data Register; R - Extension Register | 0 - 64 (default = 0) | The starting PLC address of the command string.
        Command Result | None (default); D - Data Register; R - Extension Register | 0 - 64 (default = 0) | The starting PLC address of the command result data.
        1 2 devices (4 bytes/2 words) are used for the Job Load ID and User Length.

        2 5 devices (10 bytes/5 words) are used for the Job ID, Acquisition ID, Inspection ID, Inspection Result Code and Inspection Result Length.
    • Robot Controllers

      • CR800-D Series

        Name | Selected Device | Offset | Number of Devices | Description
        Control | None (default); D - Data Register | 0 - | 32 (read-only) | The starting Robot Controller address of the vision control data block.
        Status | None (default); D - Data Register | 32 (read-only) | The starting Robot Controller address of the vision status data block.
        Input Block None (default); D - Data Register

        2 devices1 + Input Data length (in words)

        (Maximum: 960 words)

                 The starting Robot Controller address of the inspection results data block.
        Output Block None (default); D - Data Register

        5 devices2 + Output Data length (in words)

        (Maximum: 960 words)

                 The starting Robot Controller address of the user data block.
        Command | None (default); D - Data Register | 0 - 960 (default = 0) | The starting Robot Controller address of the command string.
        Command Result | None (default); D - Data Register | 0 - 960 (default = 0) | The starting Robot Controller address of the command result data.

        1 2 devices (4 bytes/2 words) are used for the Job Load ID and User Length.

        2 5 devices (10 bytes/5 words) are used for the Job ID, Acquisition ID, Inspection ID, Inspection Result Code and Inspection Result Length.
Note:
  • If a data block's Selected Device parameter is set to None, the data block will not be communicated to or from the Automation Controller.
  • The TN and CN device types are not supported because the input and output data blocks are communicated inline with the control and status word data.
  • The iQ-R/Q/L series, iQ-F series and CR800-D Series can handle most message frame formats currently available (3E frame). However, the FX Series can only handle the first generation of the protocol message frame (1E frame), and the amount of data that can be transmitted in a packet is limited.

Maximum Data Size

 | iQ-R/Q/L Series, iQ-F Series and CD800-D Series | FX Series
Batch Read Bits | 7904 bits | 256 bits
Batch Read Words | 960 words | 64 words
Batch Write Bits | 7904 bits | 160 bits
Batch Write Words | 690 words | 64 words


Modbus TCP Server Settings Dialog

The Modbus TCP Server Settings dialog configures an In-Sight vision system to act as a Modbus/TCP server.

Modbus TCP Server Settings Dialog Controls

To display the Modbus TCP Server dialog, click Network Settings from the Sensor menu. From the Network Settings dialog, with the Modbus TCP Server option enabled, press the Settings button.

  • Max Connections: Specifies the maximum number of simultaneous connections the vision system will support. (1 to 6 connections; default = 4)
  • Idle Timeout: Specifies the amount of time since the last issued Modbus/TCP request was received by the server from a client before that session is declared as idle. (0 to 3600 seconds; default = 120 seconds) The Modbus/TCP server checks all connected sessions every 500ms to determine if any session idle time limits have been reached. For all idle sessions, the Modbus/TCP server issues a socket close command and reclaims any resources allocated to the idle session.
  • Enable User Data Bypass: Check this checkbox to bypass the cached data and read the raw user data directly. By default, this setting is disabled.
Note: Note: The Enable User Data Bypass option is only available on In-Sight vision systems running In-Sight firmware 5.4.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.


Multiple View Connections with VisionView

When the In-Sight vision system has VisionView-only connections, up to 5 VisionView applications can be connected. When the vision system has both VisionView and In-Sight Explorer connections, one In-Sight Explorer application and up to 4 VisionView applications can be connected.

Note:

The following firmware and software versions are required to use the Multiple View Connections feature:

  • In-Sight vision system running firmware version 5.6.0 or later
  • VisionView application software version 1.6.3 or later

Set the Maximum View Connections

  1. From the Sensor menu, open the HMI Settings dialog.

  2. Specify the Maximum View Connections setting to configure the number of VisionView® applications allowed to be connected to the In-Sight vision system or sensor.

    Note:
    • In order to utilize the Multiple View Connections feature on the VisionView application, it must be upgraded to version 1.6.3. However, the VisionView 700 Operator Interface Panel does not support VisionView 1.6.3.
    • When the Maximum View Connections setting is set to 2 or more, additional image buffers are automatically allocated to the In-Sight vision system. For example, when the Maximum View Connections setting is set to 2 and the Image Buffers setting on the Image Buffers dialog is set to 3, 5 image buffers are allocated to the vision system. If the total number of image buffers exceeds the maximum number of image buffers available on the vision system, the maximum number of image buffers is allocated to the vision system.
    • Increasing the number of view connections will decrease the amount of RAM available for other tasks, such as loading jobs and acquiring images, and may degrade performance.

Connect Multiple Applications to an In-Sight Vision System

There are two types of view connections when 2 or more applications are connected to an In-Sight vision system: Standard View Connection and View Only Connection.

  • Standard View Connection: Allows any type of access privileges (Full, Protected or Locked). Typically, this connection is used by an application that performs various run mode actions such as editing interactive controls, placing the vision system Online/Offline, loading a new job or triggering the vision system (= Full or Protected Access level). Only one application can use this connection.

    Note: When the Maximum View Connections setting is set to 1, the standard view connection is used.

  • View Only Connection: Allows only Locked access privileges. With this connection, the application can only view the operation of the vision system. All interactive controls are disabled, and the filmstrip and buttons such as Trigger, Online/Offline, Focus, etc. are hidden. This connection is only used on VisionView.

    Note:
    • On VisionView, the Sensor User Name field on the Sensor Settings screen is used to configure the connection user name. If the connection user name is left as <default> or empty, VisionView automatically selects "admin", the default user name, and has a Full Access level.
    • Available VisionView Run Mode actions vary depending on the operator controls that are enabled on each VisionView.
    • For more information on VisionView, refer to the VisionView Help® file.

VisionView Only Connections

Note: The examples and illustrations in this section assume that only VisionView applications are connected to an In-Sight vision system, and the Maximum View Connections setting is set to 5.

  1. When multiple VisionView applications are connected to an In-Sight vision system, only one VisionView can have the standard view connection. The rest of VisionView applications have the view only connections. In the following illustration, VisionView 1 has the standard view connection (green). VisionView 2 - 5 have the view only connection (red).

  2. If two or more VisionView applications with Full or Protected privileges attempt to establish the standard view connection to the vision system, the first connected VisionView application has the standard view connection.

    In the following illustration, VisionView 1 has already established the standard view connection with Full or Protected privileges (green). VisionView 2 attempts to connect to the vision system with the standard view connection, however the connection is automatically converted to the view only connection with Locked privileges (red).

    Once converted, on VisionView 2, the Force Connection button as well as the "View Only" banner are displayed. Meanwhile, interactive controls are disabled, the filmstrip and buttons such as Trigger, Online/Offline, Focus, etc. are hidden.

    Note:
    • To display the Force Connection button, the Force Connection checkbox on the Operator Controls screen must be checked.
    • The Force Connection button is displayed when the standard view connection with Full or Protected privilege is converted to the view only connection with Locked privileges. If VisionView has a Locked Access level, the Force Connection button will not be displayed.

  3. Press the Force Connection button on VisionView 2 to reestablish the standard view connection to the vision system. Once reestablished, VisionView 2 will have Full or Protected privileges, and can perform various run mode actions. Meanwhile, VisionView 1's connection is automatically converted to the view only connection with Locked privileges.

    Note: The Force Connection button is also displayed when VisionView fails to connect to an In-Sight vision system because the maximum number of applications are already connected. In this scenario, by pressing the Force Connection button, VisionView reestablishes the standard connection to the vision system. Meanwhile, other VisionView is disconnected from the vision system.

VisionView and In-Sight Explorer Connections

Note: The examples in this section assume that both VisionView and In-Sight Explorer are connected to the same In-Sight vision system.

  1. When both the VisionView applications and the In-Sight Explorer application are connected to the same In-Sight vision system, In-Sight Explorer always has the standard view connection. All VisionView applications have the view only connection.

    Note: Only one In-Sight Explorer application can be connected to the vision system at a time.

  2. When In-Sight Explorer is already connected to the vision system, if a VisionView application attempts to establish the standard view connection with Full or Protected privileges, the connection is automatically converted to the view only connection with Locked privileges.

    Once converted, the Force Connection button as well as the "View Only" banner are displayed on the VisionView application. Meanwhile, interactive controls are disabled, the filmstrip and buttons such as Trigger, Online/Offline, Focus, etc. are hidden.

    Note:
    • To display the Force Connection button, the Force Connection checkbox on the Operator Controls screen must be checked.
    • The Force Connection button is displayed when the standard view connection with Full or Protected privilege is converted to the view only connection with Locked privileges. If VisionView has a Locked Access level, the Force Connection button will not be displayed.

  3. Press the Force Connection button on the VisionView application to reestablish the standard view connection to the vision system. Once reestablished, the VisionView application will have Full or Protected privileges, and can perform various run mode actions. Meanwhile, In-Sight Explorer is automatically disconnected from the vision system.

    Note: The Force Connection button is also displayed when VisionView fails to connect to an In-Sight vision system because the maximum number of applications are already connected. In this scenario, by pressing the Force Connection button, VisionView reestablishes the standard connection to the vision system. Meanwhile, other VisionView is disconnected from the vision system.


DHCP Server

Dynamic Host Configuration Protocol (DHCP) Server

Determines whether In-Sight devices that support Ethernet configuration use DHCP (Dynamic Host Configuration Protocol) on startup. Select this option only if a DHCP server is running on the local network. If this checkbox or button is cleared, then the values in the Network Settings dialog or the Add Sensor/Device to Network dialog are used to configure TCP/IP.

Note: In the Network Settings dialog, when the Use DHCP Server checkbox is enabled, you can specify a DHCP Timeout. If a DHCP server does not respond within the specified time, the sensor will boot without network support enabled.

In a production environment, use static IP addresses; this eliminates the need for a DHCP server on the local network and prevents intermittent DHCP traffic.


DNS Server

Domain Name Service (DNS) Server

Host devices on the same network have unique IP address numbers, but a common part of the address is shared by all hosts on the same domain (e.g., yourdomain.com). These numbers can be difficult to remember, so each host is usually assigned a host name to serve as an "alias" for its IP address. A DNS server translates these host names back into IP addresses that can be understood on the network.

For example, if an In-Sight sensor with the IP address 192.168.1.2 is named "PRODUCTION2", the DNS server knows that PRODUCTION2 actually refers to the In-Sight host at the specified address. The DNS Server field determines which host is contacted (by its IP address) to resolve the translation of host names to IP addresses within the specified domain.


Domain

About Domains

A domain is a group of devices on a network that share a common part of their IP addresses. A Fully Qualified Domain Name (FQDN) consists of a host name and a domain name, including a top-level domain. For example, www.yourdomain.com is a fully qualified domain name: "www" is the host, "yourdomain" is the second-level domain and ".com" is the top level domain.

An In-Sight sensor must have an FQDN to be configured or monitored through an In-Sight sensor or In-Sight emulator that is not part of the local network. The string entered in the Domain Name field of the Network Settings dialog or the Add Sensor/Device to Network dialog is appended to the string entered in the Host Name field to create an FQDN.

When the Use DHCP Server checkbox is selected, the domain field is shaded and displays the value assigned by the DHCP server.

FQDN Example

Consider a local domain named yourdomain.com:

If an In-Sight sensor's host name is is8402_010203, the FQDN for lookup is: is8402_010203.yourdomain.com


Dynamic IP Address

In-Sight devices that support Ethernet configuration can be set to obtain an IP address dynamically if a DHCP server is available. In this case, any In-Sight Ethernet device can send out a request and receive its network settings (such as an IP address, DNS server, subnet mask, gateway and domain name) automatically. When a large number of devices are present, this setup is often preferred to entering network settings manually for every device. After initial setup, disabling DHCP on the device(s) and assigning a static IP address is strongly recommended because it prevents intermittent DHCP traffic.


Internet Protocol

Internet Protocol (IP) Address

An IP address uniquely identifies a host on a network. IP addresses belong to one of three types, or classes. The class is generally determined by the number of subnets, and the number of hosts operating on those subnets.

Network Class | Maximum Number of Networks (or subnets) | Maximum Number of Hosts
A | 127 | 16,000,000
B | 16,000 | 65,000
C | 2,000,000 | 254

Like any other host on the network, the IP addresses given to In-Sight sensors must comply with the addressing scheme in effect on an existing network. See your network administrator for the addressing scheme used on your network.

If the network has been created specifically for In-Sight, then the user must choose the network class and assign IP addresses accordingly. The following IP addressing schemes can be used:

Network Class | IP Address Range | Default Subnet Mask
A | 10.0.0.1 to 10.255.255.254 | 255.0.0.0
B | 172.16.0.1 to 172.31.255.254 | 255.255.240.0
C | 192.168.0.1 to 192.168.255.254 | 255.255.0.0

Most In-Sight users will want to configure a Class C network.


Image Editor

The Image Editor allows users to edit individual instances of a font character. The currently selected Instance of a character Model is displayed in the Image Editor. The following buttons allow single-click access to common tasks.

Note: Only the binary character model can be edited; greyscale character instances are read-only.

 Saves the character instance into the active Font. If a character has been edited without being saved, you will be prompted to save (or discard) the changes when you change the selected character or exit the dialog.

Undo the last action.

Redo the last action.

When the Normal (Pointer) icon is selected, as the mouse is scrolled over the image, the greyscale value is returned for each pixel.

Zoom-to-Region: Create a dotted rectangle around an image region and zoom in; the user-defined rectangle zooms to fill the entire image area. When creating the rectangle, the initial location of the cursor will be the center of the rectangle. Once the maximum zoom is reached, Zoom-to-Region is disabled. CTRL+Left-click the mouse and drag the [image] cursor, to define the region. When the button is released, region is zoomed. To exit, release the CTRL key; the cursor will return to the Normal [image] cursor.

Pan the zoomed image: SHIFT+CTRL+Left-click the mouse and drag the [image] cursor. To exit, release the SHIFT+CTRL keys; the cursor will return to the Normal [image] cursor.

Click on a pixel to select the color (black or white) for subsequent drawing operations. Once a value is selected, the mode automatically changes to the previous drawing selection (thin or thick). The color selected will be indicated by the radio button selected (either Draw Black or Draw White).

Note: Selecting outside of the image area is ignored.

Draws a one-pixel thick line, using the color selected by the Eyedropper .

Draws a three-pixel thick line, using the color selected by the Eyedropper or by selecting Draw Black or Draw White.

Increase the level of magnification.

Decrease the level of magnification.

Set the zoom ratio to 1:1. The image will represent a 1:1 pixel mapping between the image and your display resolution.

Fit the image to the display. The image will automatically scale to be maximally displayed behind the spreadsheet, with the entire image visible. The image's original aspect ratio is maintained; some empty (grey) space may exist around the image.

Cancels the action.


POWERLINK Settings Dialog

Configures the Node ID of the In-Sight vision system for POWERLINK communications, when configuring the POWERLINK Industrial Ethernet Protocol.

  1. In the Network Settings dialog, from the Industrial Ethernet Protocols drop-down, select POWERLINK.

  2. Press the Settings... button to the right of the POWERLINK selection, to launch the POWERLINK Settings dialog.

  3. Specify the Node ID (1-239; default = 1) for the In-Sight vision system on the POWERLINK network. Every device on the POWERLINK network is identified by a Node ID, which is combined with the fixed ID subnet of 192.168.100<NodeID> to give each device on the network a fixed IP address within the POWERLINK network.

    The Node ID, together with the POWERLINK network’s NAT IP address, can be used to communicate with other devices outside of the POWERLINK network. For example, the default NAT IP address is 192.168.101.0. To communicate with an In-Sight vision system with a Node ID of 26, combine the NAT IP address with the Node ID: 192.168.101.26.


PROFINET Settings dialog

The PROFINET Settings dialog configures an In-Sight vision system to communicate with a Siemens PLC.

To display the PROFINET Settings dialog:

  1. In the Network Settings dialog, from the Industrial Ethernet Protocols drop-down, select PROFINET.

  2. Press the Settings button to the right of the PROFINET selection, to launch the PROFINET Settings dialog.

    Note: Note: The Enable User Data Bypass option is only available on In-Sight vision systems running In-Sight firmware 5.4.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.

PROFINET Settings Dialog Controls

  • Enable PROFINET Station Name: This checkbox determines whether the Vision System's host name or station name is used with the PROFINET protocol. By default, this setting is disabled.
  • Station Name: Specifies the name of the Vision System used with the PROFINET protocol. The maximum length of the station name is 239 characters. The station Name of Station field syntax should meet the following rules:
    • 1 or more labels, separated by a period (.).
    • otal length between 1 and 239 characters.
    • otal label length between 1 and 63 characters.
    • Labels may consist of the following character types - a-z, 0-9.
    • Labels may not start with a hyphen-minus character (-).
    • Labels may not end with a hyphen-minus character (-).
    • he first label may not start with "port-xyz" or "port-xyz-abcde" where "a, b, c, d, e, x, y or z" equal "0 through 9".
    • he station name may not have the form: "n.n.n.n", where "n" = 0 through 999.
    • Labels only start with "xn-" if RFC 3490 is applied.
  • Enable User Data Bypass: Check this checkbox to bypass the cached data and read the raw user data directly. By default, this setting is disabled.


Record/Playback Options Dialog: EasyBuilder View

The Record/Playback Options dialog allows you to adjust record and playback settings for individual vision systems and emulators. After configuring the dialog settings, you can record and play back acquired images that are stored in the specified Record Folder and Playback Folder, located on the PC.

Note:
  • Use the Record Defaults panel to adjust record and playback settings for multiple vision systems prior to the first execution of the Record option. For more information, see Options Dialog.
  • After the first execution of the Record option, changes made in the Record Defaults panel are not reflected in the Record/Playback Options dialog unless you select Restore Defaults from the Record/Playback Options dialog for the active vision system or emulator.
  • In-Sight Color vision systems do not support recording quarter resolution images. If a Color vision system is configured to record images at quarter resolution in the Record/Playback Options dialog, the image that is recorded will actually be recorded at half resolution.
  • The Record/Playback Options dialog does not support the SD Card installed to the vision system.

Display the Record/Playback Options Dialog

Do one of the following:

  • On the Image menu, click Record/Playback Options.
  • Click the Record/Playback Options button [image] on the EasyBuilder toolbar.
  • Press CTRL+T.
  • Click Load Images from PC in the Set Up Image settings pane.
  • Click Playback in the Filmstrip settings pane.

Record Tab Controls

  • Record Folder: A user-specified directory for storing recorded images.

    Note: The Good and Bad Folders are created as subdirectories of the Record Folder.
  • Image Count: If Do Not Sort (Record All to Record Folder) is selected, Image Count displays the number of images currently stored in the Record folder. If Do Not Sort (Record All to Record Folder) is not selected, Image Count displays the number of images currently stored in the Good/Bad folders.
  • Filename Format: The filename format and file type of recorded images.
    • Prefix: The filename prefix of recorded images.
    • Format: The filename format of recorded images. Format options are: [Index] and [DateTime].
    • File Type: The file type of recorded images. File Type options are: Bitmap files (*.bmp) and JPEG files (*.jpg).
    • Example: Displays an example of the naming convention of recorded image files based on the Filename Format options currently selected in the Format and File Type drop-down lists.
  • Maximum Images: The maximum number of images stored in the Record Folder. (1 - 10,000; default = 10,000)

  • Image Resolution: Specifies the In-Sight vision system resolution while recording images. The vision system resolution is restored to its original settings, configured in the Image Settings dialog, once recording is complete. Resolution options are: Full, Half, Quarter and Eighth resolution for stored images; the default resolution is Full. For more information, see Image Settings Dialog.

    Note:
    • If the vision system does not support Full resolution, this option is not available from the drop-down list.
    • This setting only applies while the vision system is Online. All images recorded while the vision system is Offline are recorded at full resolution.
    • The Eighth resolution option is not supported for color vision systems.

  • Bit Depth: Specifies the bit depth for recorded images (16 bit or 24 bit; default = 24 bit.

    Note:
    • This option is only available on Color In-Sight vision systems.
    • JPEG (*.jpg) images are always recorded at 24-bit depth. If 16-bit depth is necessary, record the images as Bitmap files (*.bmp).

  • Clear Record Folder: Opens the Clear Recorded Images dialog, allowing you to choose to delete images from the Record Folder, Good Folder and Bad Folder.

    Note: If the Record Folder and the Playback Folder are the same, selecting Record Folder also deletes all Playback Folder images.

  • Clear Good/Bad Folders: Opens the Clear Recorded Images dialog, allowing you to delete images from the Record Folder, Good Folder and Bad Folder.

    Note: If the Record Folder and the Playback Folder are the same, selecting Record Folder also deletes all Playback Folder images.
  • Pass/Fail Sort: Sort images based on the job's overall pass/fail status.
    • Do Not Sort (Record All to Record Folder): Records all images to the Record folder. Pass/fail sort is not enabled.
    • Record Pass Images to Good Folder: Records pass images to the Good folder.
    • Record Fail Images to Bad Folder: Records fail images to the Bad folder.
    • Sort on Pass/Fail (Record to Good/Bad Folders): Sorts and records pass and fail images to the Good and Bad folders, respectively.
  • Always Show this Dialog Before Record/Playback: Select this checkbox to open the Record/Playback Options dialog before recording or playing back images.
  • Restore Defaults: Resets the Record Folder, Maximum Images, Image Resolution and Filename Format settings to match the current settings in the Record Defaults panel in the Options dialog. Restores the remaining Record tab and Playback tab settings to their original defaults. For more information, see Record Defaults Panel.

Playback Tab Controls

  • Playback Folder: A user-specified directory where recorded images are stored for playback.
  • Image Count: Displays the number of images currently stored in the Playback Folder.

  • Playback Mode: Determines how images are displayed when Play is clicked from the Image menu or the EasyBuilder toolbar. Images are played back in alphabetical and then numerical order. If Play is selected after playback of images has been paused, selecting Play resumes playback with the last displayed image. Select First Image from the Image menu or Play First from the Record/Playback toolbar to start playback from the beginning.

    Note: To allow the playback of images when a vision system is in Online mode, the Trigger parameter in the Set Up Image step must be set to External, Manual or Network.
  • Continuous: Images stored in the Playback Folder are continuously displayed.
  • Single Pass: Images stored in the Playback Folder are displayed a single time.
  • Time Delay: The time delay between images during playback. (0 - 60 seconds; default = 0.5)
  • Always Show this Dialog Before Record/Playback: Select this checkbox to open the Record/Playback Options dialog before recording or playing back images.
  • Restore Defaults: Resets the Record Folder, Maximum Images, Image Resolution and Filename Format settings to match the current settings in the Record Defaults panel in the Options dialog. Restores the remaining Record tab and Playback tab settings to their original defaults. For more information, see Record Defaults Panel.


Record/Playback Options Dialog: Spreadsheet View

The Record/Playback Options dialog allows you to adjust record and playback settings for individual vision systems and emulators. After configuring the dialog settings, you can record and play back acquired images that are stored in the specified Record Folder and Playback Folder, located on the PC.

Note:
  • Use the Record Defaults panel to adjust record and playback settings for multiple vision systems prior to the first execution of the Record option. For more information, see Options Dialog.
  • After the first execution of the Record option, changes made in the Record Defaults panel are not reflected in the Record/Playback Options dialog unless you select Restore Defaults from the Record/Playback Options dialog for the active vision system or emulator.
  • The Record/Playback Options dialog does not support the SD Card installed to the vision system.

Display the Record/Playback Options Dialog

  • On the Image menu, click Record/Playback Options (alternately, click the Record/Playback Options button [image] on the Record/Playback toolbar, or press CTRL+T).

Record Tab Controls

  • Record Folder: A user-specified directory for storing recorded images.

    Note: The Good and Bad Folders are created as subdirectories of the Record Folder.
  • Image Count: If Do Not Use Watch Cell (Record All to Record Folder) is selected, Image Count displays the number of images currently stored in the Record Folder. If Do Not Use Watch Cell (Record All to Record Folder) is not selected, Image Count displays the number of images currently stored in the Good/Bad Folders.
  • Filename Format: The filename format and file type of recorded images.
    • Prefix: The filename prefix of recorded images.
    • Format: The filename format of recorded images. Format options are: [Index] and [DateTime].
    • File Type: The file type of recorded images. File Type options are: Bitmap files (*.bmp) and JPEG files (*.jpg).
    • Example: Displays an example of the naming convention of recorded image files based on the Filename Format options currently selected in the Format and File Type drop-down lists.
  • Maximum Images: The maximum number of images stored in the Record Folder. (1 - 10,000; default = 10,000)

  • Image Resolution: Specifies the In-Sight vision system resolution while recording images. The vision system resolution will be restored to its original settings, configured in the Image Settings dialog, once recording is complete. Resolution options are: Full, Half , Quarter and Eighth resolution for stored images; the default resolution is Full. For more information, see Image Settings Dialog.

    Note:
    • If the vision system does not support Full resolution, this option will not be available from the drop-down list.
    • The Eighth resolution option is not supported for color vision systems.

  • Bit Depth: Specifies the bit depth for recorded images (16 bit or 24 bit; default = 24 bit.

    Note:
    • This option is only available on Color In-Sight vision systems.
    • JPEG (*.jpg) images are always recorded at 24-bit depth. If 16-bit depth is necessary, record the images as Bitmap files (*.bmp).

  • Clear Record Folder: Opens the Clear Recorded Images dialog, allowing you to choose to delete images from the Record Folder, Good Folder and Bad Folder.

    Note: If the Record Folder and the Playback Folder are the same, selecting Record Folder also deletes all Playback Folder images.

  • Clear Good/Bad Folders: Opens the Clear Recorded Images dialog, allowing you to choose to delete images from the Record Folder, Good Folder and Bad Folder.

    Note: If the Record Folder and the Playback Folder are the same, selecting Record Folder also deletes all Playback Folder images.

  • Watch Cell Sort: Sort images based on the Watch Cell value.

    Note: There are three watch cells (Job Pass/Fail cell, Filmstrip Watch cell and Record/Playback watch cell) with similar effects in In-Sight. All three watch cells can be set independently, and control different functionality.
    • Do Not Use Watch Cell (Record All to Record Folder): Records all images to the Record Folder. The Watch Cell is not enabled.
    • Record Nonzero Values to Good Folder: If the Watch Cell contains a numeric value that is not equal to zero during image acquisition, the image is sorted to the Good Folder. If the Watch Cell contains a numeric value that is equal to zero or contains #ERR, the image is not recorded.
    • Record Zero or #ERR Values to Bad Folder: If the Watch Cell contains a numeric value that is equal to zero or contains #ERR during image acquisition, the image is sorted to the Bad Folder. If the Watch Cell contains a numeric value that is not equal to zero or #ERR, the image is not recorded.
    • Sort on Value (Record to Good/Bad Folders): If the Watch Cell contains a numeric value that is not equal to zero during acquisition, the image is sorted to the Good Folder. If the Watch Cell contains a numeric value that is equal to zero or contains #ERR during image acquisition, the image is sorted to the Bad Folder.
    • Watch Cell: Displays the Watch Cell that is being monitored.
    • Select Cell: Clicking Select Cell invokes cell selection mode, allowing you to reference a Watch Cell to determine if an image should be sorted to the Good or Bad folder.
  • Always Show this Dialog Before Record/Playback: Select this checkbox to open the Record/Playback Options dialog before recording or playing back images.
  • Restore Defaults: Resets the Record Folder, Maximum Images, Image Resolution and Filename Format settings to match the current settings in the Record Defaults Panel. Restores the remaining Record tab and Playback tab settings to their original defaults.

Playback Tab Controls

  • Playback Folder: A user-specified directory where recorded images are stored for playback.
  • Image Count: Displays the number of images currently stored in the Playback Folder.

  • Playback Mode: Determines how images are displayed when Play is selected from the Image menu or the Record/Playback toolbar. Images are played back in alphabetical and then numerical order. If Play is selected after playback of images has been paused, selecting Play resumes playback with the last displayed image. Select First Image from the Image menu or Play First from the Record/Playback toolbar to start playback from the beginning.

    Note: To allow the playback of images when a vision system is in Online mode, the Trigger parameter of the AcquireImage function must be set to External, Manual or Network.
    • Continuous: Images stored in the Playback Folder are continuously displayed.
    • Single Pass: Images stored in the Playback Folder are displayed a single time.
  • Time Delay: The time delay between images during playback. (0 - 60 seconds; default = 0.5)
  • Always Show this Dialog Before Record/Playback: Select this checkbox to open the Record/Playback Options dialog before recording or playing back images.
  • Restore Defaults: Resets the Record Folder, Maximum Images, Image Resolution and Filename Format settings to match the current settings in the Record Defaults Panel. Restores the remaining Record tab and Playback tab settings to their original defaults.


Run As Dialog

The Run As dialog allows Standard Users to write to certain areas of the registry that require Administrator privilege. If you are logged into Windows as a Standard User, you are not allowed to write to the registry. However, when using the In-Sight Explorer, writing to the registry is required when entering the Offline Programming Key or changing the Start at Windows Log On option. In such cases, when the User Account Control (UAC) is disabled, the Run As dialog will be displayed and allow you to write to the registry by providing Administrator credentials.

Note:
  • Under the following conditions, Window's Run As dialog will be displayed when attempting to enter the Offline Programming Key or change the Start at Windows Log On option. Provide the Administrator credentials to continue the operation.
    • When using Windows 7/Windows 10, logged into Windows as a Standard User and the User Account Control (UAC) is enabled.
  • If you are using Windows 7/Windows 10, logged into Windows as an Administrator and the User Account Control (UAC) is enabled, the Allow/Deny dialog will be displayed when attempting to enter the Offline Programming Key or change the Start at Windows Log On option. Select Deny to continue the operation.
  • The following default folder locations were moved to new locations to allow Standard User access (these folders are also now accessible from the Start Menu in In-Sight Explorer 4.5.0 and later):

    • Folders | In-Sight Explorer 4.4.x and earlier | In-Sight Explorer 4.5.0 and later
Sample Jobs | C:\Program Files\Cognex\In-Sight\In-Sight Explorer x.x.x\Sample Jobs | Windows 7/Windows 10: C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Explorerx.x.x
Sample Projects | C:\Program Files\Cognex\In-Sight\In-Sight Explorer x.x.x\Sample Projects | Windows 7/Windows 10: C:\Users\Public\Documents\Cognex\In-Sight Sample Projects x.x.x

Run As Dialog Controls

  • Domain: Specifies the network domain.

  • Username: Specifies the Username that belongs to the Administrator.

  • Password: Specifies the password for the Username.

    Note: Once the valid Administrator credentials are provided, the status is in effect until exiting In-Sight Explorer.


Configuring an EasyView

If using an HMI application, you can create an EasyView to customize how data is displayed and to determine if the data is editable by the operator. First, create the EasyView in EasyBuilder and save it with the sensor's job. Then, preview the EasyView using the VisionView PC Demo application, or the Web HMI application to ensure it is configured correctly.

To configure an EasyView:

  1. From the Communications group box, select EasyView.
  2. From the Selected EasyView Items section, press the Add button to launch the Select EasyView Items dialog.

  3. The Select EasyView Items dialog contains the data from any Location or Inspection Tools that were added to your job, as well as acquisition and job settings. From the dialog, select the appropriate tool data that you want to include in the EasyView, by either highlighting the desired items and then pressing the Add button, or check the EasyView checkbox of the item.

    Note:
    • To select multiple, non-consecutive items, hold down the CTRL key and highlight the items.
    • To select multiple, consecutive items, hold down the SHIFT key and highlight the first item, and then the last item, in the list.

  4. Once you have selected your desired tool data, click the OK button to accept your changes. The tool data is now displayed in the Selected EasyView Items section.

    Note:
    • To select multiple, non-consecutive items, hold down the CTRL key and highlight the items.
    • To select multiple, consecutive items, hold down the SHIFT key and highlight the first item, and then the last item, in the list.

  5. After you have added your tool data, optionally enable the Editable checkbox to allow the operator to modify the tool data from VisionView.

    Note: The tool data must have read-write permissions to be editable from VisionView.
  6. Optionally, press the Insert Label button to create a header label. Labels are a useful way to group tool data.
  7. The Caption is the name that is displayed from the HMI application. You can modify the default Caption by clicking within the Caption field of the tool data or label, and entering a descriptive name. Hit the ENTER key or click outside of the Caption field to commit the change; press the ESCAPE key to cancel the change.
  8. Rearrange the way the tool data and/or labels are displayed by selecting them from the list and clicking either the Up or Down buttons to set the desired order.

  9. Save the job file.

    Note: The EasyView settings are also automatically saved to the In-Sight sensor upon leaving the Communication step.

  10. To preview how the EasyView will be displayed l, launch the VisionView PC Demo application or the Web HMI.

    Note: If the VisionView PC Demo is installed to your PC, the default installation directory is: C:/Program Files/Cognex/VisionView/PC Demo x.x.x. If the VisionView PC Demo is not installed to your PC, you can download the application from the VisionView support site.
  11. Once the VisionView PC Demo or the Web HMI is launched, disconnect from the sensor in the Get Connected step.

  12. If you use the Web HMI, you can preview the EasyView in the EasyView pane. For more information, see EasyView Pane.

    In you use the VisionView PC Demo, add your sensor to the Selected Sensors list, enter Run Mode and click the Switch View button to preview the EasyView.

    Note:
    • To preview an EasyView, you must enable the EasyView options in the HMI View Selection dialog first. For more information, see HMI View Selection Dialog.
    • The VisionView PC Demo has an automatic timeout of forty-five minutes. To purchase a licensed version that provides complete functionality and does not timeout, install the VisionView PC Software, which is available for download on the VisionView support site.
    • The look-and-feel of the VisionView PC Demo application will be slightly different than that of the VisionView Operator Interface Panel.
    • To preview an EasyView while logged onto an emulator, you must first manually add the emulator to the Selected Sensors list in the VisionView application.


Results Table

The Results Table, viewable in the EasyBuilder View's Run Job step, displays information about each tool in the active job, allowing you to monitor or troubleshoot the tools as the job runs.

For each tool, the Results Table displays its pass/fail status, tool icon, name, type, result, pass total and fail total as well as the amount of time, in milliseconds, needed to run the tool.

Note:

The Result column shows the following results.

In-Sight Models | Results
In-Sight 2000-110, 2000-120 & 2000-120C Vision Sensors | Pass/Fail status
In-Sight 2000-130 & 2000-130C Vision Sensors | Measurement and Counting Inspection tools: Standard Results (Numeric Data) Other tools (including Location tools): Pass/Fail status
In-Sight Vision Systems and In-Sight 2000 Series 23X Sensors (23M, 230) | Standard Results

In addition, when a tool is selected in the table, the dependent relationships among the selected tool (highlighted in orange) and other tools in the job are displayed, allowing you to determine if a tool failure is related to the failure of another tool. A dependency exists when a tool references another tool. Each dependency consists of two parts: a precedent and a dependent, which are connected by a line. The precedent refers to the source of the data (that is, the tool providing the input) and is represented by a circle; the dependent is the destination of the data (that is, the tool receiving the output) and is represented by an arrow. Blue dependency graphics indicate that the selected tool is the destination; green indicates that the selected tool is the source.

An abbreviated version of the table is displayed in the Results tab of the Palette. In both the Run Job step and the Results tab, you can right-click on a tool in the table to edit it.


Welcome to In-Sight® Explorer!

In-Sight Explorer provides a powerful and completely integrated vision system configuration, management and operator interface, all within a single software package, and includes two development environments in which to program In-Sight vision systems:

  • EasyBuilder® provide a step-by-step template to simplify application setup, and an image-centric interface that facilitates point-and-click selection of features of interest in the image to configure inspections.
  • The Spreadsheet is the classic In-Sight Explorer development environment, offering the most flexibility and the fullest set of development tools. The In-Sight Function Reference describes all functions that can be inserted into spreadsheet cells. For more information, see Function Reference.

Cognex Connect

Integrating In-Sight vision systems into your existing automation control system is easy with Cognex Connect™, the most comprehensive suite of communications capabilities ever available in a vision system. For more information, see Cognex Connect.

The In-Sight Communications Reference describes how In-Sight vision systems communicate with external devices over Ethernet networks or serial port connections using various protocols. For more information, see In-Sight Communications.

Note to New In-Sight Users

If this is the first time you have used an In-Sight product, you might want to read:

  • The Glossary topic, which list definitions for important terminology and provide pointers on using this help file. For more information, see Glossary.
  • The Getting Started topics, which explain how In-Sight vision systems are typically integrated into factory automation environments, and programmed to perform a visual inspection of an object. For more information, see Getting Started.

Note to Previous In-Sight Users

This help file is designed to be used in conjunction with In-Sight Explorer version 5.x.x. If you are already familiar with In-Sight Explorer or PC Host, you might want to read the New Features section of the In-Sight Explorer Release Notes.


Calibration Accuracy

The accuracy of the calibration depends on a number of factors, including the following:

  • The part of object being inspected; smooth edges are optimal, while rough, burred edges will reduce accuracy.
  • The quality of the printed/manufactured calibration grid; a calibration grid that is printed on a standard ink jet or laser printer will limit accuracy.
  • The quality of the lens; high quality lenses with telecentric properties will provide the best results and require the least amount of correction.
  • How the In-Sight vision system is mounted; if the vision system is mounted in an area that vibrates, the vision system may move over time.
  • The quality of the image; if the image has too much Gain, the pixels will jitter, and if the image is over-exposed, accuracy will be reduced. For more information, see AcquireImage.
  • The accuracy of the Vision Tools. The Edge tools are accurate to .25 (1/4) pixels, while the PatMax tools are accurate to .025 (1/40) pixels.

Accuracy is severely degraded when these problems are allowed to aggregate; these problems tend to be additive and very rarely do they cancel each other out. Accuracy to .10 (1/10) pixels is possible when the part being inspected is flat and has extremely well defined edges. The only way to determine the accuracy of your system is to test it.


Calibration Guidelines

Here are some other important factors to consider when calibrating your image:

  • When calibrating, the set-up between the In-Sight vision system and lens, and the physical relationship between the sensor and the scene being acquired, must be the same for both the calibration and run-time operation. If any of these items is altered, the system must be re-calibrated. Therefore, it is recommended that the same sensor and lens be used to both calibrate and process the run-time images.
  • The sensor and lens must also retain their original physical set-up and calibration settings. For example, changing the acquisition format (by altering the resolution) or moving the sensor will invalidate the computed 2D transformation that maps pixel to real-world coordinates.
  • For the highest degree of accuracy and to get the largest area of the image calibrated, ensure that the image area is sufficiently covered by the grid pattern. The goal should be to acquire at a minimum 10 rows and 7 columns of dots or grid indices, or at least 100 feature inputs.
  • For images with a large field of view, use a smaller, less cumbersome calibration plate to allow for multiple poses throughout the field of view to calibrate the entire image.
  • For highly distorted images, use multiple poses to acquire a larger number of calibrated references to increase the accuracy of the calibration.
  • Maintain consistent, even illumination.
  • Place the calibration grid on the same plane as the object being inspected. If, for example, you are examining a 3D object, and you're inspecting the top of that object, the calibration grid must be at the same height.

Choosing a type of calibration grid - dots versus checkerboard:

Grid of Dots

  • Relatively high accuracy, up to 0.05 (1/20) pixels.
  • Tolerates up to 30° perspective distortion.
  • Excellent tolerance to noise and inconsistent lighting.
  • Each dot must be between 10 and 50 pixels in diameter (dots of 15 pixels or greater will yield more accurate results).

Checkerboard

  • The highest degree of accuracy, up to .025 (1/40) pixels.
  • Tolerates up to 45° perspective distortion.
  • Good tolerance to noise and inconsistent lighting.
  • Squares should be at least 15 pixels in width.


Cells

A cell is a location in the spreadsheet, identified by its column letter and row number. For example, the cell A2 is located at the intersection of column A and row 2.


Basic Colors

To use a color as an argument to a function, enter the Index number corresponding to the desired color.

Index | Color Name | (R,G,B) | Sample
0 | default |  |
1 | Dark Red | (128,0,0) |
2 | Dark Green | (0,128,0) |
3 | Dark Yellow | (128,128,0) |
4 | Dark Blue | (0,0,128) |
5 | Dark Magenta | (128,0,128) |
6 | Dark Cyan | (0,128,128) |
7 | Red ( Default. For more information, see Interactive Graphics Mode.) | (255,0,0) |
8 | Green | (0,255,0) |
9 | Yellow | (255,255,0) |
10 | Blue | (0,0,255) |
11 | Magenta | (255,0,255) |
12 | Cyan | (0,255,255) |
13 | Dark Grey | (128,128,128) |
14 | Grey | (192,192,192) |
15 | Black | (0,0,0) |
16 | White | (255,255,255) |


Bayer Pattern

A common technique to give color sensitivity to a black & white image sensor is the application of a color mosaic filter on top of the sensor. In most cases a three-color red-green-blue (RGB) pattern is used. The In-Sight color sensors use a Bayer pattern as their RGB color mosaic filter pattern. With the Bayer pattern, each pixel is covered by a specific color filter, in a specific pattern. Half of the total number of pixels are green (G), while a quarter of the total number is assigned to both red (R) and blue (B), as follows:

Each color pixel is composed of three separate color components: red, green and blue. The missing colors, for each pixel, are interpolated using the surrounding pixels at each location. For example, if a pixel is filtered for green, the value for the green component is known, but the values of the red and the blue components must be calculated from the average value of surrounding red-filtered and blue-filtered pixels. Through software interpolation, each pixel is assigned a value from 0 to 255 for the two unknown color components. Following are examples of how the values for all three color components are calculated for a single pixel.

The values for each color component of pixel G1 are:

  • Red component value =
  • Green component value = the value of G1 = 218
  • Blue component value =

In this example, the values of the RGB components for pixel G1 are (80,218,45).

If output values were given to each pixel, then the values for each color component of pixel B2 are:

  • Red component value =
  • Green component value =
  • Blue component value = the value of B2 = 60

In this example, the values of the RGB components for pixel B2 are (240,220,60).


Color Components

Color Components of a Pixel

Each color pixel is composed of three separate color components. These components can be represented as combinations of red, green and blue (RGB), or hue, saturation and intensity (HSI). For both RGB and HSI, each component of a pixel is converted to a value from 0 to 255.

RGB colors are created by combining shades of red, green and blue in different proportions. The combination produces a specific color for each pixel; examples are shown below.

The values of the RGB components for the above 'pixel' are (255,0,0) | The values of the RGB components for the above 'pixel' are (0,255,0) | The values of the RGB components for the above 'pixel' are (0,0,255)
The values of the RGB components for the above 'pixel' are (200,0,0) | The values of the RGB components for the above 'pixel' are (150,0,0) | The values of the RGB components for the above 'pixel' are (85,0,0)

For HSI, the hue of a color corresponds to its location within the visible portion of the electromagnetic spectrum of radiation:

The conversion of a hue to a numerical value is done by creating a color wheel. A color wheel places all of the hues from the spectrum on a circle. A particular hue is specified by giving the angle at which that hue lies on the color wheel. The following figure shows a color wheel:

Note: The range of hue values is scaled to the range 0 through 255.

The saturation of a color is the degree to which the color is mixed with grey or white. A fully saturated color is pure. As a color becomes mixed with white (or grey) it becomes less saturated. The following figure shows a range of saturation values for a single hue:

The intensity of a color is a measure of its brightness. The intensity of a color is defined as the average value of the red, green and blue components that make up the color. The resulting mixture of hue, saturation and intensity produces the correct color for each pixel; examples are shown below.

The values of the HSI components for the above 'pixel' are (0,255,85) | The values of the HSI components for the above 'pixel' are (85,255,85) | The values of the HSI components for the above 'pixel' are (170,255,85)


Order of Subregions

Correctly Ordered List of Subregions

  1. Insert a Region, using an add operation.
  2. Insert a Circle, using a subtract operation.

  3. Insert a second, smaller Region, using an add operation. The Circle is masking the portion of the image that will be excluded from the region of interest and the smaller, unmasked Region is now included in the region of interest.

Incorrectly Ordered List of Subregions

  1. Insert a Region, using an add operation.
  2. Insert a second, smaller Region, using an add operation.

  3. Insert a Circle, using a subtract operation. The entire Circle is masked; the Circle and the Region are excluded from the region of interest.


Encrypt

The Encrypt function allows you to encrypt result data with a user-defined key, using Blowfish with CBC (cipher block chaining). Then, the encrypted data can be sent to a PC or a remote device using an In-Sight function or a native mode command, where the data is decrypted with a decryption application.

Note:
  • The Encrypt function is supported on the In-Sight vision systems running firmware version 5.4.0 or later.
  • The Encrypt function does not have any character limits. However, In-Sight functions that are used to send the encrypted string to a PC or remote device may have the 255 character limits, and return #ERR (please note that the encrypted string will always be longer than the initial result data before encryption). For more information on the character limits, please refer to each In-Sight function's topic.
  • The Cognex In-Sight Encryption sample applications are available for the key generation and decryption.
  • For more information on the encryption/decryption mechanism, please refer to the sample code (C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Sample Projects 5.x.x).

Encrypt Inputs

Syntax: Encrypt(Key (Base64),Value,Output Format)

Parameter Description

Key (Base64)

The key used to encrypt result data (string, Base64 encoded). The recipient will use the same key to decrypt the data.

Note: Use EditPassword to prevent the key from being visible to non-admin users. For more information, see EditPassword.

Value

 The result data (string) to encrypt.

Output Format

Select the method to encode the encrypted data.

0 = Base64 (default) | Encodes the encrypted data using Base64.
1 = Hex | Encodes the encrypted data using Hex.

Encrypt Outputs

Results

 Returns the encrypted string.

Encrypt Example

In this example, you will encrypt a barcode result decoded by the ReadIDMax function, and then send the encrypted result to a PC using the TCPDevice and WriteDevice functions where the data is decrypted.

  1. Insert a ReadIDMax function, and decode a barcode. The result string is automatically inserted to the spreadsheet. For more information, see ReadIDMax.

  2. Insert an EditPassword function. Enter a key you would like to use to encrypt the result string.

    Note: You can use the Cognex In-Sight Encrypt Generator sample application to generate a key. For more information, refer to the Sample Application section.
  3. Insert an Encrypt function, and configure the property sheet as follows:
    • Key (Base64): Reference the EditPassword cell.

    • Value: Reference the ReadIDMax's result string cell.

      Note: If the result string requires formatting, use FormatString and reference this function. For more information, see Format String Dialog.
    • Output Format: Select the desired encoding method (Base64 or Hex).
  4. The encrypted string is automatically inserted to the spreadsheet. Now you are ready to output the encrypted barcode result to a PC.

  5. Insert a TCPDevice function and use the default values to create a TCP server on port 3000. For more information, see TCPDevice.

    Note: Remove the ReadDevice cell that was automatically added.
  6. Insert a WriteDevice function. For more information, see WriteDevice.
    • Event: Set to A0.
    • Device: Reference the TCPDevice cell (step 5).
    • Data: Reference the Encrypt cell (step 3).

  7. Place the In-Sight vision system Online. Connect with telnet, specifying the Host Name or IP address and port number (for example, C:\ telnet is8402_010203 3000), and then trigger the vision system.

    After each acquisition, the encrypted data will be transmitted.

  8. Decrypt the encrypted string using a decryption application. When decrypting, you need the Key entered in the EditPassword cell (step 2).

    Note: You can use the Cognex In-Sight Encrypt sample application to decrypt the encrypted string. For more information, refer to the Sample Application section below.

Cognex In-Sight Encrypt Sample Applications

The sample applications are located: C:\Users\Public\Documents\Cognex\In-Sight\In-Sight Sample Projects 5.x.x

Key Generation Sample

This sample application generates a key in Base64 format. You can choose to generate a random key, or a key based on a user provided text.

Decryption Sample

This sample application decrypts a message that was encrypted using the In-Sight Encrypt function.


Finder Points

Finder Pattern Points

2D Data Matrix Symbols

For Data Matrix Symbols, the finder pattern points are centered on each of the four corner cells of the symbol. Also called a module, a cell is a single square, which can be either black or white. For example, a 10 x 10 symbol is made up of 100 black and white cells. One cell is equal to one bit of data.

The intersection of the two solid lines form the 'L boundary.' During training, the corner of the L should be oriented in the lower-left corner. Point 0 is the cell in the upper-left corner of the symbol, Point 1 is the lower-left corner (where the solid lines intersect), Point 2 is the lower-right corner, and Point 3 is the upper-right corner cell. Here are the point locations on a 2D Data Matrix symbol:

2D QR Symbols

For QR symbols, the finder pattern points are centered on each of the four corner cells of the symbol. The three position detection patterns on the symbol form an 'L' shape.

During training, the corner of the L should be oriented in the upper-left corner. Point 0 is the cell in the upper-right corner of the symbol, Point 1 is the upper-left corner (where the middle position detection pattern forms the corner of the 'L'), Point 2 is the lower-left corner, and Point 3 is the lower-right corner cell. Here are the point locations on a 2D QR symbol:

1D Barcodes

For barcodes, the finder pattern points are centered on each of the four corner cells of the symbol. Point 0 is the cell in the upper left-hand corner, Point 1 is the lower left-hand corner, Point 2 is the lower right-hand corner and Point 3 is the upper right-hand corner. Here are the point locations on a 1D barcode:


GetFormat Values

The following tables list the values which represent the format of a 2D symbol in either the ReadIDMax or the ReadIDCode functions. For more information, see ReadIDMax and ReadIDCode

Note: A zero is always returned for PDF 417 2D symbols.

Values Representing all ECC 200 2D Symbol Formats

Value | Number of Rows | Number of Columns
0 | 10 | 10
1 | 12 | 12
2 | 14 | 14
3 | 16 | 16
4 | 18 | 18
5 | 20 | 20
6 | 22 | 22
7 | 24 | 24
8 | 26 | 26
9 | 32 | 32
10 | 36 | 36
11 | 40 | 40
12 | 44 | 44
13 | 48 | 48
14 | 8 | 18
15 | 8 | 32
16 | 12 | 26
17 | 12 | 36
18 | 16 | 36
19 | 16 | 48

Values Representing all ECC 0 to ECC 140 2D Symbol Formats

Value | Number of Rows | Number of Columns
20 | 9 | 9
21 | 11 | 11
22 | 13 | 13
23 | 15 | 15
24 | 17 | 17
25 | 19 | 19
26 | 21 | 21
27 | 23 | 23
28 | 25 | 25
29 | 27 | 27
30 | 29 | 29
31 | 31 | 31
32 | 33 | 33
33 | 35 | 35
34 | 37 | 37
35 | 39 | 39
36 | 41 | 41
37 | 43 | 43
38 | 45 | 45
39 | 47 | 47
40 | 49 | 49

Values Representing RSS-CCA Symbol Formats

Value | Number of Rows | Number of Columns
0 | 5 | 2
1 | 6 | 2
2 | 7 | 2
3 | 8 | 2
4 | 9 | 2
5 | 10 | 2
6 | 12 | 2
7 | 3 | 4
8 | 4 | 4
9 | 4 | 5
10 | 4 | 6
11 | 4 | 7
12 | 4 | 3
13 | 5 | 3
14 | 6 | 3
15 | 7 | 3
16 | 8 | 3

Values Representing QR Code 2D Symbol Formats

Value | Number of Rows | Number of Columns
0 | 21 | 21
1 | 25 | 25
2 | 29 | 29
3 | 33 | 33
4 | 37 | 37
5 | 41 | 41
6 | 45 | 45
7 | 49 | 49
8 | 53 | 53
9 | 57 | 57
10 | 61 | 61
11 | 65 | 65
12 | 69 | 69
13 | 73 | 73
14 | 77 | 77
15 | 81 | 81
16 | 85 | 85
17 | 89 | 89
18 | 93 | 93
19 | 97 | 97
20 | 101 | 101
21 | 105 | 105
22 | 109 | 109


GetValue

GetValue is a Vision Data Access function that returns information from the following structures:

  • ColorHist. For more information, see GetValue(ColorHist, Index, [Color]).
  • Delay. For more information, see GetValue(Delay).
  • Hist. For more information, see GetValue(Hist, Index).

For more information, see Vision Data Access Functions.

Using GetValue:

The general syntax of GetValue is as follows:

GetValue(Structure,[Index],[Color])

  • Where Structure is a reference to a cell containing a ColorHist, Delay, or Hist data structure.
  • Index optionally specifies the bin from which to count histrogram values (ColorHist and Hist only)
  • Color optionally determines which color component is used to pull Histogram data (ColorHist only)


Machine Status Port

The In-Sight Machine Status Port is a TCP/IP connection at port 1070, which gives a remote client access to Machine Status data for an In-Sight system without requiring user name and password login. The GetMSBuffer command can be used without the EV prefix when executed through this read-only port. The connection will time out after 15 seconds; up to 5 simultaneous connections can be made to port 1070. For more information, see GetMSBuffer.


MicroPDF417 Variant

An EAN/UCC-specific variant of a MicroPDF417 symbol is used as the 2D component of a CC-A Composite symbol. For more information, see Section 8 of the International Symbology Specification - EAN/UCC Composite Symbology™ (ITS/99-002), published by AIM International (external link; requires Internet access.) According to this specification, restrictions are placed on which version of CC-A may appear above an RSS family component:

  1. RSS-14 Stacked or RSS-14 Stacked Omnidirectional linear components may only be linked to a two-column CC-A components.
  2. RSS Limited linear components may only be linked to a three-column CC-A component.
  3. RSS-14 and RSS-14 Truncated linear components may only be linked to a four-column CC-A component.
  4. RSS Expanded linear components may only be linked to a four-column CC-A component. If linked to a 2D Composite Component, an RSS Expanded Stacked linear component shall contain at least four symbol characters within its top row.


RSS symbols

Reduced Space Symbology (RSS) Symbols

RSS symbols are used as the linear component of a Composite symbol. For more information, see Section 7.2 of the International Symbology Specification - EAN/UCC Composite Symbology™ (ITS/99-002), published by AIM International. According to this specification, restrictions are placed on which version of CC-A may appear above an RSS family component:

  1. RSS-14 Stacked linear components may only be linked to a two-column CC-A components.
  2. RSS Limited linear components may only be linked to a three-column CC-A component.
  3. RSS-14 linear components may only be linked to a four-column CC-A component.


Scan Lines

For 1D symbols, the barcode is divided into lines, referred to as scan lines, which run perpendicular to the direction of the bars. For 2D symbols, a scan line is run across each row of the symbol. A scan reflectance profile is measured for each scan line; these are used for all verification calculations.

For more information, refer to the Bar Code Print Quality Test Specification (P/N ISO/IEC-15416) published by the International Standards Organization (ISO/IEC), the Bar Code Print Quality Guideline (P/N ANSI X3.182-1900) published by the American National Standards Institute (ANSI) or specification EN1635 published by the Comité Européen de Normalisation (CEN).


Structures

A structure is a "container" that stores multiple values in one cell, typically an image or features extracted from an image. Note that each value in a structure can be returned to a cell through a corresponding Data Access function. For example, the AcquireImage function acquires an image and stores it inside of an Image structure. The GetPixelValue returns the greyscale value for a specified pixel contained in the Image structure.


Stats

All returned values are from a referenced Stats structure, which is inserted in the spreadsheet when the ComputeStats function is created. For more information, see ComputeStats.

Function | Description
GetLatest(Stats) | Returns the most recent value used to compute the statistics.
GetMax(Stats) | Returns the largest value used to compute the statistics.
GetMean(Stats) | Returns the mean (average) of the values.
GetMin(Stats) | Returns the smallest value used to compute the statistics.
GetErrorCount(Stats) | Returns the total number of errors from the referenced value.
GetNumSamples(Stats) | Returns the total number of samples used for calculations.
GetRange(Stats) | Returns the range between the minimum and maximum values.
GetSDev(Stats) | Returns the standard deviation of the values.
GetSum(Stats) | Returns the sum of the values.
GetVariance(Stats) | Returns the variance in the values.


Active Cell

The active cell is the cell that is currently highlighted within the spreadsheet. For example, in the following spreadsheet, B2 is the active cell and is outlined in black. The headers of both the active column (B) and the active row (2) are highlighted in orange to indicate the address of the active cell.


PC Filmstrip: EasyBuilder View

The filmstrip can be used to play back images recorded to the PC or review images and results stored to the vision system.

Display the Filmstrip

On the View menu, click Filmstrip (alternately, click the Filmstrip button [image] on the EasyBuilder toolbar).

PC Filmstrip

After the Record/Playback Options dialog settings have been configured, when the Record button is pressed and images are acquired, the pass and fail images are recorded and saved to the PC. You can save the images from an Online or Offline vision system to any folder you have "write" privileges to on the PC. The PC playback mode can be used to play back the recorded images; the image is sent to the vision system and the job runs against the image being played back. Up to 10,000 images can be saved to the PC.

Note:
  • Images can be recorded when the vision system is Online or Offline.
  • To allow the playback of images when a vision system is Online, the Trigger parameter in the Set Up Image Application Step must be set to External, Manual or Network.
  • The filmstrip does not support saving images to the SD Card installed to the vision system. For more information, see In-Sight Files.

PC Filmstrip Controls

Filmstrip Indicator
 | The yellow highlighting indicates the image that is currently selected in the filmstrip. The green rectangle indicates the portion of the results that are currently displayed in the filmstrip.
Navigational Buttons
 | Go to the first image stored in the Playback folder.
 | Go to the previous image stored in the Playback folder.
 | Go to the next image stored in the Playback folder.
 | Go to the last image stored in the Playback folder.
 | Play back all images stored in the Playback folder.
 | Pause playback of images stored in the Playback folder.

Using the PC Filmstrip

For the purpose of these instructions, we will record pass and fail images to create a set of known good and bad images. We can then specify the Playback Folder location to play back these images in the PC filmstrip and re-run the job against the images.

Configure Record Settings

The Record/Playback Options dialog allows you to adjust record settings for individual vision systems and emulators. For more information, see Record/Playback Options Dialog: EasyBuilder View.

  1. From the Set Up Image Application Step, click Load Images from PC in the Acquire/Load Image group box.
  2. In the Record/Playback Options dialog that appears, click the Record tab and configure the Record settings.
  3. To automatically sort pass and fail images, select Sort on Pass/Fail (Record to Good/Bad Folders) in the Pass/Fail Sort conditions.
  4. Once all other Record settings have been specified, click OK to close the Record/Playback Options dialog. When pass and fail images are recorded, a "Good" and "Bad" Folder are automatically created within the specified Record Folder location.

Record Images

  1. In the filmstrip, click the PC button.

  2. From the EasyBuilder toolbar, click the Record button.

    Note: Images can be recorded when the vision system is Online or Offline.
  3. Trigger image acquisition on the vision system. As images are acquired, the pass and fail images are automatically sorted and stored to the Good or Bad Folder, respectively.
  4. Click the Record button again to stop recording.
  5. From the PC, manually navigate to the Record Folder. Verify that images are being stored in the Good and/or Bad Folder.

Configure Playback Settings

The Record/Playback Options dialog allows you to adjust playback settings for individual vision systems and emulators. For more information, see Record/Playback Options Dialog: EasyBuilder View.

  1. From the Filmstrip Application Step, click Playback in the PC Settings group box.
  2. In the Record/Playback Options dialog, click the Playback tab and configure the Playback settings.

  3. To play back only pass images, in the Playback Folder field, specify the Good Folder that was automatically created. Or, to play back only fail images, in the Playback Folder field, specify the Bad Folder that was automatically created.

    Tip: By default, the Playback Folder references the EasyBuilder Sample Jobs folder. The EasyBuilder sample jobs provide a powerful demonstration of the usefulness of the Record/Playback options. The Record/Playback options enable a series of previously acquired images to be cycled through, providing instantaneous feedback of tool results, allowing for quick configuration of thresholds and limits. For more information, see EasyBuilder Sample Jobs and Sample Images.
  4. Once all other Playback settings have been specified, click OK to close the Record/Playback Options dialog.

Play Back Images

  1. In the filmstrip, click the PC button.
  2. If the Trigger parameter (in the Set Up Image Application Step) is set to Camera or Continuous, place the vision system Offline to play back images. If the Trigger parameter is set to External, Manual or Network, the vision system can remain Online to play back images.
  3. In the filmstrip, click the Play button to play back the images, or click the navigational buttons to manually cycle through the images.

  4. Go to the Run Job Application Step to display the Results Table (or click the Results tab in the Palette).


Sensor Filmstrip: EasyBuilder View

The filmstrip can be used to play back images recorded to the PC or review images and results stored to the vision system.

Display the Filmstrip

On the View menu, click Filmstrip (alternately, click the Filmstrip button [image] on the EasyBuilder toolbar).

Sensor Filmstrip

When the vision system is Online and acquiring images, the Sensor filmstrip can be used to monitor a job's performance. As images are acquired, the job results, including the acquired image and accompanying job data are stored to the vision system's RAM. As results are stored to the vision system, a pass or fail graphic is added to the filmstrip. When a result is highlighted in the filmstrip, the filmstrip display changes from graphics to thumbnail images and the corresponding image is loaded to the display area. Use the controls in the Sensor Settings group box of the Filmstrip Application Step to configure the vision system's behavior. Up to 20 results can be saved, depending on the vision system's resolution and available RAM.

Note:
  • The vision system must be Online for results to be added to the filmstrip.
  • Enabling the Sensor filmstrip may increase the job execution time. Ensure that the increased time is acceptable for your application.
  • If the vision system is configured to use the maximum number of image buffers available, and is also configured to use the Sensor Filmstrip when the vision system is Online, there may not be enough memory available to save filmstrip images to the vision system. In this case, decrease the number of image buffers below the maximum. For more information, see Image Buffers Dialog.
  • All results are deleted from the vision system if the Queue, Queue Size or Queue Type settings in the Sensor Settings group box are modified, a new job is loaded or the vision system is power cycled.
  • If there isn't enough available RAM to store the number of results originally allocated, the vision system automatically adjusts the operating Queue Size; the Queue Size setting in the Sensor Settings group box remains unchanged.
  • The filmstrip does not support saving images to the SD Card installed to the vision system. For more information, see In-Sight Files.

Sensor Filmstrip Controls

Result Indicator
 | The result indicator status for each result. The yellow highlighting indicates the result that is currently selected in the filmstrip. The black rectangle indicates the portion of the results that are currently displayed in the filmstrip.
Navigational Buttons
 | Go to the first image in the filmstrip and display the accompanying results in the Results Table and the Results tab in the Palette.
 | Go to the previous image in the filmstrip and display the accompanying results in the Results Table and the Results tab in the Palette.
 | Go to the next image in the filmstrip and display the accompanying results in the Results Table and the Results tab in the Palette.
 | Go to the last image in the filmstrip and display the accompanying results in the Results Table and the Results tab in the Palette.
 | Toggles the display of passing results in the filmstrip. This button is only displayed when Separate Pass and Fail Results is selected from the Queue drop-down within the Sensor Filmstrip dialog.
 | Toggles the display of failing results in the filmstrip. This button is only displayed when Separate Pass and Fail Results is selected from the Queue drop-down within the Sensor Filmstrip dialog.
 | Click to review results.
 | Click to resume updates.
 | Click to save filmstrip images to the specified Save Path. You can save the images to any folder you have "write" privileges to on the PC, and use the PC playback mode to review the images.
 | Clear the queue.

Using the Sensor Filmstrip

Configure the Sensor Settings

  1. From the Filmstrip Application Step, configure the settings in the Sensor Settings group box.

Monitor Results from the Vision System

  1. Click the Online button in the EasyBuilder toolbar to place the vision system Online.

  2. Trigger image acquisition on the vision system. As images are acquired, the images are stored to the vision system and populated in the filmstrip, based on the Queue setting specified in the Sensor Settings group box.

  3. View the updated status graphics in the filmstrip, which represent the pass/fail results. The vision system remains Online, but the filmstrip stops updating and enters "frozen" mode (indicated by a yellow bar at the top of the display area) if any of the following occurs:
    • A result receives a failing status and Freeze on Fail is specified in the Sensor Settings group box.
    • A result receives a failing status and Pause on Fail is specified in the Sensor Settings group box.

    • A pass or fail graphic is selected, a navigational button is clicked or the Freeze button is clicked.

      Note: When the filmstrip stops updating while Online, the job continues to run but does not send updates to the display area.

      In "frozen" mode, you can navigate through the results in the filmstrip or save images from the vision system to the PC. All the Application Steps are disabled to prevent inadvertent editing of the job parameters. Meanwhile, the job continues to run, but nothing is added to the queue. The filmstrip resumes updating and all the Application Steps become enabled if one of the following occurs:

      • The specified Pause Delay elapses.
      • The Continue button is clicked.
      • The Clear Queue button is clicked.

  4. When finished monitoring the results, click the Online button in the toolbar again to place the vision system Offline. When the vision system is placed Offline, no new results are added to the filmstrip. When an existing pass or fail graphic is selected in the filmstrip, the stored image is loaded to the display area and all the steps except are disabled. Click the Continue or Clear Queue button to return to the standard Offline mode of operation.

Save Images from the Vision System to the PC

You can save the images from an Online or Offline vision system to any folder you have "write" privileges to on the PC.

Verify the Save Path

  1. Verify that the vision system is Offline.
  2. Click the "browse" button next to the Save Path field.
  3. In the Browse for Folder dialog, specify the desired destination folder and click OK. The selected folder path is now displayed in the Save Path field.

Save Images from an Online or Offline Vision System to a PC

  1. Select a result in the filmstrip or click the Freeze button to enter "frozen" mode. This mode is indicated by a yellow bar at the top of the display area. All the Application Steps are disabled to prevent inadvertent editing of the job parameters. Meanwhile, the job continues to run, but nothing is added to the queue.
  2. Click the Save to PC button in the filmstrip.
  3. To add more images to the destination folder, exit "frozen" mode by clicking either the Continue button or the Clear All Results button, allow another set of results to be added to the queue and repeat steps 1 and 2.


PC Filmstrip: Spreadsheet View

The filmstrip can be used to play back images recorded to the PC or review images and results stored to the vision system.

Display the Filmstrip

On the View menu, click Filmstrip (alternately, click the Filmstrip button [image] on the Job Display toolbar).

PC Filmstrip

After the Record/Playback Options dialog settings have been configured, when the Record button is pressed and images are acquired, the pass and fail images are recorded and saved to the PC. You can save the images from an Online or Offline vision system to any folder you have "write" privileges to on the PC. The PC playback mode can be used to play back the recorded images; the image is sent to the vision system and the job runs against the image being played back. Up to 10,000 images can be saved to the PC.

Note:
  • Images can be recorded when the vision system is Online or Offline.
  • To allow the playback of images when a vision system is Online, the Trigger parameter of the AcquireImage function must be set to External, Manual or Network. For more information, see AcquireImage.
  • Filmstrip does not support the SD Card installed to the vision system. For more information, see In-Sight Files.

PC Filmstrip Controls

Filmstrip Indicator
 | The yellow highlighting indicates the image that is currently selected in the filmstrip. The green rectangle indicates the portion of the results that are currently displayed in the filmstrip.
Navigational Buttons
 | Go to the first image stored in the Playback folder.
 | Go to the previous image stored in the Playback folder.
 | Go to the next image stored in the Playback folder.
 | Go to the last image stored in the Playback folder.
 | Play back all images stored in the Playback folder.
 | Pause playback of images stored in the Playback folder.

Using the PC Filmstrip

For the purpose of these instructions, we will record pass and fail images to create a set of known good and bad images. We can then specify the Playback Folder location to play back these images in the PC filmstrip and re-run the job against the images.

Configure Record/Playback Settings

The Record/Playback Options dialog allows you to adjust record and playback settings for individual vision systems and emulators. For more information, see Record/Playback Options Dialog: Spreadsheet View.

  1. Open the Record/Playback Options dialog.
  2. Click the Record tab and configure the Record settings.
  3. To automatically sort pass and fail images, select Sort on Value (Record to Good/Bad Folders) in the Watch Cell Sort options. When pass and fail images are recorded, a "Good" and "Bad" Folder are automatically created, within the specified Record Folder location.
  4. Click the Playback tab and configure the Playback settings.
  5. To play back only pass images, in the Playback Folder field, specify the Good Folder that was automatically created. Or, to play back only fail images, in the Playback Folder field, specify the Bad Folder that was automatically created.
  6. Once all other Record and Playback settings have been specified, click OK to close the Record/Playback Options dialog.

Record Images

  1. In the filmstrip, click the PC button.

  2. From the Record/Playback toolbar, click the Record button.

    Note: Images can be recorded when the vision system is Online or Offline.
  3. Trigger image acquisition on the vision system. As images are acquired, the pass and fail images are automatically sorted and stored to the Good or Bad Folder, respectively.
  4. Click the Record button again to stop recording.
  5. From the PC, manually navigate to the Record Folder. Verify that images are being stored in the Good and/or Bad Folder.

Play Back Images

  1. In the filmstrip, click the PC button.
  2. If the Trigger parameter (in the AcquireImage function) is set to Camera or Continuous, place the vision system Offline to play back images. If the Trigger parameter is set to External, Manual or Network, the vision system can remain Online to play back images.

  3. In the filmstrip, click the Play button to play back the images, or click the navigational buttons to manually cycle through the images.


Sensor Filmstrip: Spreadsheet View

The filmstrip can be used to play back images recorded to the PC or review images and results stored to the vision system.

Display the Filmstrip

On the View menu, click Filmstrip (alternately, click the Filmstrip button [image] on the Job Display toolbar).

Sensor Filmstrip

When the vision system is Online and acquiring images, the Sensor filmstrip can be used to monitor a job's performance. As images are acquired, the job results, including the acquired image and accompanying job data are stored to the vision system's RAM. As results are stored to the vision system, a pass or fail graphic is added to the filmstrip. When a result is highlighted in the filmstrip, the filmstrip display changes from graphics to thumbnail images and the corresponding image is loaded to the display area. Use the controls in the Sensor Settings group box of the Filmstrip Application Step to configure the vision system's behavior. Up to 20 results can be saved, depending on the vision system's resolution and available RAM.

Note:
  • The vision system must be Online for results to be added to the filmstrip.
  • Enabling the Sensor filmstrip may increase the job execution time. Ensure that the increased time is acceptable for your application.
  • If the vision system is configured to use the maximum number of image buffers available, and is also configured to use the Sensor Filmstrip when the vision system is Online, there may not be enough memory available to save filmstrip images to the vision system. In this case, decrease the number of image buffers below the maximum. For more information, see Image Buffers Dialog.
  • Images that are output using Image tool functions are not stored to the vision system. For more information, see Image.
  • All results are deleted from the vision system if the Queue, Queue Size or Queue Type settings are modified, a new job is loaded or if the vision system is power cycled.
  • If there isn't enough memory to store the number of results originally allocated, the vision system automatically adjusts the operating Queue Size; the Queue Size setting in the Sensor Filmstrip Settings dialog remains unchanged.
  • Filmstrip does not support the SD Card installed to the vision system. For more information, see In-Sight Files.

Sensor Filmstrip Controls

Result Indicator
 | The result indicator status for each result. The yellow highlighting indicates the result that is currently selected in the filmstrip. The black rectangle indicates the portion of the results that are currently displayed in the filmstrip.
Navigational Buttons
 | Go to the first image in the filmstrip and display the accompanying results.
 | Go to the previous image in the filmstrip and display the accompanying results.
 | Go to the next image in the filmstrip and display the accompanying results.
 | Go to the last image in the filmstrip and display the accompanying results.
 | Toggles the display of passing results in the filmstrip. This button is only displayed when Separate Pass and Fail Results is selected from the Queue drop-down within the Sensor Filmstrip dialog.
 | Toggles the display of failing results in the filmstrip. This button is only displayed when Separate Pass and Fail Results is selected from the Queue drop-down within the Sensor Filmstrip dialog.
 | Click to review results.
 | Click to resume updates.
 | Click to save filmstrip images to the specified Save Path. You can save the images to any folder you have "write" privileges to on the PC, and use the PC playback mode to review the images.
 | Clear the queue.

Using the Sensor Filmstrip

Configure the Sensor Settings

  1. Open the Sensor Filmstrip Settings dialog. For more information, see Sensor Filmstrip Settings Dialog.
  2. Configure the filmstrip settings.

Monitor Results from the Vision System

  1. Click the Online button in the Job Display toolbar to place the vision system Online.
  2. Trigger image acquisition on the vision system. As images are acquired, the images are stored to the vision system and populated in the filmstrip, based on the Queue setting specified in the Sensor Filmstrip Settings dialog.

  3. View the updated status graphics in the filmstrip, which represent the pass/fail results. The vision system remains Online, but the filmstrip stops updating and enters "frozen" mode (indicated by a yellow bar at the top of the display area) if any of the following occurs:
    • A result receives a failing status and Freeze on Fail is specified in the Sensor Filmstrip Settings dialog.
    • A result receives a failing status and Pause on Fail is specified in the Sensor Filmstrip Settings dialog.

    • A pass or fail graphic is selected, a navigational button is clicked or the Freeze button is clicked.

    Note: When the filmstrip stops updating while Online, the job continues to run but does not send updates to the display area.

    In "frozen" mode, you can navigate through the results in the filmstrip or save images from the vision system to the PC. The stored image and spreadsheet results are loaded to the display and the spreadsheet is read-only. Meanwhile, the job continues to run, but nothing is added to the queue. The filmstrip resumes updating if one of the following occurs:

    • The specified Pause Delay elapses. For more information, see Sensor Filmstrip Settings Dialog.
    • The Continue button is clicked.
    • The Clear Queue button is clicked.

  4. When finished monitoring the results, click the Online button in the toolbar again to place the vision system Offline. When the vision system is placed Offline, no new results are added to the filmstrip. When an existing pass or fail graphic is selected, the stored image and spreadsheet results are loaded to the display and the spreadsheet is read-only. Click the Continue button to return to the standard Offline mode of operation.

Save Images from the Vision System to the PC

You can save the images from an Online or Offline vision system to any folder you have "write" privileges to on the PC.

Verify the Save Path

  1. Verify that the vision system is Offline.
  2. Open the Sensor Filmstrip Settings dialog and click the "browse" button next to the Save Path field. For more information, see Sensor Filmstrip Settings Dialog.
  3. In the Browse for Folder dialog, specify the desired destination folder and click OK. The selected folder path is now displayed in the Save Path field.
  4. Click OK to close the Sensor Filmstrip Settings dialog.

Save Images from an Online or Offline Sensor to a PC

  1. Select a result in the filmstrip or click the Freeze button to enter "frozen" mode. This mode is indicated by a yellow bar at the top of the display area. The stored image and spreadsheet results are loaded to the display and the spreadsheet is read-only. Meanwhile, the job continues to run, but nothing is added to the queue.
  2. Click the Save to PC button in the filmstrip.
  3. To add more images to the destination folder, exit "frozen" mode by clicking either the Continue button or the Clear All Results button, allow another set of results to be added to the queue and repeat steps 1 and 2.


Spreadsheet Navigator Pane Cell Color Reference

List of the spreadsheet navigator cell colors:

Color | Type
 | Selected cell
 | Error cell
 | Symbolic tag cell
 | The green cell is dependent on the selected cell
 | The selected cell is dependent on the blue cell


Status Bar

A status bar appears below the display area of each Spreadsheet View and EasyBuilder View. The status bar can display pixel value information about the current image and messages about the vision system's connection status, job size, I/O status or Online/Offline status.


Right-Click Menu

  • Cut: Cuts the selected cell(s). Often used in conjunction with Paste.
  • Copy: Copies the selected cell(s) to the clipboard. Often used in conjunction with Paste.
  • Paste: Pastes cell(s) that were cut or copied to the clipboard.
  • Insert: Inserts rows or columns equal to the number of rows or columns selected. If entire rows or columns are not selected, the Insert dialog opens to insert cells, rows or columns.
  • Delete: Deletes the selected rows or columns. If entire rows or columns are not selected, the Delete dialog opens to delete cells, rows or columns.
  • Clear Contents: Clears the contents of the selected cell(s) (All, Formats, Contents, Comments or Symbolic Tag. Permissions). .
  • Insert Function: Opens the Insert Function dialog to insert a function into the active cell. This option is available only if the active cell does not contain a function.
  • Edit Function: Opens the property sheet if the active cell contains a function with an associated property sheet; otherwise opens the Insert Function dialog. This option is available only if the active cell contains a function.
  • Insert Absolute Reference: Inserts an absolute cell reference into the active cell.
  • Insert Relative Reference: Inserts a relative cell reference into the active cell.
  • Insert Comment: Opens the Edit Comment dialog to insert a new comment for the active cell. This option is available only if the active cell does not contain a comment.
  • Edit Comment: Opens the Edit Comment dialog to edit an existing comment for the active cell. This option is available only if the active cell contains a comment.
  • Insert Symbolic Tag: Opens the Symbolic Tag Editor to insert a new symbolic tag for the active cell. This option is available only if the active cell does not contain a symbolic tag.
  • Edit Symbolic Tag: Opens the Symbolic Tag Editor to edit an existing symbolic tag for the active cell. This option is available only if the active cell contains a symbolic tag.
  • Cell Graphic: Enters Interactive Graphics Mode to edit the cell graphic. This option is available only when the active cell contains a function that has an associated cell graphic.
  • Cell State: Opens the Cell State dialog to enable or disable the execution of cells either explicitly or conditionally, based upon the value of a referenced cell.
  • Set Job Pass/Fail: Opens the Job Pass/Fail Cell Setup dialog to monitor a cell, which contains a numeric result, to determine the job's overall pass/fail status. The job status can be sent as an output from the sensor to other applications, such as the Cognex VisionView.
  • Custom View Settings: Opens the Custom View Settings dialog to configure the properties of the Custom View of the spreadsheet.
  • EasyView Settings: Opens the EasyView Settings dialog to customize how data is displayed on VisionView.
  • Format:
    • Format Cells: Opens the Format Cells dialog to format the number, alignment, font and protection of the selected cell(s).
    • Row Height: Opens the Row Height dialog to adjust the height of one or more spreadsheet rows.
    • Column Width: Opens the Column Width dialog to adjust the width of one or more spreadsheet columns.
    • Hide: Hides the selected row(s) or column(s).
    • Unhide: Reveals the hidden row(s) or column(s) that lie between the selected row(s) or column(s).
  • Snippet:
    • Import: Opens the Snippets dialog to import the snippet, saved as a .CXD file, into the spreadsheet. This data file can be loaded from the Snippets folder on the PC.
    • Export: Opens the Snippets dialog to export the snippet, saved as a .CXD file, to the Snippets folder on the PC.
  • Import Cells: Imports cell data as a .CXD file into the spreadsheet.
  • Export Cells: Exports cell data as a .CXD file.