3D Sensor Field Calibration

The DS Field Calibrator guides you through the process of configuring and calibrating one or more Cognex Displacement Sensors using a Cognex-supplied calibration target. The application supports three separate aspects of field calibration:

  • Sensor Settings: Detect optional 3D acquisition parameters.
  • Calibration: Generate mathematical transforms that correct for skewed image acquisitions and allow data from multiple 3D sensors to be stitched together.
  • Validation: Acquire a new scan of your calibration target and generate a numerical value to represent the quality of your existing calibration data and determine if you need to recalibrate.

The application works for both linear motion stages and conveyor systems.

Legal Notices

Preparation

Sensor and Motion Settings

Calibration

Validation

Troubleshooting


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.

2020 March 12 1:44 PM

Revision: 9.6.0.2

Copyright © xxxx - xxxx. 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: http://www.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.


Preparation

The following sections list the preparations you must make prior to using the DS Field Calibrator.

Supported Cognex 3D Sensors

System Memory

Security Licenses

Sensor Configuration

Maximum Motion Speeds and Scan Lengths

Sensor Orientation

Calibration Targets

Hardware Triggering


Supported 3D Sensors

The DS Field Calibrator can calibrate the following Cognex 3D sensors:

Sensor Model | Field of View (mm) | Resolution X (um) | Resolution Z (um) | Clearance Distance (mm) | Measurement Range (mm)
DS925B | 22 - 28 | 22 - 23 | 2 | 53.5 | 25
DS1050R | 43 - 79 | 43 - 79 | 4 - 14 | 87 | 76
DS1101R | 64 - 162 | 64 - 162 | 10 - 52 | 136 | 220
DS1300 | 90 - 140 | 90 - 140 | 16 - 265 | 181 | 725

Contact your Cognex sales representative for assistance choosing the right 3D sensors for your application.

You must mount your 3D sensors in a way that allows you to capture a complete field of view of the objects you want to analyze. Cognex makes the following recommendations:

  • Mount the 3D sensors coplanar to each other.

  • Determine the height of the sensors to the motion system. When rested on the motion system (and any additional mounting plates), the calibration and the inspection targets must fall within the measurement range of the sensor model.
  • Height adjustments should be based on the desired accuracy and the field of view. Moving the sensors closer to the motion system will improve accuracy at the cost of the field of view.
  • Determine the amount of displacement, or distance between 3D sensors along the x-axis, and stagger, the distance between the 3D sensors along the y-axis. See the topics Spatial Displacement Along the Field of View and Spatial Stagger for more information.


Minimum Memory Requirements

The DS Field Calibrator application supports different levels of accuracy modes depending on the needs of your application. See the topic Performing the Calibration for details.

The application is memory-intensive. The following table is a guide to the maximum memory requirements for N number of 3D sensors, depending on the accuracy mode you choose:

Sensor Family | Memory Requirement (MB) for N Sensors
 | Minimum | Typical | Accurate
DS900 | N*641 | N*(N+3)*320 | N*(N + 2)*1283
DS1000 | N*160 | N*(N+3)*160 | N*(N+2)*320

Be aware these values do not account for overhead, compression, and processing duplication.


Security Licenses

VisionPro uses a security system to ensure that the software is properly licensed. VisionPro licenses can be set in the non-volatile memory of a Cognex USB security key attached to the PC.

Refer to the topic Understanding VisionPro Security in your installed VisionPro documentation for details on VisionPro security.

The following licenses are required to use the Field Calibration application:

Security Licenses | Tools
VisionPro.CamDSGigE | DS1000 and DS900 Series Sensors
VisionPro.3DRangeTools VisionPro.3DStitch VisionPro.3DLocate | 3D vision tools
VisionPro.Cam2 VisionPro.Cam4 VisionPro.Cam8 VisionPro.CamMulti | Enables the use of 2 to any number of 3D sensors
VisionPro.Blob VisionPro.GMorph VisionPro.OCR VisionPro.SearchMax VisionPro.Multithread | 2D vision tools

The application checks that your system has the required licenses and displays an error or warning similar to the following if the licenses are not present:

  • VisionPro.CamDSGige license is missing. Exiting the application.

  • One of the following licenses: VisionPro.Cam8 or VisionPro.CamMulti are required.

  • License for validation is missing.

Some error messages cause the application to exit.

Contact your Cognex sales representative for more information on getting all the security licenses you require for your application.


Sensor Configuration

To configure your 3D sensors for calibration, all of the following must be true:

  • The 3D sensors are correctly wired.
    • All sensors use the same quadrature encoder. The application does not support single-channel encoders.
    • All sensors use the same hardware trigger when available. See the topic Hardware Triggering for Calibration.
  • The 3D sensors are configured for your network using the Cognex Vision GigE Configuration utility:
    • Each sensor is configured with a valid IP address and subnet mask.
    • The ebus Universal Pro Driver is enabled on each sensor.
    • The Network Connection properties for your GigE Vision adapter have the following properties set:
      • The Jumbo Packet property is set to the highest possible value.
      • The Receive Buffers property is set to the highest possible value.

      • The Interrupt Moderation Rate property is set to Extreme in its Value list.

      • On the Networking tab, all the checkboxes listed under This connection uses the following items are clear except for eBUS Universal Pro Driver and Internet Protocol Version 4 (TCP/IPv4).

  • All 3D sensors are using the latest firmware.

    The topic Upgrading the DS1000 Series Firmware in the VisionPro online documentation describes how to install the latest firmware included in this release on DS1000 sensors. Contact your Cognex sales representative for firmware upgrades for DS900 sensors.

  • The 3D sensors are correctly mounted
    • The displacement between the surface of the motion system and the upper measurement range for your 3D sensor is sufficient for both the calibration target and the object you want to analyze with multiple 3D sensors.
    • The 3D sensors are spatially staggered to resolve crosstalk, where the laser from one sensor can be viewed by an adjacent sensor and mistaken for image data.
    • The sensors are mounted rigid and stable with respect to the production environment and to each other.

Cognex supports field calibration with a limitation for pitch, roll and skew, as illustrated in the following figure:


Maximum Motion Speeds and Traversal Distances

Be aware of the maximum motion speeds and scan lengths based on your 3D sensor:

3D Sensor | Frustum Model | Maximum Motion Speed (mm/s) (with minimized working section) | Maximum Scan Length (mm)
DS925B | TS5 | 14.4 | 5461
DS1050R | TS5 | 38.5 (500) | 1365
DS1050R | TS10 | 77.0 (1000) | 2731
DS1101R | TS20 | 74.2 (1700) | 27313
DS1101R | TS20 | 148.4 (2300) | 5461
DS1300 | TS20 | 143.2 (1700) | 5461
DS1300 | TS40 | 286.4 (3500) | 10922


Sensor Orientation

As you mount your cameras above your motion system, you must decide how to orient the sensors above the objects under inspection with regards to:

  • Displacement - the distance between 3D sensors along the field of view.

    You want to keep the 3D sensors close enough to generate an overlapping field of view and prevent missing any features of the objects under inspection.

  • Stagger - the distance between the 3D sensors (or lasers) along the direction of motion.

    Overlapping fields of view can result in crosstalk, where the working section of one 3D sensor contains laser information from an adjacent sensor. Increasing the amount of displacement can reduce the chance for crosstalk. See the topic Removing Crosstalk for more information on resolving crosstalk.

Spatial Displacement along the Field of View

Spatial Stagger along the Direction of Motion


Spatial Displacement Along the Field of View

As you prepare to perform a field calibration you must mount your 3D sensors in a way that allows you to capture a complete field of view of your runtime targets. Determine the displacement (along the x-axis) between the sensors, based on the amount of desired overlap and the field of view for the sensor at any given height.

The overlap subtracts from the effective field of view for the sensor at any given height. For example, if the field of view you require of the sensor is 100mm and your application requires 5mm of overlap, the displacement between the sensors cannot exceed 95mm.

Refer to the following diagram and the following formulas to help you calculate your working section:

NumSensors = TotalFoV / (FoV - Overlap)

FoV = TotalFoV / NumSensors + Overlap

ResolutionX = (FoV - NearFoV) * (FarResolutionX - NearResolutionX) / (FarFoV - NearFoV) + NearResolutionX

ResolutionZ = (FoV - NearFoV) * (FarResolutionZ - NearResolutionZ) / (FarFoV - NearFoV) + NearResolutionZ

TotalNearFoV = NumSensors * (NearFoV - Overlap)

TotalFarFoV = NumSensors * (FarFoV - Overlap)

Where:

  • NumSensors = number of sensors
  • FoV = field of view
  • TotalFoV = total field of view

ClearanceOffset = (FoV - NearFoV) * MeasurementRange / (FarFoV - NearFoV)

PhysicalOffset = ClearanceDistance + ClearanceOffset

FoV = ClearanceOffset * (FarFoV - NearFoV) / MeasurementRange + NearFoV

ResolutionZ = (FoV - NearFoV) * (FarResolutionZ - NearResolutionZ) / (FarFoV - NearFoV) + NearResolutionZ

ResolutionZ = ClearanceOffset * (FarResolutionZ - NearResolutionZ) / MeasurementRange + NearResolutionZ

Where:

  • ClearanceOffset is the offset from the clearance distance of the camera along the Sensor3D Z axis.

    A clearance offset of 0 is the nearest working range. The max clearance offset is the measurement range.

  • PhysicalOffset is the offset from the camera chassis along the Sensor3D Z axis.

    A physical offset of 0 is at the laser lens. The max physical offset is the sum of the clearance distance and max measurement range.


Spatial Stagger

Cognex recommends you physically position the 3D sensors such that their lasers are not visible in the desired working section of adjacent sensors by mounting them with some of amount of displacement along the direction of motion, as illustrated in the following figure:

The necessary displacement depends on the size of the detection zone within the working section that you need for your application. One way to minimize the amount of displacement is to define a smaller detection zone at the far edge of the working section for your particular 3D sensor, provided this zone satisfies the accuracy requirement at this distance. Refer to the topic Supported 3D Sensors for the measuring range of every 3D sensor that supports field calibration.

Use the following figure and formula to help you calculate the amount of displacement you should use for the 3D sensors in your production environment:

Displacement = Zone Height * 89 / (Zone Base + 20 - Zone Height)

For example, if you need the detection zone to span the entire measurement range of a DS1101R sensor, use the following values as reference:

Sensor Model | FoV (mm) | Resolution X (um) | Resolution Z (um) | Clearance Distance (mm) | Measurement Range (mm)
DS1101R | 64 - 162 | 64 - 162 | 10 - 52 | 135 | 220

Use the displacement formula to calculate:

220 * 89 / (355 + 20 - 220) = 126.32 mm of displacement between each DS1101R you are field calibrating.

As another example, if your application requires a detection zone of 50 mm, displacement will range from:

50 * 89 / (355 + 20 - 50) = 13.69 mm to

50 * 89 / (185 + 20 - 50) = 28.71 mm , which represents the minimum and maximum zone base, respectively.

In addition, use the following formulas if you are working with a fixed displacement and you want to calculate your detection zone options:

Zone Height = Displacement * Zone Base / (89 + Displacement)

Near Zone Height = Displacement * (Clearance + 20) / 89

Far Zone Height = Displacement * (Clearance + Measurement Range + 20) / (89 + Displacement)

For example, with a fixed displacement of 50 mm, the zone will range from:

50 * (135 + 20) / 89 = 87.08 mm to

50 * (132 + 220 + 20) / (89 + 50) = 134.89 mm, which represents the minimum and maximum zone base, respectively.


Calibration Targets

The calibration target consists of one or more six-sided frustums. High-accuracy 3D sensors use the smaller, monolithic frustums, while the larger non-monolithic frustums are needed to support the sensor models with larger fields of view.

The Field Calibration application supports the following frustum types:

Frustum Model | Monolithic | Topside (mm) | Clearance (mm) (the FoV clearance the sensor must detect) | Height (mm)
TS5 | ✔ | 5 | 15.6 | 0.875
TS10 | ✔ | 10 | 31.3 | 2
TS20 |  | 20 | 62.5 | 10
TS40 |  | 40 | 125 | 20

Assemble your calibration target as described in the document DS Field Calibration Target Setup, installed by default in %VPRO_ROOT%\Doc\en\Hardware Manuals\FieldCalibration_WiringAndTargetSetup.pdf. Cognex recommends the largest supported frustum for the effective field of view for the highest accuracy.

The following table lists the type of targets supported by each Cognex 3D sensor and the effective working section to generate the highest accuracy. For example, Cognex recommends using the TS10 monolithic target with the DS1101R model only in the near field of view of the working section, but the TS20 non-monolithic target can be used within the entire working section the sensor supports.

Frustum Model | DS925B | DS1050R |  | DS1101R |  | DS1300
 |  | Near Field of View | Entire Working Section | Near Field of View | Entire Working Section | Near Field of View | Entire Working Section
TS5 | ✔ | ✔ |  |  |  |  |
TS10 |  |  | ✔ | ✔ |  |  |
TS20 |  |  |  |  | ✔ | ✔ |
TS40 |  |  |  |  |  |  | ✔

See the topic Supported 3D Sensors for a table of supported working sections each 3D sensors supports.

Mounting

Scanning a Calibration Target


Mounting Your Calibration Target

Cognex recommends you secure your calibration target to a mounting plate attached to your motion system.

For monolithic targets, use the mounting holes highlighted in the following figure:

The following figure shows one example of mounting non-monolithic targets:


Scanning a Calibration Target

At certain points in the application, you must present the calibration target to the 3D sensors for scanning. There are two types of scans:

  • In a vertical scan, the 3D sensor must detect at least as many frustums as you have 3D sensors.
  • In a horizontal scan, each 3D sensor must detect at least one frustum, and the ID (or IDs) of those frustums must have been detected by at least one vertical scan.

The following figure illustrates both types of scans for a configuration of 3D sensors:

In addition, be aware that any sensor will fail to successfully detect a frustum unless it can detect the areas highlighted in the following graphic:

Place the calibration target on your motion system with regard to this minimum viewing requirement.


Hardware Triggering for Calibration

To successfully field-calibrate multiple Cognex Displacement Sensors, it is essential that the separate image acquisitions are precisely synchronized during calibration and at run time.

Multiple Displacement Sensors

If you are using more than one sensor, all of the sensors must be connected to the same encoder with the same polarity, so that all of the sensors receive the same information about the motion of your part or surface.

The sequence of pulses from a quadrature-type encoder are organized into two pulse trains, with a 90 degree phase offset between the pulses, as shown here:

When multiple sensors' acquisitions are precisely synchronized, the first line of data acquired by both sensors corresponds to the same physical encoder position, as represented by a particular step (count). As shown in the following diagram, if both sensors' acquisition triggers arrive during the same encoder step, the first line of data will correspond to the same physical offset for both sensors:

If the sensors' acquisitions are not precisely synchronized, then the sensors' triggers may arrive during different encoder steps. When this happens, the data acquired by the two sensors does not correspond to the same physical offset.

Any attempt to field-calibrate multiple sensors where the data is not properly aligned will produce an inaccurate calibration and misalignment in the stitched images.

Field calibration supports calibrating a single sensor with no hardware trigger and a continuous motion system, but does not support multiple sensors on a continuous motion system with no hardware trigger.

Software Trigger

Software triggered acquisition (Manual triggering) refers to image acquisition that is initiated as a result of a call to the StartAcquire method. If a single application attempts to trigger acquisition on multiple sensors at the same time, the inherent indeterminacy caused by variable software timing and latency, variable network latency, and variable host system loading will prevent the two sensors from initiating their acquisitions at the same time.

If, however, you are using a system such as a linear stage, where there is no motion except during image acquisition, it is possible to use software trigger, as long as the following requirements are met:

  • All sensors are connected to the same encoder.
  • No encoder pulses are generated before all of the calls to StartAcquire have been completed.
Hardware Trigger

Hardware triggered acquisition (Hardware Auto and Hardware Semi-Auto) refers to image acquisition that is initiated by an electrical signal on the input trigger line of the sensor generated by a device such as a photelectric sensor or contact switch.

To trigger multiple sensors simultaneously, connect (in parallel) all input trigger lines from all sensors to the same triggering device.


Sensor and Motion Settings

The DS Field Calibrator application guides you through the process of preparing your 3D sensors for calibration with the following steps:

  1. Select the motion type for your production environment - linear stage, conveyor or robot.

  2. Select the 3D sensors that you want to calibrate.

    The application might detect a saved sensor settings file. See the topic Loading Saved Sensor Settings for more information.

    If your 3D sensors do not appear in the list of supported 3D sensors, exit the application and launch the Cognex GigE Vision Configurator to verify your 3D sensor configuration. Confirm that all GigE network adapters and 3D sensors have compatible IP addresses for your network and then relaunch this application.

  3. Choose the type of motion system you are using:
    • If you are using a linear stage or robot, you can load an optional plug-in to control the motion. Otherwise you must be prepared to operate your motion system manually.
    • If you are using a conveyor, choose the type of trigger (hardware or software) you are using to signal the start of an acquisition and enter the time for the calibration target to pass by the 3D sensors.
    • Be aware of the maximum motion speeds and maximum scan lengths for your 3D sensor. See the topic Maximum Motion Speeds and Traversal Distances for more information.
  4. Perform four separate scans to complete the setup:
    1. An motion analysis scan to determine encoder parameters such as encoder rate and distance per cycle, or to measure the travel distance by the robot.
    2. A horizontal scan to determine acquisition parameters such as exposure, distance per cycle, steps per line, and scale
    3. A vertical scan to isolate characteristics of the frustums on the calibration target
    4. Another horizontal scan to test the acquisition parameters to be used during calibration scans
  5. Save the 3D sensor settings for later use.
    • You can recalibrate at any time with saved sensor settings.

As you configure the settings for your 3D sensors, be aware of the following:

  • Your motion system must use a constant motion velocity while not exceeding the maximum motion speed for your 3D sensor and calibration target.

    See the topic Maximum Motion Speeds and Traversal Distances for limits based on the DS Sensors you are using.

  • Your motion system cannot exceed the maximum encoder rate for your 3D sensors.

See the following topics for more information:

Motion Selection

Scan Duration and Working Section

Setup Scans

Viewing Setup Scans


Motion Selection

The DS Field Calibrator must know which type of motion system you use in your production environment. The application offers three options:

  • Linear stage: A platform system that moves a base from a fixed start position to a fixed stop position in a constant motion

    Note: The DS925B can only be used with a linear stage.

  • Conveyer: A handling system that exhibits constant motion in a single direction
  • Robot: A 3D sensor attached to a robot arm that moves over a stationary calibration target.

See the following topics for more information:

Linear Stage or Robot

Conveyor


Linear Stage or Robot

If you are using a linear stage or a robot for your motion system, you will need to repeatedly move it a fixed distance and return it to a start position. If you have a software plug-in that can control your stage, the Field Calibration application will perform these stage motions automatically.

You can test the plug-in after it loads.

Your VisionPro installation includes a sample Visual Studio project along with instructions for creating your own motion stage plug-in. Find the sample project at %VPRO_ROOT%\samples\Programming\DSFieldCalibration.

Note: You cannot load a different plug-in once one has already been loaded without first exiting the application. If you load a setup file with saved 3D sensor settings and it references a plug-in, you cannot load a different plug-in with these saved 3D sensor settings without creating a new setup file

For manual mode, the application displays a timer for you to prepare the motion system (linear stage or robot) for the scan:

The timer allows you to time the start of the motion of the linear stage or robot to the start of the scan.


Conveyor

If you are using DS1000 series sensors and a conveyor for your motion system, you must indicate whether the start of each scan is controlled by a hardware trigger.

If you use a hardware trigger through a Cognex Vision Controller, you must also select the I/O line used for the trigger:

The document FieldCalibration_WiringAndTargetSetup.pdf installed in your "%VPRO_ROOT%\Doc\en\Hardware Manuals" directory describes how to connect a hardware trigger to your Cognex Vision Controller.


Scan Duration and Working Section

The DS Field Calibrator uses additional parameters about your production environment to generate optimum acquisition parameters for scanning your calibration target.

See the following topics for more information:

Travel Distance

Working Section


Scan Duration

Entering the distance the calibration target travels is optional and varies according to your motion system:

  • For linear stages, it represents the distance the stage travels between the start and stop signal.
  • For conveyors, it represents the distance that the calibration target travels in the number of seconds specified.

Measure the travel distance accurately to prevent image acquisition errors later. If you know your motion velocity, then the distance is the motion velocity multiplied by the scan duration (in seconds).

Regardless of whether you use this parameter, if you are using a conveyor you must specify the number of seconds the target requires to pass the sensor array at the start of each acquisition:


Working Section

If you are using DS1000 series sensors, you must measure and specify the following measurements regardless of your motion system:

  • The distance between a sensor and the bottom of the calibration target

  • The height of your calibration target

By default the application shows the upper limits based on the selected DS1000 series sensors.

If you are using DS900 series sensors, you do not need to specify these parameters.


Setup Scans

You must perform four separate scans to complete the setup before performing calibration scans.

  1. A motion analysis scan to determine encoder parameters such as encoder count, encoder rate and distance per cycle

    If you are using a conveyor or linear stage, the scan determines encoder parameters such as encoder count, encoder rate and distance per cycle. For robots the scan determines the distance traveled.

    The application does not perform any image acquisition during this scan.

  2. A horizontal scan to determine acquisition parameters such as exposure, distance per cycle, steps per line, and scale
  3. A vertical scan to isolate characteristics of the frustums on the calibration target
  4. Another horizontal scan to test the acquisition parameters to be used during calibration scans

The application displays a check mark after you complete each successful scan. If an error occurs, the application shows the scan has failed and displays an error message and possible solution:

See the topic Troubleshooting for solving problems based on any error messages that appear.

Once all scans have successfully completed, click Save Sensor Settings and save these settings. You can recalibrate at any time with saved sensor settings.


Viewing Setup Scans

The Setup phase consists of three scans where the application acquires images of the calibration target. To view these images, choose Launch Image Viewer from the pull-down menu highlighted in the following figure:

l

The Image Viewer contains an image for each successful scan:


Performing the Calibration

Generating a calibration transform to be shared among multiple 3D sensors involves the following steps:

  1. Perform multiple scans of your calibration target.
    • The application checks to see that the scan is valid. See the topic Viewing Calibration Scans for details on how to view the scans the application takes. Be aware that an invalid scan is removed once a new scan has begun.
  2. Click Calibrate to finalize the calibration.
  3. Save the calibration file for use in your 3D sensor acquisition sources.

The application displays the following graphic at the start of the calibration process:

The number of vertical and horizontal scans you must acquire depends on the accuracy level you choose:

Accuracy Mode | Vertical Scans | Horizontal Scans
Minimum | 1 | 1
Typical | Number of Sensors | 3
Maximum | Number of Sensors * 2 | Number of Sensors + 2

Cognex recommends the Typical accuracy level for most applications. Use the Maximum level if the Typical level does not generate the accuracy your vision application requires.

Cognex recommends the Minimum level for low-accuracy, single-sensor applications or demonstrating the calibration procedure.

Click Continue and follow the prompts to perform the calibration process.

Loading Saved Sensor Settings

Performing a Calibration

Viewing Calibration Scans

Perform a Validation


Loading Saved Sensor Settings

Click Load Sensor Settings to load an existing file with saved configuration settings before you calibrate.

The serial numbers for the 3D sensors currently connected to your PC or Vision Controller must be included in the file. Be aware that your development environment can include more 3D sensors than what are specified in the file, but only the sensors listed in the file will be calibrated. You cannot add or remove 3D sensors from the file. If you want to use other 3D sensors than those specified in the file, or use a faster motion system speed, or change the traversal distance for each calibration target scan, you must restart the Field Calibration application to clear the current setting information from system memory.

In addition, be aware that the application will report a security warning if the saved settings include more 3D sensors than your current security allows. See the topic Security Licenses for more information on the required security licenses.


Completing a Calibration

Once all the required scans have been captured, the application can take several minutes to generate the calibration data. The application notifies you when it has finished:

Save the calibration file for use in the acquisition sources you want to use in your finished vision application.


Viewing Calibration Scans

As you work through the application, you will need to acquire both vertical and horizontal scans of your calibration target. See the topic Scanning a Calibration Target for more information on how the target must be presented to your 3D sensors for the different types of scans.

The application allows you to view images of the scans you acquire by selecting the icon highlighted in the following figure and choosing Launch Image Viewer:

The application presents a diagnostic display that you can use to the view a particular scan for any particular sensor, as shown:

Use your keyboard and mouse to rotate, pan and zoom:

  • Rotate: left-click and move
  • Pan: SHIFT+left click and move
  • Zoom: CTRL+left click move

The diagnostics display can be useful for viewing successful scans where all the features of the frustums were detected, as shown:

Likewise, you can use the display to view scans were some (or all) features were not detected, as shown:

Viewing unsuccessful scans can aid in the way you reposition the calibration target for a rescan, as necessary. Cognex recommends you capture all diagnostic data before you attempt the next scan. See the topic Troubleshooting for more on recording diagnostic data.

All scans are removed if you exit the application and start again.


Perform a Validation

Cognex strongly recommends you perform a validation immediately after calibration, to learn how well the configuration of 3D sensors operating in your production environment can return accurate measurements in the 3D space defined by your motion system. For some environments, the score will be close to 100. For other environments, a validation performed immediately after calibration will produce a lesser score. Initial scores below 100 might reflect the high rate of speed of your motion system, current exposure settings, or other factors. You might choose to alter some of the acquisition settings of the 3D sensor or modify your production environment and perform a new calibration/validation to see if you can generate a higher validation score.

See the topic Validating a Calibration for more information.


Validating a Calibration

The Field Calibration application allows you to validate an existing calibration by acquiring a single horizontal scan of the calibration target and comparing it to the measured dimensions of the target as represented by the calibration file. Validation generates a score between 0 - 100. The higher the score, the closer the target from the field calibrated image matches the expected dimensions of the calibration target with respect to reported accuracy levels, and by extension your production environment.

The following figure shows the Field Calibration application at the start of a Validation:

Follow the given prompts to scan your calibration target. Be aware of the following requirements during validation:

  • You must use the same calibration target during validation as you used during calibration.
  • The calibration target must be as free as possible of dirt, dust and fingerprints which will affect the calibration results.
  • The calibration target must be scanned at the same height during validation as it was during calibration.

The Image Viewer holds an additional Validation scan that you can refer to if any error occurs. The images are the raw images from the 3D sensors.

After successful validation, the display contains a stitched image from all the 3D sensors and the application appears similar to the following example for a conveyor motion system:

The validation score depends on an array of factors including the speed of your motion system, the distance between the 3D sensors and the bottom of your calibration target, your encoder settings, and more.

As your vision application operates, Cognex recommends you perform a periodic validation and compare the latest score against the score generated immediately after the initial calibration. As the validation score decreases from its initial score, the more your 3D sensor array will generate output images with less accuracy compared to the actual object under inspection. All multi-3D sensor applications require recalibration periodically.

In addition to a numeric score, the validation provides root mean square (RMS) residual errors, in microns. These RMS values represent the expected accuracy for any scan along the x-, y-, or z- axes. For example, the previous figure indicates that any scan can be expected to return a measurement within an accuracy of 23.5 microns along the x-axis, or a combined accuracy of 31.1 microns within all of the unified 3D space.


Troubleshooting

You can create a .zip file with the current state of the application as well as internal information that can be useful to Cognex customer support.

The Image Viewer supports a Save Diagnostics option, highlighted in the following figure:

If the application is unable to generate a calibration file from all the data (settings and scans) you supply, a diagnostics .zip file is created automatically at the following location:

C:\Users\<username>\AppData\Local\Cognex\DS Field Calibrator\Diagnostics_CalibrationFailures.zip

Where <username> matches the account using the application.

Be aware this file is overwritten by the next unsuccessful calibration attempt. In addition, be aware that diagnostic files can consume a large amount of disk space.

Refer to the following topics to resolve issues you might experience using the application.

Modifying Internal Preference Parameters

Failed Vertical Scan

Plane Coverage Issues

Removing Crosstalk

Timeout Errors

Encoder Errors

Missing Pixel Errors

Out of Memory Errors

Other Error Messages


Modifying Internal Preference Parameters

When you launch the DS Field Calibrator the first time, the application creates the file props.xml located at C:\ProgramData\Cognex\DS FieldCalibrator and populates the file with a list of default internal tolerance values. Each time you re-launch the DS Field Calibrator, the application reads the values from that file. If you modify the default values of any parameter, the application will use the new value.

Most of these values exist for Cognex customer support and Cognex recommends extreme caution before you modify any default values in this file. In addition, Cognex recommends you save diagnostic information before you modify any values, as described in the topic Troubleshooting.

The following values can be modified to solve particular situations you might experience during setup and calibration:

  • DetectParametersTimeout: The acquisition timeout maximum, with a range of 0 seconds to any practical value your production environment requires.

    See the topic Timeout Errors for more information.

  • SetupEncoderRateTolerance: A buffer to prevent encoder overruns, with a range of 0 to any practical value your production environment requires.

    See the topic Encoder Errors for more information.

  • SetupExposureScalar: A multiplier applied to the exposure setting, with a range of 0 to any practical value your production environment requires.

    See the topic Missing Pixel Errors for more information.

  • CalibrationPlaneCoverageThreshold: A threshold value for detecting the necessary frustum features, with a range of 0 - 1.

    See the topic Plane Coverage Issues for more information.

  • EnableParallelProcessing: Allows the application to use as many cores in your hardware platform as possible, with a default value of True.

    See the topic Out of Memory Error for more information.

If you modify a parameter outside its valid range, the application will generate an error message and revert back to its default value.


Failed Vertical Scan

As you acquire images to establish the sensor and motion parameters for your production environment (Sensor and Motion Settings), and as you perform the calibration (Performing the Calibration) , the application will routinely require a vertical scan of your calibration target (Scanning a Calibration Target). During the vertical scan, the 3D sensor must view at least one frustum seen by each of the 3D sensors in a horizontal scan.

In some cases, the vertical scan might fail with an error message in the following format:

One frustum from each set listed below must been seen during the vertical scan:
[x,y,z][z,b][n]

The error message lists sets of frustum IDs that were viewed by individual sensors during a horizontal scan:

  • Sensor 0 viewed frustum IDs [x, y, z]
  • Sensor 1 viewed frustum IDs [z, b]
  • Sensor 2 viewed frustum ID [n]

The error message indicates that the vertical scan did not detect any of the frustum IDs in one or more of those sets.

Refer to the following example using three 3D sensors and a calibration target using three non-monolithic frustums:

This error message indicates that in the previous horizontal scan:

  • Sensor 0 viewed frustum ID 0
  • Sensor 1 viewed frustum ID 5
  • Sensor 2 viewed frustum ID 3

The error message can include multiple frustum IDs when you are using monolithic calibration targets.

To resolve the error, reposition the calibration target and retry the scan.


Plane Coverage Issues

Some scans of your calibration target might fail without a definitive error message to indicate the cause, such as:

Could not resolve the following sensors:

And then a list of the sensors having an issue. When you launch the Image Viewer, the scan could show the target with red dots in locations where the application could not resolve the necessary features of a frustum:

In addition, when you select High resolution in the Image Viewer and zoom in, individual frustums can appear with steps or ridges like the following examples:

These types of images represent plane coverage issues. Try moving the target closer to the 3D sensors. The topic Calibration Targets lists the appropriate working section for the combination of calibration targets and 3D sensors the application supports.

If necessary, you can modify the file props.xml located at C:\ProgramData\Cognex\DS Field Calibrator, which contains a list of parameters used by the application. Cognex recommends extreme caution in modifying this configuration file.

Perform the following steps to modify the file and change the threshold for plane coverage that must be met:

  1. Exit the application.
  2. Open the file props.xml.

  3. Decrease the value of CalibrationPlaneCoverageThreshold by a small amount.

    In many cases, decreasing this value by 0.05 or 0.10 can be sufficient.

  4. Save the changes to props.xml and restart the application.


Removing Crosstalk

Crosstalk occurs when the laser from one 3D sensor falls within the field of view of an adjacent sensor, causing extraneous information in the resulting image acquisition. To resolve crosstalk, you must evaluate your production environment and do either of the following:

  • Raise the position of the calibration target closer to the 3D sensors and generate a new calibration with a smaller working section.

    See the topic Scan Duration and Working Section for details on how the application calculates the working section.

  • Increase the spatial stagger of the 3D sensors along the direction of motion.

    See the topic Spatial Stagger for more information.


Timeout Errors

Timeout errors occur when the application expects to complete an image acquisition but the acquisition does not complete after a specific interval, measured in seconds. For example, a timeout occurs if you enable the application to scan your calibration target using a conveyor but the connected hardware trigger signal is not detected within the timeout period. By default, the application supports a timeout value of 70 seconds.

The application can display either of the following error messages when a timeout occurs:

  • A timeout occurred while completing one pass to measure stage.

  • A new scan could not be captured due to a timeout waiting for the acquisition to start.

Check any of the following to prevent timeout errors:

  • Verify that you are using the correct motion type (linear stage or conveyor).
  • Verify that you are following the prompts from the application on when and how to present the calibration target for scans.
  • Check the wiring to your encoder and any hardware trigger you are using.
  • Verify that you have not specified a motion distance that is too short

If you require a greater timeout default, you can modify a configuration file that provides the application with many default preferences.

The file props.xml located at C:\ProgramData\Cognex\DS Field Calibrator contains a list of parameters used by the application. Cognex recommends extreme caution in modifying this configuration file.

Perform the following steps to modify the file and change the default timeout value.

  1. Exit the application.
  2. Open the file props.xml.
  3. Modify the parameter DetectParametersTimeout and specify a greater value.
  4. Save the changes to props.xml and restart the application.


Encoder Errors

The application can display a number of error messages to indicate a problem with the encoder during scans of your calibration target. Most error messages indicate a solution and allow you to retry the scan. The following error message can indicate no obvious solution:

Overrun error occurred, see troubleshooting guide for guidance.

Try one or more of the following to resolve encoder issues:

  • Verify your motion system uses a constant motion velocity while not exceeding the maximum motion speed for your 3D sensor and calibration target.

    See the topic Maximum Motion Speeds and Traversal Distances for limits based on the DS Sensors you are using.

  • Reduce the speed of your motion system and retry the scan.

  • Enter a specific distance the calibration target will travel during an image acquisition.

    See the topic Scan Duration and Working Section for details.

See the following topics for additional troubleshooting guidelines for encoder errors:

Diagnostic Flowchart

Modifying Encoder Rate Tolerance


Diagnostic Flowchart

The following flowchart might help you diagnose encoder errors. The red elements toward the bottom of the flowchart refer to the XML preferences file. See the topic Modifying Encoder Rate Tolerance for more information.


Modifying Encoder Rate Tolerance

The application supports an internal parameter to help prevent encoder overruns. If the application continues to display encoder error messages and you have tried the solutions described in Encoder Errors, you might try increasing this parameter from its default value.

The file props.xml located at C:\ProgramData\Cognex\DS Field Calibrator contains a list of parameters used by the application . Cognex recommends extreme caution in modifying this configuration file.

Perform the following steps to modify the file and change the default encoder rate tolerance:

  1. Exit the application.
  2. Open the file props.xml.
  3. Modify the parameter SetupEncoderRateTolerance and specify a greater value.
  4. Save the changes to props.xml and restart application.


Missing Pixel Errors

The 3D sensors you use should be able to generate height information for the entire surface of your calibration target. and will generate an error message regarding missing pixels if it cannot generate height information for one or more regions of any scan.

The application can display the following message if this issue occurs:

Excessive missing pixels, see troubleshooting guide for guidance.

The following flowchart might help you diagnose missing pixels errors:

The red elements at the bottom of the flowchart refer to the file props.xml located at C:\ProgramData\Cognex\DS Field Calibrator, which contains a list of parameters used by the application. Cognex recommends extreme caution in modifying this configuration file.

Perform the following steps to modify the file and change values that can avoid missing pixel errors:

  1. Exit the application.
  2. Open the file props.xml.
  3. Increase or decrease the default value of the following parameters:
    • Increase the value of SetupExposureScalar by 50%.

    • Reduce the value of CalibrationPlaneCoverageThreshold in increments of 0.10 or smaller.

  4. Save the changes to props.xml and restart the application.


Out of Memory Error

Depending on your hardware platform and configuration you might experience an error message regarding memory usage.

By default the application will use as many cores in your hardware platform as possible, but you can disable parallel processing.

The file props.xml located at C:\ProgramData\Cognex\DS Field Calibrator contains a list of internal tolerance parameters used by the application. Cognex recommends extreme caution in modifying this configuration file.

Perform the following steps to modify the file and change the default value.

  1. Exit the application.
  2. Open the file props.xml.
  3. Modify the parameter EnableParallelProcessing and change its value to false.
  4. Save the changes to props.xml and restart the application.


Error Messages

The Field Calibration application might display an error message that details the issue and how to resolve the problem. The following table presents a list of possible issues and solutions based on any error message the application displays:

Issue | Solution
Hardware in use | Close other applications that are using the 3D sensors.
Unable to set the trigger type/line | Check the hardware connections for the trigger. See the topic Hardware Triggering for Calibration for more information.
Duplicate IDs | Verify that each frustum uses a unique ID
Not enough frustums detected | Reposition the calibration target, verify your motion settings, and rescan
Frustum not in vertical scan | Reposition the calibration target and rescan
Unresolved sensor | Reposition the calibration target and rescan


Error Messages

The Field Calibration application might display an error message that details the issue and how to resolve the problem. The following table presents a list of possible issues and solutions based on any error message the application displays:

issue | Solution
Hardware in use | Close other applications that are using the 3D sensors.
Encoder overruns or pulses irregular | Ensure the motion system moves at a constant speed and scan again.
No encoder signal detected | Check your encoder wiring and signal and retry the scan.
Timeout errors | Increase the timeout duration or reduce the latency before the motion starts.
Duplicate IDs | Verify that each frustum uses a unique ID
Not enough frustums detected | Reposition the calibration target, verify your motion settings
Frustum not in vertical scan | Reposition the calibration target
Unresolved sensor | Reposition the calibration target


Failed Scans

One of the most common issues during the calibration process is a failed scan, as shown in the following example:

Refer to the topic Scanning a Calibration Target for details on how the calibration target must be presented to the 3D sensors during calibration. Failed scans are removed from the list of saved scans once a new scan has started.


Calibration Issues

See the following topics for information on solving issues that might occur during the calibration process.


Motion Stage Plug-in

If you are using a linear stage for your motion system, you will need to repeatedly move your motion stage a fixed distance and return it to a start position. If you have a software plug-in that can control your stage, the Field Calibration application will perform these stage motions automatically.

Your VisionPro installation includes a sample Visual Studio project along with instructions for creating your own motion stage plug-in. Find the sample project at %VPRO_ROOT%\samples\Programming\DSFieldCalibration.

Be aware that you cannot load a different plug-in once one has already been loaded without first exiting the application. If you load a setup file with saved 3D sensor settings and it references a plug-in, you cannot load a different plug-in with these saved 3D sensor settings without creating a new setup file.


Giving Precise Motion and Distance Measurements

The Field Calibration application collects information about your motion system but allows you to enter additional data for greater accuracy.

For a conveyer system, the application asks you to enter the number of seconds it takes for the calibration target to pass by the 3D sensors:

For greater precision, the application can generate this value for you. Use the optional Capture Time Estimator section to enter precise data about the line speed of your conveyor and the distance between the first and last frustums. Click Calculate and the application will automatically fill in the time for the calibration target to pass by the 3D sensors.

For a motion stage, the application allows you to choose between scanning the full working range for the calibration target or specifying the target distance manually:

If you choose Specify target distance manually, you can enter precise information about the relationship of the calibration target to your production environment:

Enter the two height measurements (in mm) and click Continue.


Sensors Do Not Appear in List

If your 3D sensors do not appear in the list of supported 3D sensors, launch the Cognex GigE Vision Configurator and verify your 3D sensor configuration. Confirm that all GigE network adapters and 3D sensors have compatible IP addresses for your network.


Setup Guidance

As you configure the settings for your 3D sensors, be aware of the following:

  • Your motion system must use a constant motion velocity while not exceeding the maximum motion speed for your 3D sensor and calibration target.
  • Your motion system cannot exceed the maximum encoder rate for your 3D sensors.

Be aware of the following regarding the travel distance for the linear stage or the conveyor system:

  • If you specify a value that is too short, the application may not be able to capture an image of the entire calibration target.
  • If you specify a value that is too long, the application might constrain the image size and use a lower resolution that renders the features on the calibration target undetectable.

See the following topics for more information.


Solving Setup Issues

Refer to the following topics to resolve any issues you are having generating the information the Field Calibration application needs about the encoder you are using or the acquisition parameters the application needs to scan the calibration target.


Solving Validation Issues

The Field Calibration application might display an error message that details the issue and how to resolve the problem. The following table presents a list of possible issues and solutions based on any error message the application displays:

Issue | Solution
No frustum visible | Each 3D sensor must be able to view a single frustum and a unique ID during a validation scan. Reposition the calibration target and scan again.
Encoder overruns | Reduce the speed of your motion system and retry the scan.
Timeout errors | Increase the timeout duration or reduce the latency before the motion starts.
Encoder overruns or pulses irregular | Ensure the motion system moves at a constant speed and scan again.
No encoder signal detected | Check your encoder wiring and signal and retry the scan.
Timeout errors | Increase the timeout duration or reduce the latency before the motion starts.
Duplicate IDs | Verify that each frustum uses a unique ID
Not enough frustums detected | Reposition the calibration target, verify your motion settings
Frustum not in vertical scan | Reposition the calibration target
Low score | Create a new calibration file
Unresolved sensor | Reposition the calibration target