0% found this document useful (0 votes)
241 views114 pages

TrackTrace EN

Uploaded by

Lê Linh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
241 views114 pages

TrackTrace EN

Uploaded by

Lê Linh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 114

®

In-Sight Track & Trace


User Manual
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.
Cognex P/N 597-0050-04

Copyright © 2009 - 2013 Cognex Corporation. All Rights Reserved.

Portions of the hardware and software provided by Cognex may be covered by one or more of the U.S. and foreign
patents listed below as well as pending U.S. and foreign patents. Such pending U.S. and foreign patents issued after the
date of this document are listed on the Cognex web site at: http://www.cognex.com/patents.

5481712, 5742037, 5751853, 5845007, 5909504, 5943441, 5949905, 5960125, 5978080, 5978081, 6005978,
6137893, 6141033, 6154567, 6215915, 6301396, 6327393, 6381375, 6408109, 6457032, 6490600, 6563324,
6658145, 6690842, 6771808, 6804416, 6836567, 6850646, 6856698, 6859907, 6920241, 6941026, 6959112,
6963338, 6975764, 6985625, 6993192, 7006712, 7016539, 7043081, 7058225, 7065262, 7069499, 7088862,
7107519, 7164796, 7175090, 7181066, 7251366, 7720315, JP 3927239

Cognex, In-Sight, EasyBuilder, VisionView, DataMan and DVT are registered trademarks of Cognex Corporation.

The Cognex logo, SmartLink, EdgeCount, FeatureCount, and ObjectLocate are trademarks of Cognex Corporation.

Windows is a registered trademark or trademark of Microsoft Corporation in the United States and other countries. Other
product and company trademarks identified herein are the trademarks of their respective owners.

i
ii
Table of Contents
Legal Notices i
Table of Contents iii
Track & Trace Overview 1
Contents 2
Requirements 3
Getting Started 5
Install Track & Trace 5
Set Up the Image 7
Configuration Utility 8
In-Sight Explorer Configuration 8
Set Up the Language 9
Setting Up Track & Trace 11
Track & Trace Setup Overview 11
IMAGE SETTINGS Screen 12
Trigger Type 12
Exposure Time 12
Start Row 12
Number of Rows 13
Gain 13
Orientation 13
Line Trigger Type 13
Line Period/Steps Per Line 13
Encoder Acquisition Timeout 14
Clip Mode 14
LOCATION TOOLS Screen 15
Pattern Fixture 15
Label Position 15
ID CODE 1 and ID CODE 2 Screens 18
ID Code Reading Settings 18
DataMatrix Code Grading Settings 21
OCR LINES Screen 23
OCR Line Settings 23
TRAIN FONTS Screen 26
DATE FORMAT Screen 33
COMMUNICATION Screen 34
Ethernet Communication 34
Message Format 37
Digital Outputs 38
Save Images via FTP 39
VERIFICATION Screen 40
Line Verification 40
ID Code Serial Number Verification 42
Configuration Status 43
Authorize 44
BUNDLE READER Screen 47
Bundle Reader 47

iii
Verification 48
Send out Data on Ethernet (Per Code) 50
OUTPUT Screen 51
Data Groups 51
Inspection Results 52
ON-SCREEN DISPLAY Screen 55
Language 55
Images 55
Authorize 55
Display Items 56
Advanced Custom Features 59
Add Custom Screen to Setup Menu 59
User-Configurable Parameters 61
Operating Track & Trace 63
CONFIRM CHANGE BATCH Screen 63
Change Verification Settings 63
Change Batch 63
STATISTICS Screen 64
Batch Statistics 64
Operator Statistics 65
Appendix A - OCRMax Font Training 67
Training Characters 67
All Characters Option 68
New Characters Option 68
Selected Characters Option 69
Appendix B - User Authentication 71
Creating In-Sight Users 71
Setting Track & Trace User Permissions 72
Idle Timeout 73
Appendix C - Creating an Audit Trail 75
Configure the Cognex Audit Message Demo Application 75
Configure Cognex Audit Message Settings 77
Sample Code – Visual Studio .NET C# 2010 79
Audit Message Format 80
Audit Message Header 80
Escaped Data in XML 81
Message Response 82
Audit Message Samples 82
Change Messages (Data or Formula) 82
System Change Events 86
Event Messages 94
Native Mode Commands 96
Setup Audit Message IP Settings 96
Enable Audit Messages 96
Audit Message Memory 96
Schema for Audit Messages 96
Appendix D - Integrating the HMI Display Control 97

iv
Table of Contents

HMI Display Control Prerequisites 98


Adding the HMI Display Control to your Application 98
Using the HMI Display Control – Properties 100
Programming the HMI Display Control 101
Examples 101
Services 102
Symbolic Tags 102
Language Localization 104

v
vi
Track & Trace Overview
®
In-Sight Track & Trace works with your In-Sight vision system to form a comprehensive identification and data
verification solution for labels on pharmaceutical and medical device packages. Combining high-performance ID code
reading, Online quality grading for DataMatrix codes, and high reliability printed text verification, Track & Trace has
everything needed for product serialization applications. With full support for GS1, sNDC and securPharm data
standards, Track & Trace is prepared for global traceability requirements.
Track & Trace features a ready-to-deploy user interface that makes it easy to configure and monitor run-time operation
®
using the Cognex VisionView Operator Interface Panel or VisionView PC software. Developers can quickly embed this
same interface into a PC-based HMI or custom application interface using the included .NET control.

Figure 1-1: Example Track & Trace Run-Time Display

1
Contents
In-Sight Track & Trace includes several components, described in the following table:
Table 1-1: In-Sight Track & Trace Product Contents
Component Description
In-Sight Track & Trace Job The essential component of In-Sight Track & Trace, this job file is pre-configured to
inspect and validate the data printed on a label or package. Running on your In-Sight
vision system, the Track & Trace job provides the user interface for configuring all
inspection and communications parameters, monitoring run-time performance, and
initiating a batch changeover. A pre-trained font to work with the sample labels with
640x480 resolution is also included in the job file.
Note: A license must be installed on each vision system that will run the Track &
Trace job. Contact your Cognex representative for details.

Cognex HMI Display Control This .NET control integrates the Track & Trace user interface into a custom Windows
application. The "touch screen" friendly look-and-feel of the HMI Display Control is
similar to that of the Cognex VisionView Operator Interface Panel. An API is provided to
expose selected features of the HMI Display Control, based on the operator controls
required for your deployment.
Note: The In-Sight Software Development Kit (ISDK) is recommended for custom
applications requiring more comprehensive access and control of In-Sight vision
systems than is provided with the HMI Display Control. Contact your Cognex
representative for details.

Cognex HMI Display Control This executable program demonstrates the capabilities of the Cognex HMI Display
Sample Application Control for hosting the Track & Trace user interface in your application. Source code is
provided to help speed up your integration. The HMI Display Control Sample application
can also be used to help you start learning how to set up the Track & Trace job for your
inspection application.
Cognex Audit Message The Cognex Audit Message Demo demonstrates how audit messages can be received
Demo Sample Application 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 logins and other
system events, as necessary for FDA 21 CFR Part 11 compliance. Your application
software constructs an audit message server to retrieve new In-Sight audit messages,
which you can then archive to a database or write to an audit trail file.
Cognex Audit Message Track & Trace installs a Visual Studio 2010 project containing sample code for an audit
Server Sample message server at C:\Program Files\Cognex\In-Sight\In-Sight Track and Trace
2.0.0\Cognex Audit Message Server\Sample Code.
Configuration Utility The Track & Trace Configuration Utility includes the In-Sight Explorer Configuration
Utility and Track & Trace Language Utility. The In-Sight Explorer Configuration Utility
allows you to set the default view to Spreadsheet View and enable the Audit Message
Settings dialog in In-Sight Explorer. The Track & Trace Language Utility allows you to
change the language to use in the Custom View of the Track & Trace job. English
(default), French, German, Spanish, Italian, Portuguese and Korean languages are
supported.
Sample Labels A printable PDF file containing 24 sample labels is provided, along with four sets of 24
images of these labels for 640x480, 800x600, 1280x1024 and 1600x1200
resolutions(.bmp format).

2
Track & Trace Overview

Requirements
The following table lists the requirements for installing and operating In-Sight Track & Trace:
Table 1-2: In-Sight Track & Trace Requirements
Requirement Notes
2
In-Sight Micro series, In-Sight 5000 series or In- Track & Trace supports the following models :
Sight 7000 series vision systems running firmware l In-Sight Micro 1100, 1100C, 1110*, 1400, 1400C, 1402,
1
4.8.0 or higher
1412*, 1410*, 1403, 1403C, 1413*
l In-Sight 5100, 5100C, 5110*, 5400, 5400C, 5400CS,
5401, 5403, 5410*, 5411*, 5413*, 5600, 5603, 5604,
5605, 5610*, 5613*, 5614*, 5615*
l In-Sight 7200, 7200C, 7210*, 7400, 7400C, 7402, 7402C,
7410*, 7412*
1
In-Sight Explorer software 4.8.0 or higher In-Sight Explorer is used to manage vision system network
settings, update firmware, manage users, enable Audit Message
Settings, and more.
VisionView Operator Interface Panel running VisionView Operator Interface Panel and VisionView PC
firmware 1.6.0 and higher and VisionView PC software support the following Track & Trace features:
3 l OCRMax Font training
software 1.6.0 or higher
l English (default), French, German, Italian, Korean,
Portuguese and Spanish user interface
PC with 1GB RAM and Microsoft Windows XP SP3 Windows 7 (32-bit and 64-bit edition) are also supported.
(32-bit edition)
Microsoft Visual Studio 2010 Required to integrate the Cognex HMI Display Control into your
HMI or custom application.

1 In-Sight firmware/software versions older than 4.8.0 may work with Track &Trace 2.0.0; however, Cognex only tests and
supports Track & Trace 2.0.0 with In-Sight Explorer 4.8.0 and higher.
2 Track & Trace pattern fixture and label position inspection features are not available on In-Sight ID reader models (indicated by '*').
3 VisionView 1.6.2 and higher is required when using the Authorization Mode.

3
4
Getting Started
Install Track & Trace
This section describes how to install the In-Sight Track & Trace software on your In-Sight vision system and on the PC that
will be used to host the user interface. The following instructions assume that your In-Sight vision system has 4.8.0 or later
firmware version installed and is already available on the network.

1. Install In-Sight Explorer 4.8.0 or later software. (This is only necessary if 4.8.0 or later is not already installed.)

2. Install In-Sight Track & Trace 2.0.0 software.

3. Launch In-Sight Explorer from the Windows Start Menu.

4. Log on to the vision system and navigate to the Spreadsheet View.


5. From the Sensor menu, open the Active Cells Limit dialog and increase the number of cells to 7168 cells. Click
OK to exit the dialog. The vision system will automatically reboot.
6. Locate the Track & Trace license you received from Cognex. From the Sensor menu, open the Licensing dialog
and enter the license in the Enter a new license field. Click the Add button to add the license to the vision system.
Click Close to exit the dialog.

Note: The license is a unique 48 character alphanumeric string encoded with the MAC address of a specific
vision system. You must install a license on every vision system that will run the Track & Trace job. If you
receive a “The license is not valid” error message, the license you are trying to enter is not valid for the current
vision system. Please contact the Cognex representative who issued the license for further assistance.

7. From the File menu, select the Open Job dialog. Navigate to the In-Sight Track & Trace installation directory; the
default is: C:\Program Files\Cognex\In-Sight\In-Sight Track and Trace 2.0.0\Job File. Highlight the Track_
Trace.job file and click Open.
8. Save the Track_Trace.job file to the vision system.
9. From the In-Sight Network tree, right-click on the vision system and select Properties. Note the IP address of the
vision system.
®
Note: For more information on using In-Sight Explorer, refer to the In-Sight Explorer Help file, an online
HTML Help file provided on the In-Sight Explorer DVD.

10. To verify that the installation was successful, log off the vision system in In-Sight Explorer and launch the Cognex
HMI Display Control Sample application from the Windows Start Menu.

5
11. In the Sample Controls dialog, enter the IP address, user name and password of the vision system and click
Connect.

Figure 2-1: HMI Display Control Sample Application, Sample Controls Dialog

If you have correctly followed the previous steps, you will be connected to your In-Sight vision system and the main
screen of the Track & Trace job will be visible at the top of the image.

Figure 2-2: HMI Display Control Sample Application, Status Panel

6
Getting Started

Set Up the Image


Before you can begin configuring Track & Trace, you need to obtain an image of a label. Click the Adjust Image button,
then click Focus to enter live acquisition mode. Position a label in the image, focus the lens and adjust the image until
you have a clear image of the label data. You can also load an image or a job file on a vision system by dragging-and-
dropping it onto the image area of the Cognex HMI Display Control Sample application.

Note: The Cognex HMI Display Control Sample application provides focus, pan/zoom and rotate settings for the
image. If you need to adjust brightness, light intensity, white balance or other AcquireImage parameters, please go to
the In-Sight Explorer and adjust those parameters in the Spreadsheet View. For more information, refer to the
®
AcquireImage topic in the In-Sight Explorer Help file provided on the In-Sight Explorer DVD.

Figure 2-3: Live Acquisition Mode

7
Configuration Utility
The Configuration Utility includes the In-Sight Explorer Configuration Utility and Track & Trace Language Utility.

In-Sight Explorer Configuration


The In-Sight Explorer Configuration Utility allows you to set the default view to Spreadsheet View and enable the Audit
Message Settings dialog in In-Sight Explorer. To edit the In-Sight Explorer Configuration:
1. Launch the In-Sight Track & Trace Configuration Utility by opening the Windows Start Menu and clicking All
Programs > Cognex > In-Sight > In-Sight Track & Trace 2.0.0 > Configuration Utility.

Figure 2-4: Configuration Utility Menu, Edit Configuration

2. Click the Edit Configuration button to open the In-Sight Explorer Configuration Change dialog. All In-Sight
Explorer versions installed on your PC will be listed in the dialog.

Figure 2-5: In-Sight Explorer Configuration Change Dialog

3. Select the In-Sight Explorer version you want to configure, and click the Configure Selected Application button.
Once the configuration is completed, the corresponding Audit and Spreadsheet options will be changed to True.

Note: If the Spreadsheet status is changed to True, The Make Spreadsheet View the Default View checkbox
(located under System --> Options --> Job View) in the In-Sight Explorer will be automatically checked.

4. Click the Back button to close the In-Sight Explorer Configuration Change dialog and exit the In-Sight Track &
Trace Configuration Utility.

8
Getting Started

Set Up the Language


Optionally, you can change the language to use in the Track & Trace job using the Configuration Utility. English (default),
French, German, Spanish, Italian, Portuguese and Korean languages are supported.

Note: The In-Sight Track & Trace Configuration Utility only changes the localization of the text contained in the Track &
Trace job. Changing the language will not change the localization of the Status Panel in the Cognex HMI Display
Control. To change the language localization of the Cognex HMI Display Control, see Language Localization on page
104, or refer to the Cognex HMI Display Control Reference help file installed with Track & Trace.

1. Make sure that the Track & Trace job is already loaded to your vision system.
2. Launch the In-Sight Track & Trace Configuration Utility by opening the Windows Start Menu and clicking All
Programs > Cognex > In-Sight > In-Sight Track & Trace 2.0.0 > Configuration Utility.

Figure 2-6: Configuration Utility Menu, Change Language

3. Click the Change Language button to open the Track & Trace Language Change dialog.

Figure 2-7: Track & Trace Language Change Dialog

4. Enter the IP Address, Username and Password of your vision system, and press the Connect button. Once the
connection is established, the active job name will be displayed and the Change Language button will be
enabled.
5. Press the Change Language button.

9
6. In the Open dialog, select the language file of your choice and click Open. The default location of the language
files is: C:\Program Files\Cognex\In-Sight\In-Sight Track and Trace 2.0.0\Job File\Language Files. A progress bar
will be displayed to track the load process.
7. Once the language transfer is completed, close the Track & Trace Language Change dialog and exit the In-Sight
Track & Trace Configuration Utility.

10
Setting Up Track & Trace
This chapter describes how to configure Track & Trace to inspect label data, verify ID codes and OCR line data and to
output the results to an MES, serialization database or PLC.

Track & Trace Setup Overview


All of the settings needed to configure the Track & Trace job for inspecting label data can be accessed by clicking the
Setup button on the Track & Trace main menu.

Figure 3-1: Track & Trace Main Menu

The Setup menu presents the list of screens you will use to configure all of the inspection and communications settings.
The following sections describe each screen in detail.

Figure 3-2: Setup Menu

11
IMAGE SETTINGS Screen
The IMAGE SETTINGS screen configures the vision system’s image acquisition settings.
®
Note: For detailed information on the image acquisition settings, see the AcquireImage topic in the In-Sight Explorer
Help file.

Figure 3-3: IMAGE SETTINGS Screen

Trigger Type
Specifies the source of the image acquisition trigger when the vision system is online:

l Camera (default): Acquisition will be triggered on a rising edge sensed at the vision system’s acquisition trigger
input.
l Continuous: Acquisition will be “free running” (as fast as possible).

Note: Continuous trigger is intended for demonstration mode only, and should not be used during production.

l External: Acquisition will be triggered on a rising edge sensed at a discrete input bit configured as the
Acquisition Trigger.
l Manual: Acquisition will be triggered when F5 is pressed.

Exposure Time
Specifies the image exposure time, in milliseconds; when connected to an In-Sight 5604 line scan vision system, the
exposure time is set in microseconds (µsec).

Start Row
Specifies the first row of pixels to be transferred from the image sensor into memory on the vision system.

12
Setting Up Track & Trace

Number of Rows
Specifies the number of rows of pixels to be transferred into the memory on the vision system. The maximum number of
rows allowed is determined by the resolution of the connected vision system.

Gain
Specifies the gain (0 to 255) of the amplifier stage that precedes the analog-to-digital converter.

Note:
l When connected to an In-Sight 5604 line scan vision system, the Gain setting may be incremented by 0.25
increments, with the range remaining from 0 to 255, providing for very fine gain adjustments.
l When connected to an In-Sight Micro 1402 or In-Sight 7000 series vision system, the Gain setting is more
sensitive than other In-Sight models. If a job is developed on another In-Sight model (with the default Gain
value of 128) and loaded onto the In-Sight Micro 1402 or In-Sight 7000 series vision system, the acquired
images will be saturated.

Orientation
Specifies the orientation of the image.

l Normal (default)

l Mirrored horizontally

l Flipped vertically

l Rotated 180 degrees

Note: The In-Sight 5604 line scan vision system only supports Normal and Mirrored horizontally Orientation settings.
Choosing Flipped or Rotated will have no effect.

Line Trigger Type


Specifies the type of encoder. The Line Trigger Type control is supported only when connected to an In-Sight 5604 line
scan vision system.
l Hardware Encoder: Specifies that the Steps Per Line setting and an external hardware encoder that will be used
to drive the line triggers.
l Software Encoder (default): Specifies that the Line Period setting will be used as a clock to drive the line triggers
at a defined interval.

Line Period/Steps Per Line


Specifies the time between lines in either microseconds (µsec) when the Line Trigger Type is set to Software Encoder, or
encoder steps when the Line Trigger Type is set to Hardware Encoder. The Line Period/Steps Per Line control is
supported only when connected to an In-Sight 5604 line scan vision system.
l Line Period: Specifies the period of time, in microseconds, per image line; 10.0 to 1,000,000 µsec (default = 40
µsec) when the Line Trigger Type is set to Software Encoder.
l Steps Per Line: Specifies the number of encoder steps per image line; 0.25 to 256 (default = 40 µsec) when the
Line Trigger Type is set to Hardware Encoder.

13
Note:
l To prevent missing line triggers, the Line Period value must be set so that the shortest time between any two
lines is 21.47 µsec greater than the Exposure setting (at a minimum of 1.33 µsec).
l The Steps Per Line value should be incremented by 0.5 for single line hardware encoders, or 0.25 for
quadrature hardware encoders.

Encoder Acquisition Timeout


Specifies the maximum amount of time, in milliseconds, to acquire an image (0 to 300,000; default = 0). If the image
acquisition has not been completed within the specified time, the acquisition will be aborted and an Acquisition Error will
be issued. The Encoder Acquisition Timeout control is supported only when connected to an In-Sight 5604 line scan
vision system. If the value of Encoder Acquisition Timeout is set to 0, then no timeout will be applied.

Clip Mode
Specifies an action if an image acquisition trigger is received but the specified number of lines have not yet been
acquired. The Clip Mode control is supported only when connected to an In-Sight 5604 line scan vision system.

Note:
l When either Fill Black or Reduce Image Lines are selected, the In-Sight 5604 line scan vision system may only
receive acquisition triggers from the Camera Trigger.
l The Fill Black option requires roughly 2 µsec per line of fill (e.g., 0.2 milliseconds for 100 lines). 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.

l No Clipping (default): Specifies that the image trigger will be ignored and an "Acquisition error" event will be
generated.
l Fill Black: Specifies that the remaining lines will be filled with black pixels, and a new image will be immediately
started. An "Acquisition error" event will not be generated.
l Reduce Image Lines: Specifies that the current image will be reduced to the size of the number of rows currently
acquired, and a new image will be immediately started.

Note:
l When using a color In-Sight vision system, image white balancing must be performed following these steps:

1. Using In-Sight Explorer, logon to an In-Sight system as a user with admin-level (Full) access.

2. Load the Track & Trace job file, and navigate to row 3 in the spreadsheet.
3. Press the White Balance button in cell N3 of the Track & Trace job file and specify the white
balance region.
4. Check the Enable White Balance checkbox in cell O3.

5. Trigger the vision system to acquire a single image, which will set the white balance.
6. Uncheck the Enable White Balance checkbox in cell O3.

14
Setting Up Track & Trace

LOCATION TOOLS Screen


The LOCATION TOOLS screen provides optional tools that can help to locate the ID codes and OCR lines in the image
and check that the label itself is positioned correctly. By default, all controls in the LOCATION TOOLS screen are
disabled.

Note: Location Tools are not available on In-Sight ID readers. When a Track & Trace job is loaded on an In-Sight ID
reader, all of the selections in the LOCATION TOOLS screen will be inaccessible.

Figure 3-4: LOCATION TOOLS Screen

Pattern Fixture
The Pattern Fixture tool can be used to train a model of a feature that is present on every label. The position of this
pattern can then be used as a fixture from which to locate the ID codes and text printed on the label. Check the Pattern
Fixture checkbox to train a model that can be used as a fixture.

Model
Click the X/Y button to select the area of the image containing the feature that will be trained as a model, then click the
Train button to teach the model. Make sure you select a feature that will be present in every image.
Search Region
Click the X/Y button to select the area of the image in which to search for a pattern that matches the trained model. During
operation, the pattern must be present within the search region to be found. If Pattern is selected as the Fixture for the ID
codes or OCR lines and the model cannot be found, the inspection will fail.

Minimum Score
Specify the minimum acceptable score for finding the pattern in the image. If the Actual Score is lower than the specified
Minimum, the inspection will fail (default = 60).

Label Position
Optionally, the Label Position tool can inspect whether a label has been correctly applied to a package. You can
configure the Label Position tool by locating label edges, an ID code or a pattern, and defining the range of tolerances

15
for the label position or skew. If the label is located outside of the specified area and/or at greater than the specified
angle, the inspection will fail even if the label can be located.
l Label Edges (default): The label position will be determined relative to the edges of the image. Configure the
label edges using the Vertical and Horizontal Edges controls.
l ID Code 1: The label position will be determined relative to the position of ID code 1 in the image.

l Pattern: The label position will be determined relative to the position of the pattern in the image.

Note: ID Code 2 cannot be used for the Label Position tool.

Vertical Offset and Horizontal Offset


Specify the position tolerance by adjusting the Range (-) and Range (+) values, which defines minimum and maximum
allowable distance (in pixels) from the reference point. (Vertical Offset: -2448 to 2448, Range (-) default = -50, Range (+)
default = 90; Horizontal Offset: -2048 to 2048, Range (-) default = -400, Range (+) default = 450).
When None is selected for the Fixture (default), the reference point is the upper-left corner of the image. When ID Code 1
is the selected Fixture, the reference point is the upper-left corner of the code. When Pattern is the selected Fixture, the
reference point is the center of the pattern.

Note:
l The Vertical and Horizontal Offset controls will not be enabled when the Label Position checkbox is
unchecked, or when the Vertical and/or Horizontal Edge checkboxes are unchecked.
l If both the Vertical Offset and the Horizontal Offset checkboxes are disabled, the Label Position tool only
inspects whether the selected Label Position option has been found or not.

The location (in pixels, below Actual) will be displayed for each edge of the selected Label Position option that can be
located. When Edges are used without a fixture, or Pattern or ID code is used without Edges, the displayed location will
be relative to the image. When a pattern or ID code is used to fixture Edges, the displayed location will be relative to the
pattern or ID code. If one or both Offset checkboxes are enabled and an edge cannot be found, or if an edge is located
outside of the specified tolerance, the inspection will fail. The range of offset varies depending on the resolution of the
camera.

Note: If Label Edges is the selected Label Position tool, and each edge of the label cannot be located, “Edge Not
Found” will be displayed.

Angle
If either the vertical or horizontal edge of the selected Label Position option can be found, the angle of the label (in
degrees, below Actual) will be displayed. Specify the angle tolerance by adjusting the Range (-) and Range (+) values,
which defines minimum and maximum allowable rotation (in degrees) of the label in the image. If the checkbox is
enabled and an angle is outside of the specified tolerance, the inspection will fail. (Angle: -180 to 180, Range (-) default =
-5.0, Range (+) default = 5.0 ).

Label Edges
The Label Edges controls are enabled only when Label Edges is the selected Label Position tool.

Vertical Edge and Horizontal Edge


Click the X/Y buttons to position and size the regions in which to search for the vertical and horizontal edges of the label.
If one or both edge checkboxes are enabled and an edge cannot be found, the inspection will fail.

16
Setting Up Track & Trace

Note:
l If the Vertical Edge checkbox is disabled, the Horizontal Offset control is grayed out. If the Horizontal Edge
checkbox is disabled, the Vertical Offset control is grayed out.
l If both the Vertical Edge and Horizontal Edge checkboxes are disabled, the Label Position inspection will
always pass.

Fixture
Optionally, the Fixture tool can be used to inspect whether the label is positioned correctly relative to a nearby, visible
feature on the package, regardless of where the package is in the image. If the fixture cannot be located, the inspection
will fail.
l None (default): No Fixture will be used. The label position will be located by its Vertical and/or Horizontal Edge
locations in the image.
l Pattern: The label position will be located by its Vertical and/or Horizontal Edge locations relative to the trained
Pattern in the image.
l ID Code 1: The label position will be located by its Vertical and/or Horizontal Edge locations relative to the
position of the ID code in the image.

Note:
l Always reposition the Vertical and Horizontal Edges after selecting Pattern or ID Code 1 for the Fixture.
Otherwise, selecting a fixture may cause the Vertical and Horizontal Edge’s regions to shift to new locations in
the image that do not contain the edges, and the inspection may fail.
l When attempting to reposition the Vertical and Horizontal Edges, the regions may be out of the image area. In
this circumstance, press the Pan/Zoom button to enter Pan/Zoom Mode (if using the Cognex HMI Display
Control or VisionView application). Click the Zoom Out button repeatedly until the region appears within the
image area, and click OK. Then, reposition the region using Interactive Graphics Mode.

17
ID CODE 1 and ID CODE 2 Screens
Track & Trace can read 1D or 2D codes on a single label or package, validate the encoded data, and grade the quality of
DataMatrix codes. Each ID code is set up using separate screens: ID CODE 1 and ID CODE 2. The contents of both
screens are identical. By default, all controls in the ID CODE 1 and the ID CODE 2 are disabled.

Figure 3-5: ID CODE 1 Screen

ID Code Reading Settings


The following settings must be configured to read an ID code, which is a prerequisite for validating the encoded data and
for grading the quality of a DataMatrix code.

Enable
Check this checkbox to read the ID code. When the checkbox is disabled, the ID code will not be used in determining the
overall inspection result. However, the inspection will fail if the ID code is disabled, but ID code has been selected as the
Label Position or Fixture tool in the LOCATION TOOLS screen, as the Fixture in the OCR LINES screen, or as the Source
in the VERIFICATION screen.

Name
Enter the name of the ID code. This name appears in the title of the ID CODE screen, which is useful if ID CODE 1 and ID
CODE 2 are configured to read different code types. The default name for the ID CODE 1 screen is "DataMatrix", and the
default name for the ID CODE 2 screen is "Code 2".

Fixture
Specify the fixture to use to position the ID code region in the image.

l None (default): Fixture will not be used. A fixture is usually not necessary when reading a 2D code, such as
DataMatrix.
l Pattern: The Pattern Fixture will be used. A Pattern Fixture is most useful when reading a 1D barcode.

l ID Code 1 (ID CODE 2 screen only): The ID code 1 will be used as a fixture.

l Custom: The Custom Fixture will be used. The Custom Fixture value can be edited by users in cells R3, S3 and
T3 of the Track & Trace job in the In-Sight Explorer spreadsheet. For more information, see User-Configurable
Parameters on page 61.

18
Setting Up Track & Trace

Region
Click the X/Y button to define the area of the image in which to search for the ID code. Move and resize the region using
the buttons in the panel on the right, or directly using the interactive region graphic displayed on top of the image.

Note: Always reposition the ID code region after changing Fixture options. Otherwise, changing the Fixture options
may cause the ID code region to shift to a new location in the image that does not contain the ID code, and the read
may fail.

Figure 3-6: Position and Size the ID Code Region

Data Format
l None

Select None if the data in the ID code was not encoded according to the GS1, the FDA serialized National Drug
Code (sNDC) or the German pharmaceutical industry barcode packaging system (securPharm) standard.
l GS1

Select GS1 if the data in the ID code has been encoded according to GS1 standards (http://www.gs1.org/). Track
& Trace job supports GS1 data items: GTIN, Lot Number, Exp Date, Production Date, Best Before, Serial Number
and Price. The encoded data must meet the following requirements:
l The data string must begin with the FNC1 symbology identifier character (which is never displayed or
printed).
l All of the data elements in the ID code must be preceded by a valid GS1 Application Identifier (AI), which
is a two or three digit number, depending on the AI.
l All of the data elements must contain the correct number of characters for their corresponding AI.

l For AIs that specify variable-length data, an FNC1 field separator must immediately follow the data
element.

19
l sNDC

Select sNDC if the data in the ID code has been encoded according to the FDA serialized National Drug Code
(http://www.fda.gov/downloads/RegulatoryInformation/Guidance/UCM206075.pdf). The encoded data must meet
the following requirements:
l The data string must consist of a 10-digit NDC number immediately followed by a unique serial number of
up to 20 alphanumeric characters.
l The three sections of the NDC number can be separated by a space or a dash; however, the data string
must not contain any other special formatting, application identifiers or checksum characters.
l securPharm (strict)

Select securPharm (strict) if the data in the ID code has been encoded according to the German pharmaceutical
industry barcode packaging system using DataMatrix symbols.The encoded data must include the following
elements:
l Pharmacy Product Number (PPN)

l Serial Number

l Lot and Expiration

l GTIN (optional)
l securPharm (loose)

Select securPharm (loose) if the data in the ID code has been encoded according to the German
pharmaceutical industry barcode packaging system using DataMatrix symbols.The encoded data requires that
only Pharmacy Product Number (PPN) be included, with the other information being optional.

Note:
l If the encoded data fails to meet one or more of the requirements, the ID code is not compliant with the selected
Data Format. The inspection will fail even though the contents of the ID code can be read.
l ID Code 1 must be used for codes that contain GS1, sNDC or securPharm data. The GS1, sNDC or
securPharm data, as selected Data Group in the OUTPUT screen, are only available for ID Code 1.
l The sNDC number can also be included as part of the GTIN data element in a GS1 code. If this is the case,
select GS1 for the Data Format.

Code Type
Select the type of 1D barcode or 2D code to read.

l 1D/Stacked (default)

l DataMatrix

l QR Code

Read Timeout
Specifies the maximum amount of time (in milliseconds) allowed to read the ID code. The inspection will fail if the ID
code cannot be read before the Read Timeout has been reached. The maximum Read Timeout is 2000 milliseconds. If
the value of Read Timeout is set to 0, then no timeout will be applied.

20
Setting Up Track & Trace

DataMatrix Code Grading Settings


Optionally, Track & Trace can grade the quality of 2D DataMatrix codes while the vision system is Online. This feature
can be used to detect changes in the quality of the ID code, which could indicate that the printing system requires
servicing.

Note: Online grading detects relative changes in DataMatrix code quality, but it does not measure absolute quality. A
verifier is needed to accurately measure the quality of a DataMatrix code. Contact your Cognex representative for
information on DataMan verifiers.

Figure 3-7: DataMatrix Code Grading Settings

Process Grading
Selects the standard to use for Online grading of DataMatrix code quality.

l None (default): Select None if the ID code type is not DataMatrix, or if quality grading is not required.

l ISO 15415: Select ISO 15415 grading metrics for Online quality inspection of DataMatrix codes printed on
pharmaceutical and medical device packaging.
l ISO 16022: Select ISO 16022 grading metrics if more rigorous code quality inspection is required. However, the
ISO 16022 grading standard requires a precisely controlled lighting system to ensure accurate results, and is
generally better suited to Offline code quality inspection.
l AIM Process Control and AIM Contract Compliance: AIM Process Control and AIM Contract Compliance are
used to grade direct part marks (DPM), such as on medical instruments.
l Custom: Select Custom if a user defined grading metric is used. The formula that defines the custom grading
metric must evaluate to an A - F grade, which must be contained in cells P3 (ID Code 1) and Q3 (ID Code 2) of
the Track & Trace job in In-Sight Explorer spreadsheet. When Custom grading is selected, all of the controls for
the Individual Grades will be disabled. For more information, see User-Configurable Parameters on page 61.

Grading Timeout
Specifies the amount of time (in milliseconds) allowed for code grading. The grading will fail if the ID code cannot be
graded before the Grading Timeout has been reached. The maximum Grading Timeout is 5000 milliseconds. If the value
of Grading Timeout is set to 0, then no timeout will be applied.

21
Minimum Grade
Select the minimum grade (A - F) required for passing the DataMatrix code quality inspection. Each of the Individual
Grades must meet or exceed the Minimum Grade, or the inspection will fail. For example, if the Minimum Grade is C,
then all of the nine individual metrics must score C or better, or the inspection will fail.
Select Individual Grades to specify the minimum grade for quality metric. This allows you to fine tune the DataMatrix
code quality inspection criteria by requiring higher or lower grades for specific metrics. For example, the Grid Non
Uniformity metric could have a minimum grade of D, and all the other metrics have minimum grades of C.

Individual Grades
If the Minimum Grade is set to Individual Grades, a minimum grade can be individually specified for each of the nine
quality metrics:
l Contrast

l Fixed Pattern Damage

l Modulation

l Grid Non Uniformity

l Horizontal Growth

l Vertical Growth

l Non Uniformity

l Unused EC

l RefDecode

During inspection, each quality metric must score at or above its specified grade, or the inspection will fail.
®
Note: For more information on DataMatrix code grading, see the Verifying 2D Symbol Quality topic in the In-Sight
Explorer Help file.

22
Setting Up Track & Trace

OCR LINES Screen


Track & Trace can verify up to six lines of printed text on a single label or package.

Figure 3-8: OCR LINES Screen

OCR Line Settings


Up to six OCR lines can be included in the inspection. Each OCR Line is configured individually.

Line #
Enable the checkbox next to each of the lines that will be inspected. If the checkbox for a line is disabled, that line will not
be included in the inspection. By default, all checkboxes are disabled.

Name
Click on the field to open the on-screen keyboard, and enter a name reference for the OCR line. Optionally, when the
Use Name as Prefix checkbox is checked, this name will be added to the OCR match string for the OCR line.

Note: Make sure that the name entered in the Name field matches the name of the OCR line in the match string when
the Use Name as Prefix checkbox is checked, otherwise the inspection will fail.

Fixture
Select the fixture to use for each OCR line. For reliable OCR performance, the position of the printed text in the image
must be highly repeatable from one image to the next. Using a fixture ensures that the region for each OCR line will
always be located around the text, even if the text position varies slightly in successive images.
l None: Fixture will not be used. Choose this option if the ID code 1 is not enabled, or none of the fixtures below
are supported on the vision system.
l ID Code 1: The OCR line will be fixtured relative to the location of ID code 1 in the image. This selection offers the
fastest performance if a DataMatrix code is printed on the label.
l Pattern: The OCR line will be fixtured relative to the location of the pattern in the image, if a model was trained in
the LOCATION TOOLS screen.
l Label: The OCR line will be fixtured relative to the location of the label position in the image, if a model was
trained in the LOCATION TOOLS screen.

23
l Custom: The OCR line will be fixtured relative to the custom fixture in the image. The custom fixture value can be
edited by users in cells R3, S3 and T3 of the Track & Trace job in In-Sight Explorer spreadsheet. For more
information, see User-Configurable Parameters on page 61.

Font
Select the font to use for each OCR line. Track & Trace supports up to five fonts in a single job, and there is no
requirement that the same font be used for all lines.

Note: The Track & Trace job includes a pre-trained font (Font #5, Demo), which is designed to work with the sample
images included with Track & Trace. In most cases, however, you should train your own font using actual samples of
your labels or packages as they will be marked during manufacturing. For instructions on training and editing fonts,
see TRAIN FONTS Screen on page 26.

Minimum Score
Specify the minimum score (0-100; default = 70) that the OCR line must receive to pass.

Regions
Click the Regions button to define the area of the image in which to locate OCR lines. Each OCR line has a
corresponding region box with a line name on the upper-left side. You can select and modify the regions of all selected
OCR lines simultaneously in one screen.
You can move and resize regions using the buttons in the panel on the right, or directly using the interactive region
graphic displayed on top of the image. The region should be sized large enough to contain all of the characters, but not
so large that it encompasses any potentially confusing background features, or portions of other characters.

Note: Always reposition the regions for each OCR line after changing Fixture options. Otherwise, changing the Fixture
options may cause the OCR line regions to shift to a new location in the image that does not contain the printed text,
and the inspection may fail.

Figure 3-9: Set Regions for OCR Lines

Train Fonts
Click the Train Fonts button to train and edit fonts in the TRAIN FONTS screen. For instructions on training and editing
fonts, see TRAIN FONTS Screen on page 26.

24
Setting Up Track & Trace

Date Format
Click the Date Format button to specify the date format in the DATE FORMAT screen. For detailed information, see
DATE FORMAT Screen on page 33.

OCR Line Timeout


Specifies the maximum amount of time (in milliseconds) allowed to read the OCR lines. The inspection will fail if the OCR
lines cannot be read before the OCR Line Timeout has been reached. The maximum OCR Line Timeout is 5000
milliseconds. If the value of OCR Line Timeout is set to 0, then no timeout will be applied.

Note: The value specified in the OCR Line Timeout represents the timeout for one OCR line verification/match. If all
six lines are activated, the execution time could be 6 x OCR Line Timeout (ms). If one OCR line reaches its timeout
setting, the result of that line will be failed, but the other OCR lines will still be executed.

Use Name as Prefix


Check the Use Name as Prefix checkbox to include the name of the OCR line in the match string that will be used to
inspect the printed text. The region for each OCR line must be resized to include all of the characters in the match string.

Figure 3-10: Use Name as Prefix

Use Comma for Decimal


Check the Use Comma for Decimal checkbox if a comma (,) is used to represent a decimal point in an OCR line
containing price.

Note: This checkbox is only enabled when one of the OCR lines is selected as the Source option and GS1 - Price is
selected as the Data Type option in the VERIFICATION Screen.

25
TRAIN FONTS Screen
A Track & Trace job supports up to five fonts at a time. Displayed adjacent to each font (numbered 1 – 5) are the Font
Name, Train String, Train buttons and Train Regions button.

Figure 3-11: TRAIN FONTS Screen

TRAIN FONTS screen supports two types of font training: the OCRMax font training and the Show & Go font training,
which allows users to adjust the region and train the font in one step during run-time.

OCRMax Font Training


1. Identify the OCRMax Font # (Font 1, 2, 3 or 5) to train, and check the corresponding checkbox next to the
OCRMax button to enable the OCRMax font training.

Figure 3-12: Enable OCRMax Font Training

26
Setting Up Track & Trace

2. Click the Train Regions button. If one or more fonts are enabled, the Train Regions of all enabled fonts will be
displayed and can be specified simultaneously in one screen. Specify the area of the image in which to locate
characters that need to be trained, then click OK.

Note:
l Train Regions must be defined first before starting OCRMax font training. Otherwise clicking the
OCRMax button will return #ERR.
l When specifying the Train Regions, make sure that the train region is larger than the line of text by at
least half a character width on all sides. If doing so results in the inclusion of other features enclosed
within the train region, enable the Ignore Border Fragments checkbox to improve the training result.
l If you choose to use the same font for several OCR lines, specify the region separately each time before
training an OCR line.

Figure 3-13: Specify Font 1 Region

3. Click the OCRMax button to open the OCRMax Font Training screen, which allows you to train, view, rename and
remove characters. For detailed instructions on training and editing fonts using the Track & Trace user interface,
see Appendix A - OCRMax Font Training on page 67.

Figure 3-14: Open OCRMax Font Training Screen

27
4. If you have correctly trained the font using OCRMax Font Training, you will see labeled characters in yellow or
green above the string in the main screen. Characters labeled in yellow means that the font training succeeded,
but there is no string to match. Select the corresponding OCR line in the Verification screen, and all characters
will be labeled in green. If font training fails, characters will be labeled in red with question marks.

Figure 3-15: Training Result

Show & Go Font Training


1. Check the checkbox next to the Train button in Font #4 to enable the Show & Go font training.

Figure 3-16: Enable Show & Go Font Training

28
Setting Up Track & Trace

2. Click the Train Regions button. If one or more fonts other than Show & Go are enabled, the Train Regions of all
enabled fonts will be displayed and can be specified simultaneously in one screen. Specify the area of the image
in which to locate characters that need to be trained, then click OK.

Note:
l The Show & Go region must be defined first before starting Show & Go font training. Otherwise clicking
the Train button will return #ERR.
l When specifying the Train Regions, make sure that the train region is larger than the line of text by at
least half a character width on all sides.
l If you choose to use Show & Go font training for several OCR lines, specify the region separately each
time before training an OCR line.

Figure 3-17: Specify Show & Go Font Region

3. Click the Train String text box next to the Show & Go font name to open the on-screen keyboard, and enter the
string that needs to be trained. The string entered should not contain any spaces. Click OK to close the on-screen
keyboard.

Figure 3-18: Enter Show & Go Train String

29
4. After the string is entered, press the Train button to train the font.

Note: When the Train button is pressed, the new font will be added to the previously trained fonts. If you want
to clear all previously trained characters from the Show & Go font, click the Clear Font button.

Figure 3-19: Train Show & Go Font

5. Click OK to go back to the main screen. If you have correctly followed the previous steps, you will see labeled
characters in either yellow or green above the string. Characters labeled in yellow means that the font training
succeeded, but there is no string to match. Select the corresponding OCR line in the Verification screen, and all
characters will be labeled in green. If font training fails, characters will be labeled in red with question marks.

Figure 3-20: Show & Go Font Training Result

30
Setting Up Track & Trace

Back to OCR Lines


Click this button to go back to the OCR Lines screen.

Back to Bundle Reader


Click this button to go back to the Bundle Reader screen.

Use Manual Segmentation Settings For Font1


Check the Use Manual Segmentation Settings For Font1 checkbox to adjust and modify the settings that
segment characters in Train Regions.

Note: In order to use the User Manual Segmentation Settings For Font1 function, Font1 needs to be enabled first.

l Ignore Border Fragments: Specifies whether or not the function will completely ignore any fragments that touch
any border of the train region. Ignoring such fragments can be useful for non-text features, such as the edges of
labels, that might be included within the train region. By the fault, the Ignore Border Fragments checkbox is
enabled.

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 the checkbox is enabled.

l Character Polarity: Specifies the polarity of the characters in the train region. Black on White (dafault), White on
Black or Auto.
l Character Width Type: Specifies how the widths of characters in the font are expected to vary. Auto (default),
Fixed or Variable.
l Min Char Width: Specifies the minimum width of a character’s character region, in pixels (1 - 1000; default = 3).

l Use Max Char Width: Check the checkbox to use the maximum allowable width of a character’s character
region.
l Max Char Width: Specifies the maximum allowable width of a character’s character region, in pixels (1 - 5000;
default = 100). This setting is only available when the Use Max Char Width is enabled.
l Min Char Height: Specifies the minimum height of a character’s character region, in pixels (1 - 1000; default = 3).

l Use Max Char Height: Check the checkbox to use the maximum allowable height of a character’s region.

l Max Char Height: Specifies the maximum allowable height of a character’s character region, in pixels (1 - 5000;
default = 100). This setting is only available when the Max Char Height is enabled.
l Maintain Char Aspect Ratio: Specifies whether or not to maintain the aspect ratio when re-sampling the
unwrapped image at run-time.
l Use Min Char Aspect Ratio: Check the checkbox to use 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 region.
l Min Char Aspect Ratio: Specifies the minimum allowable aspect ratio (0 - 500; default = 80) of a character. This
setting is only available when the Use Min Char Aspect Ratio is enabled.
l Angle Range: Specifies the angle search range (-90 to 90; default = 0), in degrees.

l Skew Range: Specifies the skew search range (-90 to 90; default = 0), in degrees.

l Char Fragment Merge Mode: Specifies how the function should merge character fragments when forming
characters during segmentation. Require Overlap (default), Set Min Inter-Character Gap or Set Min Inter-
Character/Max Intra-Character Gap.

31
l Min Char Fragment Overlap: Specifies the minimum fraction (0 - 100; default = 0) by which two character
fragments must overlap each other in the X direction, in order for the two fragments to be considered as part of
the same character.
l Max Intra-Char Gap: Specifies the maximum gap size, in pixels (0 - 1000; default = 5), that can occur within a
single character, even for damaged characters.
l Min Intra-Char Gap: Specifies the minimum gap size, in pixels (0 - 1000; default = 0), that can occur between two
characters.
l Min Char Fragment Size: Specifies the minimum number of foreground (i.e., text) pixels (0 - 1000; default = 15)
that a fragment must have in order to be considered for possible inclusion in a character.
l Min Char Size: Specifies the minimum number of foreground (i.e., text) pixels (0 - 5000; default = 30) that a
character must have in order to be reported.

®
Note: For detailed information on Font Training settings, see the OCRMax topic in the In-Sight Explorer Help file.

32
Setting Up Track & Trace

DATE FORMAT Screen


Most standard ID codes format the date value as YYMMDD. However dates on pharmaceutical labels are often printed in
a different format. The DATE FORMAT screen allows you to convert different date formats to the actual format that is
printed on the label. This makes it possible to use the date information contained in a standard ID code as the match string
for OCR lines of printed date information.

Figure 3-21: DATE FORMAT Screen

To convert a date to match the format of the text printed on your label, make selections from the Setup the Date Format
lists to define the format of the date as it is printed on your label, including separator characters, punctuation and
spacing. For reference, the auto-generated result is displayed in the Converted Date field.
l Empty: No date information will be included.

l Year(YY): The two-digit year.

l Month(MM): The two-digit month.

l Cust(MM): The month, converted according to the entries in the Custom Month table. For example, if MM is “12”,
the default Cust(MM) would be “Dec”. If needed, click on each entry in the Custom Month table to change the text
for each month, for example “DEC” or “December” instead of “Dec”.
l Day(DD): The two-digit day.

l String: User-definable text. This selection must be used when the printed date contains spacing or punctuation,
or the year is printed in YYYY format (see the table below).
Using these above selections in various combinations, it is possible to convert a date to match the format of the date as it
is actually printed on your labels.
Table 3-1: Date Conversion Examples
Printed Date Format Date Format Selections
MM/YY Month(MM) String “/” Year(YY) Empty Empty Empty Empty
MM/YYYY Month(MM) String “/” String “20” Year(YY) Empty Empty Empty
DD/MM/YYYY Day(DD) String “/” Month(MM) String “/” String “/20” Year(YY) Empty
DD.MM.YY Day(DD) String”.” Month(MM) String “.” Year(YY) Empty Empty
Month-YYYY Cust(MM) String “-“ String “20” Year(YY) Empty Empty Empty

33
COMMUNICATION Screen
Before Track & Trace can exchange data with MES software, a database or PLC, the appropriate settings must be
configured in the COMMUNICATION screen.

Figure 3-22: COMMUNICATION Screen

Ethernet Communication
Track & Trace can receive batch setup information and send out inspection results over Ethernet. Ethernet
communication contains three channels: Channel 1, Channel 2 (send only) and MatchStringTable. For each Ethernet
communication channel, select the protocol that will be used to send or receive data. All three Ethernet communication
channels support standard TCP/IP.

Channel 1
Supported protocols used to exchange data with the most commonly used PLCs are TCP/IP, EIP, PROFINET and
Modbus TCP/IP. Additionally, Channel 1 can be set to Unused or to receive batch information using the Native Mode
command, Send Message.
l When Modbus TCP/IP is the selected protocols for Channel 1, the byte order must also be selected. Choose Big Big
Endian, Little Endian, Endian (16-bit swap), or Little Endian (16-bit swap) to match the settings used by the
remote device.

l When Native Mode is the selected protocol for Channel 1, the Acknowledge checkbox is disabled.

Note:
l The Send Message command must be issued in the format SM"[Batch Data]"0. Batch Data is user-defined in
the Message Format screen. Example: SM"@1-00012345679995-10JA28A-121231-1234567890181/"0.
l If EIP, Profinet or Modbus is selected, after sending a message to the Track & Trace job, you should trigger Soft
Event 1 manually.
l For more information on these communications protocols, see the Communications Reference topic in the In-
®
Sight Explorer Help file.

Channel 1 can be configured for Receive only, Send only or Send/Receive. When Channel 1 is set to Receive only or
Send/Receive, check the Acknowledge checkbox to return a message acknowledgement to the sender, when a
message is received with the correct input format. If a message is received with an incorrect input format, Track & Trace

34
Setting Up Track & Trace

will reply with a “FORMAT ERROR” message. In this case, verify that the format of the input string (as defined in the
Message Format screen) matches that of the message is actually being received.
Port, Packet Type and Timeout: Configure the Port, Packet type, and Timeout settings to match the settings used by
the devices with which Track & Trace is communicating.

Channel 2 (Send Only)


Channel 2 is used for sending data only. To activate Channel 2, choose the TCP/IP option.

Port, Packet Type and Timeout: Configure the Port, Packet type, and Timeout settings to match the settings used by
the devices with which Track & Trace is communicating.

MatchStringTable
The MatchStringTable function allows the job to receive up to 500 match strings (ID code serial numbers) at once, with a
maximum data size of 65,000 bytes over Ethernet.

Note:
l To optimize the usage of the MatchStringTable, it is recommended to send no more than 250 match strings per
batch. Otherwise, reporting unmatched codes might be interrupted and not all unmatched codes will be
reported.
l The strings are separated from each other with a separator character. The separator character can be edited in
the Message Format screen.

The MatchStringTable supports one protocol: TCP/IP. To activate the MatchStringTable, choose the TCP/IP option.

If the Receive Only option is selected, the Track & Trace job will verify received strings, but the list of not verified strings
will not be sent out. If the Send/Receive option is selected, the Track & Trace job will verify received strings, and the list
of unverified strings will be sent out .

Note: If the Receive Only option is selected and the MST No Matched is one of the selected options for Digital
Output, the Digital Output will signal that some of the ID codes are not verified.

Port, Packet Type and Timeout: Configure the Port, Packet type, and Timeout settings to match the settings used by
the devices with which Track & Trace is communicating.
For use case on how to set up a MatchStringTable, see Set Up the MatchStringTable on page 36.

35
Set Up the MatchStringTable
The following instruction provides basic setup information for the MatchStringTable function.

1. Click the Setup button on the Track & Trace main menu, and click the ID Code 1 button to open the ID CODE 1
screen.

Note: Both ID Code 1 and ID Code 2 can be used with the MatchStringTable function. If you want to match
strings with codes read as ID Code 2, use the ID Code 2 screen instead of ID Code 1 screen.

2. Specify the Name, Fixture, Region, Data Format, Code Type and other options in the ID Code 1 screen for the
code, and click OK.
3. Open the COMMUNICATION screen from the Setup menu and enable the Ethernet Communication.
4. Select the TCP/IP option to activate the MatchStringTable, and click OK.

5. If you want to verify received strings without sending out the list of unverified strings, select the Receive Only
option. If you want to verify received strings and send out the list of unverified strings, select the Send/Receive
option.
6. Configure the Port, the string's End Character and Timeout settings to match the settings used by the devices with
which Track & Trace is communicating.
7. Optionally, you can customize the Input Format or Output Format of the MatchStringTable by clicking the Format
button in the COMMUNICATION screen. For more detailed information on Message Format, see Message Format
on page 37.

Note: Changing the Input Format or Output Format in the FORMAT screen will affect the format of all strings,
including the strings being transferred via Channel 1 and Channel 2.

8. Enable the Digital Outputs and choose the output conditions for the selected lines to send MatchStringTable
pass/fail conditions to a PLC, switch or other automation control. The MatchStringTable digital output options are
MST Pass, MST Duplicate, MST Not Found and MST Not Matched. Select corresponding options according to
your job's requirements.
9. After setting all communication options, click OK to exit the COMMUNICATION screen.

10. Open the VERIFICATION screen from the Setup menu.

11. Enable the ID Code 1 or ID Code 2, depending on which ID code you choose to match strings with.
12. Select String Table from the Serial Number Check list, and click OK.

Note: Only one ID code can be used to verify the MatchStringTable. If both ID Code 1 and ID Code 2 are
enabled, and String Table is the selected Serial Number Check type for both codes, only the ID Code 1 will be
functional.

13. Click OK to exit the VERIFICATION screen and click Finish to go back to the main screen.

14. Switch to Online operation by clicking Online button in the main screen.

If you have correctly followed the previous steps, you can start to test the MatchStringTable function by sending batch
strings via Ethernet and match those strings with ID codes. To optimize the usage of the MatchStringTable, it is
recommended to send no more than 250 match strings per batch. Otherwise, reporting unmatched codes might be
interrupted and not all unmatched codes will be reported.

Note: If the End of Batch Character Before Data checkbox in the FORMAT screen is checked and the new string with
the first value of 1 is sent via Channel 1 , or the CHANGE BATCH button is manually pressed, all previously stored
statistics will be reset to zero and all strings will be cleared. To get the unmatched code list from the last batch, send a
"dummy" code (e.g., EndData) before the CHANGE BATCH button is pressed.

36
Setting Up Track & Trace

Message Format
From the COMMUNICATION screen, click the Format button to specify the starting, ending and separator characters
included in input and output strings.

Figure 3-23: FORMAT Screen

Input Format

Specify the ASCII decimal values for the starting, ending and separator characters that will be included in the input string
received by Track & Trace. The character values you select will depend on the format of the data at the output source (for
example, your MES software or serialization database).

Note:
l The contents and order of the batch information that will be supplied to Track & Trace from a remote data
source over Ethernet Channel 1 or MatchStringTable can be defined in the VERIFICATION screen.

Output Format

Specify the ASCII decimal values for the starting, ending and separator characters that will be used to format the output
string.

Note:
l The contents and order of the outgoing inspection results can be defined in the OUTPUT screen.
l When String is one of the selected options in the OUTPUT screen and the Sep Char checkbox is enabled, a
separator character is not appended to the text string.

End of Batch Character Before Data

When checked, the first part of the incoming string (before the first separator character) will be used as a new batch flag
to indicate that the rest of the string received through Ethernet Channel 1 is a new batch for verification. The statistics will
be created and reset when switching to a new batch. All stored strings will be cleared. The incoming Ethernet string will
be automatically indexed from 0, so the Ethernet Slot in the VERIFICATION screen does not need to be changed
manually.

37
Digital Outputs
Track & Trace allows up to 10 digital outputs to be used to signal pass/fail conditions to a PLC, switch or other
automation control. The 10 outputs are represented along two rows, numbered Line 0 – 4 and Line 5 – 9. For each
output line, select the pass/fail condition on which the output line will be activated.

Note: The number of available outputs depends on whether an In-Sight I/O module is connected to the vision system.
Without an I/O module, the In-Sight 5000 series and the In-Sight Micro series vision systems have only two, built-in
high speed outputs and the In-Sight 7000 series vision system has four, built-in high speed outputs. See your Cognex
representative to increase the number of outputs available to your vision system using an In-Sight I/O module.

The available conditions are:

l Unused: The output will never be activated.

l Part Pass: The overall inspection passed.

l Part Fail: The overall inspection failed.

l Read C1 Pass: ID Code 1 was read successfully.

l Read C1 Fail: ID Code 1 could not be read.

l Grade C1 Pass: ID Code 1 passed the code quality inspection.

l Grade C1 Fail: ID Code 1 failed the code quality inspection.

l Read C2 Pass: ID Code 2 was read successfully.

l Read C2 Fail: ID Code 2 could not be read.

l Grade C2 Pass: ID Code 2 passed the code quality inspection.

l Grade C2 Fail: ID Code 2 failed the code quality inspection.

l OCR Pass: All of the enabled OCR Lines were successfully verified.

l OCR Fail: One or more of the enabled OCR Lines could not be verified.

l Label Pos Pass: The Label Position inspection passed.

l Label Pos Fail: The Label Position inspection failed.

l Custom Part Pass: The custom inspection passed.

l Custom Part Fail: The custom inspection failed.

Note: The result of the Custom Part Pass/Fail will affect the final inspection result. If the result of the Custom
Part Pass/Fail is Fail, the final inspection result will be Fail. When error occurs, the displayed message will be
Custom Error.

l OCR Line 1...6 Pass: The specified OCR Line # was successfully verified.

l OCR Line 1...6 Fail: The specified OCR Line # could not be verified.

l MST Pass: ID Code serial numbers were successfully verified.

l MST Duplicate: The same ID Code serial number was verified more than one time.

l MST Not Found: One or more ID Code serial numbers were not found among stored serial numbers.

l MST No Matched: Not all ID Code serial numbers were verified.

Note: The MST No Matched will signal a valid value only when a new batch of serial numbers arrive.
Otherwise it will signal 0, indicating that no unmatched code was found.

38
Setting Up Track & Trace

l Custom A1...3 Pass:The specified custom alarm # indicates pass.

l Custom A1...3 Fail: The specified custom alarm # indicates fail.

Note: The result of the 3 Custom Alarms will NOT affect the final inspection result. Even if the result of the
Custom Alarm is Fail, the job’s final inspection result could be Pass.

Save Images via FTP


Check the Save Images via FTP checkbox to enable Track & Trace to transmit inspection images to a remote FTP server
for archiving or offline failure analysis.

Host Name
Enter the host name (or IP address) of the FTP server on the network where the image files will be saved.

User Name, Password


Enter the login credentials for the FTP server where the image will be saved. The user does not need to exist on the
vision system.

Format
Select BMP to save images in Windows bitmap format (.BMP extension). Select JPEG to save images in standard
encoded format (.JPG extension).

Filename
Specify the format of the image filename by defining the contents of up to five fields.

l Empty: The field will not be used.

l String: The field will contain user-definable text.

l Lot Number: The field will consist of the lot number extracted from the GS1-standard ID code (if available).

l OCR Line 1…6: The Name of the selected OCR Line, as specified in the OCR LINES screen.

l Date/Time: The vision system date and time. Requires that the vision system is set up to have its time set by an
SNTP server on the network.
l MAC Address: The unique identifier of the vision system.

l Host Name: The network name of the vision system.

l Counter: The 6-digit number of the last inspection, in nnnnnn format. When Counter is also a selection in the
OUTPUT screen, this allows inspection results to be associated with the corresponding image.

Part Pass, Part Fail


Check Part Pass to save images from passed inspections. Check Part Fail to save images from failed inspections.

Folder
Specify the folder location on the FTP server where the images will be saved.

®
Note: For more information, see the WriteImageFTP topic in the In-Sight Explorer Help file.

39
VERIFICATION Screen
The data contained in the ID code or OCR lines can be validated to ensure that it has been encoded according to either
the GS1, the FDA serialized National Drug Code (sNDC) or the securPharm standard, and that the decoded data
matches the data that is expected.

Note: The VERIFICATION screen can be accessed from the Setup Menu or the CONFIRM CHANGE BATCH Screen.

Figure 3-24: VERIFICATION Screen

Line Verification
Enable the checkbox next to each of the lines that will be configured to verify match strings. If the checkbox for a line is
disabled, that line will not be included in the verification. By default, all checkboxes are disabled.

Source
Select the data Source that will be verified for each enabled verification line. The following items are available:

l OCR Line 1 … OCR Line 6

l ID Code 1/ID Code 2 Full String

l ID Code 1/ID Code 2 GS1 GTIN

l ID Code 1/ID Code 2 GS1 Lot Number

l ID Code 1/ID Code 2 GS1 Exp Date

l ID Code 1/ID Code 2 GS1 Production Date

l ID Code 1/ID Code 2 GS1 Best Before

l ID Code 1/ID Code 2 GS1 Price

l ID Code 1/ID Code 2 sNDC NDC

l ID Code 1/ID Code 2 SP PPN

40
Setting Up Track & Trace

l ID Code 1/ID Code 2 SP Batch Number

l ID Code 1/ID Code 2 SP Exp Date

If neither ID Code 1 nor ID Code 2 contains GS1, sNDC or securPharm-compliant data, select ID Code 1/ID Code 2 Full
String as the data Source. In this case, the entire string contained in the ID code will be verified.
Match To
Every verification line must have a match string to specify the characters to match during the inspection. The match string
for all verification lines can be from the same Source, or verification lines can have different data types.
l ID Code 1 or ID Code 2: The match string for the verification line is contained in the specified ID code. A Data
Type must be selected to automatically extract the corresponding data from the ID code.
l Manual Entry: The match string for the verification line will be typed into the Manual Text Entry field.

l Ethernet: The match string for the verification line will be received over the network from the MES or database.
Ethernet Channel 1 must be configured in the COMMUNICATION Screen, and the input string must be defined in
the Message Format screen.

Data Type
If the Match To option is configured to either ID Code 1 or ID Code 2 and the ID code contains GS1, sNDC or
securPharm data, Track & Trace will automatically extract the match string from the ID code according to the data type
you choose. Select the corresponding data type from the following list:
l Full String

l GS1 - GTIN

l GS1 - Lot Number

l GS1 - Exp Date

l GS1 - Production Date

l GS1 - Best Before

l GS1 - Serial Number

l GS1 - Price

l CIP13

l sNDC NDC

l sNDC Serial Number

l SP PPN

l SP Batch Number

l SP Exp Date

l SP Serial Number

Note:
l Select Full String if neither ID Code 1 nor ID Code 2 contains GS1, sNDC or securPharm-compliant data. In
this case, the entire string contained in the ID code will be used as the match string for the verification line.
l Select the CIP13 when the ID code contains a GS1 GTIN, but the printed text is in the CIP13 format. The CIP13
Data Type will automatically strip the leading 0 from the GTIN so that it can be used as the match string for the
printed CIP13.
l The Data Type will be ignored if the Match To option is configured to either Manual Entry or Ethernet.

41
Manual Text Entry
If the Match To option is set to Manual Entry, the Manual Text Entry field will be enabled. Click on the field to open the
on-screen keyboard and enter the match string.

Ethernet Slot
If the Match To option is set for Ethernet, the Ethernet Slot will be enabled. Select the Ethernet Slot (1 - 14) from which
the match string will be received.

Current Batch
For each enabled verification line, the current match string will be displayed under the Current Batch column if it can be
determined. A blank Current Batch for a verification line indicates that the match string cannot be determined for one of
the following reasons:
l The Match To option is set to ID Code 1 or ID Code 2, but the code cannot be read. Go to the appropriate ID
CODE screen and verify that the settings are correct.
l The Match To option is set to Manual Entry, but the match string has not yet been entered in the Manual Text
Entry field.
l The Match To option is set to Ethernet. The match string will be updated after a batch changeover has been
initiated.

ID Code Serial Number Verification


When the ID code Data Format is GS1, sNDC or securPharm and the ID code contains a serial number (for example,
GS1 Application Identifier 21), the serial number can be checked to ensure that it is valid for the current batch.

ID Code
Enable the checkbox next to the ID code number. If the checkbox for an ID code is disabled, that ID code serial number
will not be included in the verification. By default, all checkboxes are disabled.

Serial Number Check


Select the type of serial number check from the list:

l SN Fixed: The serial number contained in the ID code must match a known serial number. The match string will
be received over Ethernet from the MES or serialization database, or entered manually in the SN/SN Min field,
depending on the current Match To selection.
l SN Different Than Previous: The serial number in the current inspection must be different than the serial number
that was read in the previous inspection.
l SN Within Range: The serial number must be included within a defined range of values. The minimum and
maximum values for the range will be received over Ethernet from the MES or serialization database, or entered
manually in the SN/SN Min box, depending on the current Match To selection.

Note: The SN Within Range option works for numerical values only. The minimum and maximum values for
the range do not allow alphabetical values.

l String Table: The serial number must match one of the serial numbers in a batch of ID code serial number
strings. The match strings (up to 500 strings) will be received over Ethernet from TCP/IP. MatchStringTable must
be enabled and configured in the COMMUNICATION Screen. The input string must be defined in the Message
Format screen.

42
Setting Up Track & Trace

Match To
The data contained in the ID code can be compared to a known data string or a batch of strings. If the decoded data does
not match the expected data, the inspection will fail.
l Manual Entry: The match string needs to be typed in when a new batch is initiated.

l Ethernet: The match string will be received over the network from the MES or a serialization database. Ethernet
Communication Channel 1 must be configured in the COMMUNICATION Screen, and the input string must be
defined in the Message Format screen.

SN/SN Min & SN Max


If the Match To option is configured to Manual Entry, and the Serial Number Check is set to SN Fixed, the SN/SN Min
field will be enabled for entering string manually.
If the Match To option is configured to Manual Entry, and the Serial Number Check is set to SN Within Range, both the
SN/SN Min and SN Max fields will be enabled. Click on each field to open the on-screen keyboard and enter the lowest
serial number value allowed in SN/SN Min and the highest serial number value allowed in SN Max.
Slot SN Min & Slot SN Max
If the Match To option is configured to Ethernet, and the Serial Number Check is set to SN Fixed, the Slot SN Min filed
will be enabled. Select the Ethernet slot (1 - 14) from which the match string will be received.
If the Match To option is configured to Ethernet, and the Serial Number Check is set to SN Within Range, both the Slot
SN Min and Slot SN Max fields will be enabled. Click on the Slot SN Min to select the Ethernet slot (1 - 14) from which
the lowest serial number value will be received and the Slot SN Max to select the Ethernet slot (1 - 14) from which the
highest serial number value will be received.

Configuration Status
The Config Status LED indicates whether the configuration is correct (in green) or not (in red).

Note: The Config Status LED does not indicate the result of the verification.

The following list shows possible error conditions that would turn Config Status LED to red.

l When an OCR Line is selected in Source column, but the corresponding OCR line is not enabled in the OCR
LINES screen.
l When an ID code related code part is selected in Source column, but the corresponding ID code is not enabled in
the ID CODE screen.
l When a code part selected in the Source column does not match the Data Format selected in the corresponding
ID CODE screen. For example, if the code part selected in the Source column is IDCode1 GS1 GTIN but the Data
Format selected in ID CODE 1 screen is securPharm (strict), the Config Status LED will be red.
l When Ethernet is selected in Match To column, but the Ethernet Communication is not enabled, the Channel 1 is
Unused or its direction is set to Send Only in the COMMUNICATION screen.
l When the data format of a code selected in the Source column does not match the data type selected in the Data
Type column. For example, if the code part selected in the Source column is IDCode1 GS1 Exp Date but the data
type selected in the Data Type column is SP Exp Date, the Config Status LED will be red.
l For serial number verification, when Ethernet is selected in the Match To column but the Ethernet
Communication is not enabled or Channel 1 is set to Unused or its direction is set to Send Only in the
COMMUNICATION screen.
l For serial number verification, when String Table is selected in the Serial Number Check column but the Ethernet
Communication is not enabled in the COMMUNICATION screen.

43
Authorize
To use the Authorize function, the Authorize option in the ON-SCREEN DISPLAY Screen must be set to either Authorize-
Only or Double-Blind. When the Authorize-Only option is used, User 1 (typically an operator) makes changes and User 2
(typically a supervisor) verifies the changes. When the Double-Blind option is used, User 1 makes changes and User 2 is
required to re-enter the changes made by User 1.

Note:
l The Authorize button does not work if the Authorize option in the ON-SCREEN DISPLAY screen is set to None.
l The authorization works only for the Manual Text Entry, the SN/SN Min and SN Max options.

l If User 1 has a Locked Access level, authorization is disabled.

l User 2 must be different than User 1 and have a Full access level. The default In-Sight admin user account has
Full access.
®
l For more information on the Authorize function and Audit Messages, refer to the In-Sight Explorer Help file.

Authorize-Only
Click the Authorize button to open the on-screen keyboard and manually enter the user name and password.

Figure 3-25: Enter the User Name

44
Setting Up Track & Trace

If the authorization level is set to Authorize-Only, the value entered by User 1 is displayed in the Authorize screen.

Figure 3-26: Authorize Screen (Authorize-Only)

If User 2 determines the new value is correct and clicks the Authorize button, the change is authorized. If User 2
determines the new value is incorrect and clicks Cancel, the change is not authorized.
Double-Blind
If the authorization level is set to Double-Blind, after the Authorize button is clicked, the field where User 2 needs to re-
enter the value will be highlighted in the Authorize screen. When using Double-Blind authorization, the new value
entered by User 1 is hidden in the Authorize screen (the last authorized values are displayed), and any interactive
controls that are not supported by the Authorize function are disabled.
In following example, the new value "6789" entered by User 1 is hidden. The last authorized value "1234" is displayed.

Figure 3-27: Authorize Screen (Double-Blind with Last Authorized Value)

45
Click on the highlighted field to open the on-screen keyboard. Manually enter the string and then click OK.

Figure 3-28: Enter String

The new value will show in the highlighted field.

Figure 3-29: Authorize Screen (Double-Blind with New Value)

If User 2 clicks the Authorize button, the change is authorized. If User 2 clicks Cancel, the change is not authorized.

Note: If User 2 enters one or more incorrect values and authorization fails, the Authorize dialog appears again. In this
case, the value entered by User 2 is displayed in the dialog. If User 2 attempts the Double-Blind authorization again,
User 2 must re-enter User 1's value to have a successful authorization.

46
Setting Up Track & Trace

BUNDLE READER Screen


Track & Trace can read up to 128 ID codes from one image and match each ID code with a maximum of four OCR lines.
The BUNDLE READER screen also allows the user to specify the search region for ID codes and up to four OCR lines
simultaneously.

Note:
l The ID codes read in the BUNDLE READER screen can be matched only with the OCR lines next to each ID
code in the BUNDLE READER screen.
l The bundle reader results can be sent out only via channel 1. Before using the BUNDLE READER, the
Ethernet Communication Channel 1 must be enabled and properly configured in the COMMUNICATION
Screen. The communication mode should be set to TCP/IP and the communication direction should be set to
Send Only or Send/Receive.

Figure 3-30: BUNDLE READER Screen

Bundle Reader
Click the Bundle Reader checkbox to enable the Bundle Reader. By default, the checkbox is disabled.

Note: Before the Bundle Reader is enabled, an image with at least one ID code should be loaded.

Data Format
Select the type of Data Format for ID codes.

l None

l GS1

l securPharm (strict)

l securPharm (loose)

Note: For more detailed information on the ID code Data Format, see ID code Data Format on page 19.

47
Search Region
Click the Search Region button to specify the area where all ID codes will be searched.

Note: At least one ID code should be in the search region, otherwise the Bundle Reader will fail.

Sort Mode
Select the type of ID code reading mode.

l None: Sorts by first decoded results. Any undecoded results will follow decoded results.

l Top Down: Sorts in ascending Row order.

l Left To Right: Sorts in ascending Column order

l Alphabetical: Sorts the results alphabetically.

l String Length: Sorts the results by string length (shortest to longest).

l Rows (default): 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.
l 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.

Enable Training
Check the Enable Training checkbox to train a model of the first symbol read. Trained information is retained until this
checkbox is disabled. To retrain a symbol, disable the checkbox, then enable the checkbox again.

Note: It is recommended to have only one symbol in the Region when training is enabled.

Verification
Check the Verification checkbox to enable OCR line verification of each ID code. By default, the checkbox is disabled.

Note: The ID codes read in the BUNDLE READER screen can be matched only with the OCR lines next to each ID
code.

Line #
Enable the checkbox next to each of the applicable OCR line numbers. By default, all checkboxes are disabled.

Name
Click on the field to open the on-screen keyboard, and enter a name reference for the OCR line. By default, it is named
by the line numbers (e.g., "Line 1", "Line 2", etc.).

Data Type
Click on the Data Type field to choose which data type of the match string will be extracted from the ID code and
matched with OCR lines. The available data types are:
l Full String

l GS1 - GTIN

l GS1 - Lot Number

l GS1 - Exp Date

l GS1 - Production Date

48
Setting Up Track & Trace

l GS1 - Best Before

l GS1 - Serial Number

l GS1 - Price

l SP PPN

l SP Batch Number

l SP Exp Date

l SP Serial Number

Select Full String if the ID codes do not contain GS1 or securPharm-compliant data. In this case, the entire string
contained in the ID code will be used as the OCR line match string.

Font
Select the font to use for each OCR line. Track & Trace supports up to five fonts in a single job, and there is no
requirement that the same font be used for all lines.

Note: The Track & Trace job includes a pre-trained font (Font #5, Demo), which is designed to work with the sample
images included with Track & Trace. In most cases, however, you should train your own font using actual samples of
your labels or packages as they will be marked during manufacturing. For instructions on training and editing fonts,
see TRAIN FONTS Screen on page 26.

Train Fonts
Click the Train Fonts button to train and edit fonts in the TRAIN FONTS screen. For instructions on training and editing
fonts, see TRAIN FONTS Screen on page 26.

Minimum Score
Specify the minimum score that each line must receive for the verification to pass. (0 - 100; default = 70).

Regions
Click the Regions button to define the area of the image in which to locate OCR lines. Users can select and modify the
regions of all selected OCR lines simultaneously in one screen.

Note: The OCR line regions should be specified relative to the first found ID code.

Figure 3-31: Specify Bundle Reader OCR Line Regions

49
Send out Data on Ethernet (Per Code)
After reading all the ID codes, the Bundle Reader tool will send out data via Ethernet. The output string can contain up to
five data items, in any order:
l Empty: No data will be included at this position.

l Index: The index number of the currently processed or verified ID code.

l Match Result: Result of the ID code validation.

l Full String: Select Full String to include the entire ID code as a string.

l Line 1...4: Includes the data from selected line.

l Match Line 1...4: Result of the selected line validation.

Note:
l If the Verification checkbox is not checked, only the Empty, Index and Full String options can be used in the
output string.
l The output string will be sent out on the TCP port specified in COMMUNICATION Screen (Ethernet
Communication Channel 1 only) for each code.

50
Setting Up Track & Trace

OUTPUT Screen
The Output screen defines the data contents and order of the result string that Track & Trace sends out over Ethernet
after each inspection.

Note: If the Ethernet Communication Channel 1 is set to Send or Send/Receive and Channel 2 is enabled, the output
string will be transmitted on both channels.

Figure 3-32: OUTPUT Screen

Data Groups
The output string can include data from up to six different sets of inspection results. Enable the data groups by selecting
them from the six lists at the top of the OUTPUT screen, in the order (from left to right) you want the data to appear in the
output string. The available data sets are:
l Empty: No data will be included at this position.

l String: Prepends a user-defined text string to the succeeding data in the output string.

Note: When String is selected and the Sep Char checkbox is enabled in the Message Format screen, a
separator character is not appended to the text string. For example, if String "Test", Counter (with a current
value of "000000") and Insp.Result are the selected Data Groups and the Sep Char checkbox is enabled, the
Sample Output would be "Test000000-1".

l Insp. Result: Outputs a 1 if the overall inspection passed, or a 0 if the inspection failed.

l ID Result: Includes pass/fail and read results for ID Code 1 and ID Code 2.

l 2D Code Grade: Includes DataMatrix code quality grading results for ID Code 1.

l GS1 Data: Includes the values for the GS1 data encoded in the ID codes.

l OCR Result: Includes results for all enabled OCR lines.

l Position Result: Includes label position inspection results, if enabled.

l Counter: Includes the 6-digit number of the last inspection, in nnnnnn format. The Counter is equal to the total
number of inspections that have been performed since the start of the current batch. The counter will

51
automatically reset to "000001" when a new batch has been initiated, or if the maximum of 999999 is reached in
the current batch.
l Custom: Includes user-defined data in the output string. The custom data can be defined in cell A3 of the Track &
Trace job file.
l sNDC: Includes the values for the sNDC data encoded in the ID codes.

l Verification: Includes the values for verification results.

l securPharm: Includes the values for the securPharm data encoded in the ID codes.

Note: ID Code 1 must be used for codes that contain GS1, sNDC or securPharm data. If ID Code 2 is used for
GS1, sNDC or securPharm data, and GS1 Data, sNDC Data or securPharm is a selected Data Group, the
data will not appear in the output string.

Inspection Results
As described in the preceding section, the inspection results that are available to be included in the output string
depends on which data groups have been selected.

ID Code 1/ ID Code 2
If ID Result is one of the selected data groups, and either or both of the ID Code 1 and ID Code 2 inspection results are
enabled, depending on which ID codes are enabled. Inspection results for each ID code are configured separately.
Enable the Pass/Fail checkbox to send the result of the ID Code read. The result will be 1 if the ID code was read
successfully and 0 if the ID code could not be read.
All or part of the ID Code read result can be included in the output string. Select Full String to include the entire read
result in the output. Select Partial String to transmit a substring. If Partial String is selected, the starting and ending
position of the substring must be defined:
l Index Start Char: Specify the position in the Full String of the first character of the substring. For example, if the
Full String is of the format nnnnnnaaa and you want to output only the alpha characters, the Index Start Char
would be 6 because the first alpha character is the 7th character in the Full String (indexing starts at 0).
l # of Chars: Specify the number of characters to include in the Partial String. In the previous example of the string
nnnnnnaaa, the # of Chars would be 3 to include all of the alpha characters.

Code Grades
If one of the selected Data groups includes 2D Code Grade, the Grading inspection results for ID Code 1 are enabled.

Note: Grading inspection results for ID Code 2 cannot be included in the output string.

Check the Pass/Fail checkbox to send the result of the ID Code 1 Grading inspection. The result will be 1 if the overall
grade for the ID Code 1 Grading inspection meets or exceeds the Minimum Grade. The result will be 0 if the overall
grade for the Grading inspection falls below the Minimum Grade.
Check Overall Grade to include the overall letter grade (A – F) for the Grading inspection.

Check Individual Grades to include the letter grade (A – F) for each of the 9 quality metrics measured during the Grading
inspection. The Individual Grades are concatenated in the following order:
l Contrast

l Fixed Pattern Damage

l Modulation

l Grid Non-uniformity

52
Setting Up Track & Trace

l Horizontal Growth

l Vertical Growth

l Non-Uniformity

l Unused Error Correction

l Reference Decode

Check Numeric Values to include the actual measurements on which the individual quality metrics are graded, in the
form n.nnn.

Note: For information on how the quality metrics are measured and graded, refer to the Verifying Symbol Quality topic
®
in the In-Sight Explorer Help file.
GS1 Data
If one of the selected data groups includes GS1 Data, the output string can contain the values for up to five GS1 Data
items, in any order you choose:
l GTIN

l Lot Number

l Production Date

l Best Before

l Exp Date

l Serial Number

l Price

sNDC Data
If one of the selected data groups includes sNDC Data, the output string can contain the values for up to two sNDC Data
items, in any order you choose:
l sNDC - NDC

l sNDC - Serial Number

securPharm Data
If one of the selected data groups includes securPharm Data, the output string can contain the values for up to five
securPharm Data items, in any order you choose:
l PPN

l Batch Number

l Exp Date

l Serial Number

l Production Date

l GTIN

53
OCR Result
If OCR Result is one of the selected data groups, the output string can contain OCR inspection results. Check the first
Pass/Fail checkbox to include the overall OCR inspection result in the output string. The result will be 1 if all of the
individual OCR line inspections pass. The result will be 0 if one or more OCR line inspections fail.
To include inspection results for each of the individual OCR lines:

l Check the Per Line: Pass/Fail checkbox to include the inspection results for each OCR line. For each OCR line,
the result will be 1 if the inspection passes. The result will be 0 if the inspection fails.
l Check the String checkbox to include the match string that was used for each OCR line inspection. If checked,
the String will follow the Pass/Fail result for the OCR line in the output string.
l Check the Char Scores checkbox to include the match scores (00 – 99) at each character position, for each OCR
line. If checked, the Char Scores will follow the Pass/Fail and String results in the output string.

Position Result
If Position Result is one of the selected data groups, the output string can contain the Label Position inspection results.
Check the first Pass/Fail checkbox to include the Label Position inspection result in the output string. The result will be 1
if the label position is within the tolerances specified in the LOCATION TOOLS screen. The result will be 0 if the vertical
or horizontal position of the label or the label rotation is outside of the specified tolerances.
To include the actual label position data in the output string:

l Check the Horizontal Offset checkbox to include the image pixel row at which the label edge was located.

l Check the Vertical Offset checkbox to include the image pixel column at which the label edge was located.

l Check the Angle Value checkbox to include the angle of rotation for the label in the image.

All label position data is in the form nnnn.nn.

Verification
If Verification is one of the selected data groups, the output string can contain the verification result.

l Check the Pass/Fail checkbox to send the result of the data verification. The result will be 1 if the general
verification passes, or if none of the verification lines are enabled in the VERIFICATION screen. The result will be
0 if the general verification fails.
l Check the Per Line: Pass/Fail checkbox to include the inspection results for each of the individual verification
lines. The result will be 1 if the verification passes. The result will be 0 if the verification fails.

Insp. Result
If Insp. Result is one of the selected data groups, the output string can contain the overall Track & Trace inspection result,
and for failed inspections, an error code to indicate the failure cause.
l Check the Pass/Fail checkbox to include the overall inspection result in the output string. The result will be 1 if all
of the individual inspections pass. The result will be 0 if one or more of the individual inspections fail.
l Check the Error Code checkbox to include a numeric identifier in the output string when the inspection fails. The
Error Code is a 6-digit counter in the form of nnnnnn. Every failed inspection will increment the counter by one.
The Error Code resets to 000000 when a new batch is initiated. The Error Code is always 000000 for passed
inspection results.

54
Setting Up Track & Trace

ON-SCREEN DISPLAY Screen


The ON-SCREEN DISPLAY screen is used to select the language of the user interface, specify the image display update
frequency, and to configure the informational graphics and text that will be displayed on top of the image. The graphics
and text displayed on the image will be the same for every user, regardless of their Access Level or permissions.

Figure 3-33: ON-SCREEN DISPLAY Screen

Language
Displays the language currently used in the Track & Trace job. The language can be changed using the In-Sight Track &
Trace Configuration Utility. See Set Up the Language on page 9 for details.

Images
By default, Track & Trace will attempt to display every image that is acquired (although some images may not be
displayed if the acquisition rate is very high). To reduce network traffic, the image display rate can be reduced to display
images only at set intervals or after an inspection failure.
l All Images: The image display will update on every acquisition.

l Defects Only: The image display will update only after a failed inspection.

l Defects / 50 /100 /200 /500: The image display will update after every failed inspection, or after a specified
number of images have been acquired, whichever comes first. For example, Defects / 100 will update the image
display after every 100 acquisitions, or whenever an inspection failure occurs.

Authorize
The Track & Trace job allows the user to enable and set up different authorization levels. The available options are:

l None: Authorization is disabled. When the Authorize button is pressed, no pop-up screen appears.

l Authorize-Only: When the Authorize button is pressed, an on-screen keyboard appears. The second user needs
to log in by entering the user name and the password to accept or reject the values entered by the first user.

55
l Double-Blind: When the Authorize button is pressed, an on-screen keyboard appears. The second user needs to
log in by entering the user name, the password and re-enter the values entered by the first user. If the value
entered by the second user matches the value entered by the first user, the change is authorized. If the second
user enters one or more incorrect values, the authorization will fail.

®
Note: For more information on the Authorize function and Audit Messages, refer to the In-Sight Explorer Help file.

Display Items
Click the checkbox next to an item to include it in the on-screen display. For most items, you can select the Display Color
and define the Image Position by clicking the Region button. Note that for some items, the Display Color and Image
Position are determined automatically.

Region Button
The Region button next to the Inspection Result can be used to specify the display areas of the Inspection Result,
Statistics, Batch Details and Line Speed information. Users can specify all the regions simultaneously in one screen.

Inspection Result
Displays the overall pass/fail result for the inspection. PART OK is displayed in the color you choose if all of the individual
inspections pass. DEFECT ON (failed inspections) is displayed in red if one or more individual inspections fail.

Statistics
Displays the Total number of inspections, Passed inspections and Failed inspections for the current batch. The counters
are automatically reset to zero when a new batch is initiated.

Batch Details
Displays the Name and Current Match String for each of the OCR lines enabled in the OCR LINES screen.

Regions
Displays the search regions for the Pattern Fixture, ID Code 1 and ID Code 2, OCR lines and multiple ID codes, if
enabled.

Line Speed
Displays the inspection rate, in parts per minute.

Processing Time
Displays the speed of the last inspection, in milliseconds.

IDCode – Region Buttons


The ID code 1 and ID code 2 Region buttons specify the display areas of Result String, GS1 Data, sNDC Data,
securPharm Data, Overall Grade, Individual Grades and Grading Graphics of ID code 1 and ID code 2. Users can specify
all the regions simultaneously in one screen.

ID Code – Result String


Displays the data contents of the ID code after a successful read. If the Data Type for the ID code is GS1, the Result
String will be displayed with the GS1 application identifiers included.

ID Code – GS1 Data


Displays the data contents of a GS1-standard ID code after a successful read. The data is displayed along with the
descriptions for its GS1 application identifiers. The Data Type of the ID code must be GS1.

56
Setting Up Track & Trace

ID Code – sNDC Data


Displays the data contents of an sNDC-standard ID code after a successful read. The Data Type of the ID code must be
sNDC.

ID Code – securPharm Data


Displays the data contents of a securPharm-standard ID code after a successful read. The Data Type of the ID code must
be securPharm.

ID Code – Overall Grade


Displays the overall quality Grade Value (A – F) after successfully reading a DataMatrix code. Grading must be enabled
in the corresponding ID CODE screens. The grade is displayed in red if it scores below the specified Minimum Grade.

ID Code – Individual Grades


Displays the individual quality grades (A – F) for each of the 9 quality metrics after successfully reading a DataMatrix
code. Grading must be enabled in the corresponding ID CODE screens. Individual Grades are displayed in red if they
score below their specified minimums.

Figure 3-34: ID Code - Individual Grades

ID Code – Grading Graphics


Displays color-coded error graphics on top of the DataMatrix code after a successful read. Grading must be enabled in
the corresponding ID CODE screens. A colored square indicates the grade for the Modulation metric, according to the
quality grading standard selected in the ID CODE screen. The color of the square is determined by the grade:

l No square – A

l Blue square – B or C

l Yellow square – D

l Red square – F

A red X represents a bit error, which is a white bit where a black bit is expected and vice-versa.

OCR Result– Characters


Displays a box around each character position in each OCR line, and the character that was matched at each position.
Correctly matched characters are displayed in green and incorrect matches are displayed in red.

Figure 3-35: OCR - Characters

OCR – Character Scores


Displays the match score for each character in each OCR line.

57
OCR – Match String/Region
Displays the Region and Match String for each OCR line. If one or more character matches are incorrect, the Region, the
Match String and the incorrectly matched characters will be displayed in red.

Custom - Custom Alarm


Displays up to three custom alarm messages. The display position of the alarm messages can be defined
simultaneously in one screen by clicking the Region button.

Note: The custom alarm can be configured by users in the In-Sight Explorer spreadsheet. For more information, see
User-Configurable Parameters on page 61.

58
Setting Up Track & Trace

Advanced Custom Features


Track & Trace provides advanced custom features, which allow you to add a custom screen to the Setup Menu with
custom functionality, or to configure parameters of unlocked cells in the In-Sight Explorer Spreadsheet View.
In order to access the advanced custom features, the Track & Trace job needs to be unlocked first.

To unlock the Track & Trace job:

1. Navigate to the In-Sight Explorer Spreadsheet View.


2. From the File menu, open the Unprotect Job dialog and enter the password "Cognex" in the Password to
unprotect job field.
3. Click OK to exit the dialog.

Note: To prevent accidental changes, it is recommended to relock the Track & Trace job after configuring the custom
®
features. For more information on job protecting, refer to the Protect Job Dialog topic in the In-Sight Explorer Help file.

Add Custom Screen to Setup Menu


Optionally, you can add a custom screen to the Setup Menu by creating a Dialog Interactive control in the In-Sight
Explorer Spreadsheet View. The custom screen can be used to configure user-defined features, such as custom
communications, extra OCR lines, etc.

Note: The Track & Trace job allows you to add up to two custom screens.

1. Launch In-Sight Explorer from the Windows Start Menu.

2. Log on to the vision system and navigate to the Spreadsheet View.

3. Make sure that the Track & Trace job is already loaded to your vision system.

4. Inserts a dialog box control into the spreadsheet by inserting a "Dialog" function in an empty cell in the bottom
part of the spreadsheet. For example, cell A345.

Figure 3-36: Insert a Dialog Box Control

59
5. Type the name of the custom screen you want to show in the Setup Menu in "Label" and "Dialog Title" field and
configure other features as needed in the Dialog Property Sheet.

Figure 3-37: Configure the Property Sheet

6. Locate the Setup cell (T45) in the spreadsheet.

7. Add a cell reference of the newly created custom Dialog to the Setup cell, as a parameter.

Figure 3-38: Add a Cell Reference

8. Save the Track & Trace job file to the vision system and go back to the Track & Trace user interface.
®
Note: For more information on using In-Sight Explorer, refer to the In-Sight Explorer Help file, an online
HTML Help file provided on the In-Sight Explorer DVD.

If you have correctly followed the previous steps, a new custom screen button will appear at the bottom of the Setup
Menu.

Figure 3-39: Setup Menu with a New Custom Screen Button

60
Setting Up Track & Trace

User-Configurable Parameters
The Track & Trace job contains cells that can be configured by users in the In-Sight Explorer Spreadsheet View. These
user-configurable parameters are mainly located in the third row of the spreadsheet. A list of all user-configurable
parameters in a Track & Trace job along with their spreadsheet locations is provided below.
®
Note: For more information on using In-Sight Explorer, refer to the In-Sight Explorer Help file, an online HTML Help
file provided on the In-Sight Explorer DVD.

Table 3-2: User-Configurable Parameters


Configurable Description Spreadsheet
Parameter Cell Location
Custom Field for Specifies the custom field of the formatted output message. If the user selects A3
Output Message the “Custom” option in the OUTPUT Screen, this string will be sent out over
Ethernet.
Note: This cell must be a string or an In-Sight function that outputs a string.
Place a separator (B234) at the end of this string if you want a separator
before the next field of the output message.

Use Image Filter for ID Specifies whether or not to use the NeighborFilter function for ID Code 1. If B3, B4
Code 1 checked, the ID Code 1 reading and grading functions will be applied to the
filtered image defined in cell B4.
Use Image Filter for ID Specifies whether or not to use the NeighborFilter function for ID Code 2. If C3, C4
Code 2 checked, the ID Code 2 reading and grading functions will be applied to the
filtered image defined in cell C4.
Use Image Filter for Specifies whether or not to use the NeighborFilter function for OCR Lines. If D3, D4
OCR Lines checked, the OCR Lines functions will be applied to the filtered image defined
in cell D4.
Light Control Mode Specifies whether the ring light on an In-Sight 5000 series or 7000 series E3
vision system is only ON for the duration of specified exposure or is constantly
ON.
Exposure Control: Enables the ring light to be ON for the duration of the
exposure.
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.
Light Enable 0/Light Specifies whether up to four LED light channels are ON or OFF. Any non-zero F3, G3
Enable 1 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, while Light
Enable 1 controls the vertical LED bank. This parameter is only supported on
In-Sight 5000 series vision systems.
Light Intensity Controls the effective intensity [(0 to 100); default = 1; OFF = 0] of the LEDs. F3
This parameter is only supported on In-Sight 7000 series vision systems.
Offset Specifies a DC level that is added or subtracted from the analog signal from the H3
In-Sight 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.
Buffer Mode Specifies the number of buffers used for image acquisition. L3
Overlapped (default): Specifies that the maximum number of buffers will be
used for image acquisition.
Single: Specifies that only a single buffer will be used for image acquisition.
This option is only supported when the Trigger parameter is set to Camera.

61
Configurable Description Spreadsheet
Parameter Cell Location
Trigger Delay When the Trigger type is set to Camera or Network, specifies the delay, in M3
milliseconds, between the time the trigger is received and the time the sensor
begins acquisition. When the Trigger type is set to Continuous, specifies an
interval, in milliseconds, between acquisitions. When connected to an In-Sight
5604 line scan vision system, and the Trigger type is set to Camera, specifies
the number of lines to delay after the camera trigger occurs before starting an
image acquisition.
White Balance Region Specifies the Region to use when calculating the White Balance. N3
Enable/Disable White Specifies whether or not to use the White Balance calculation. If checked, the O3, O4
Balance white balance calculation will apply to the image defined by the White Balance
function in cell O4.
ID Code 1 Custom Specifies the custom grade [4 = A; 3 = B; 2 = C; 1 = D; 0 = F] for ID Code 1. P3
Code Grading
ID Code 2 Custom Specifies the custom grade [4 = A; 3 = B; 2 = C; 1 = D; 0 = F] for ID Code 2. Q3
Code Grading
Custom Row Fixture Specifies the row offset of the fixture, in image coordinates. R3
Custom Column Specifies the column offset of the fixture, in image coordinates. S3
Fixture
Custom Angle Fixture Specifies the orientation angle of the fixture, in image coordinates. T3
Custom Alarm 1 Specifies the result of the first custom alarm algorithm. The result can be sent U3
out via Digital Outputs (defined in the COMMUNICATION Screen) or displayed
in a specified area (by checking the Custom Alarms checkbox in the ON-
SCREEN DISPLAY Screen).
Custom Alarm 2 Specifies the result of the second custom alarm algorithm. The result can be V3
sent out via Digital Outputs (defined in the COMMUNICATION Screen) or
displayed in a specified area (by checking the Custom Alarms checkbox in the
ON-SCREEN DISPLAY Screen).
Custom Alarm 3 Specifies the result of the third custom alarm algorithm. The result can be sent W3
out via Digital Outputs (defined in the COMMUNICATION Screen) or displayed
in a specified area (by checking the Custom Alarms checkbox in the ON-
SCREEN DISPLAY Screen).
Custom Pass/Fail Specifies the result of the custom Pass/Fail function. The result will be sent out X3
Output via Digital Outputs.

62
Operating Track & Trace
This chapter describes how to initiate a batch changeover using the Track & Trace user interface and how to monitor
Track & Trace operation during production.

Figure 4-1: Track & Trace Main Menu

CONFIRM CHANGE BATCH Screen


To initiate a new batch, click the Change Batch button on the main menu, which opens the CONFIRM CHANGE BATCH
screen.

Figure 4-2: CONFIRM CHANGE BATCH Screen

Change Verification Settings


Click the CHANGE VERIFICATION SETTINGS button to open the VERIFICATION screen. Before initiating a
batch change, the information for the new batch must be supplied and verified in the VERIFICATION screen. For
more information on using the VERIFICATION function, refer to VERIFICATION Screen on page 40.

Change Batch
To manually initiate a batch change, click the CHANGE BATCH button. The current batch information will be updated,
and all of the inspection statistics will be reset to zero.

Note: When switching to a new batch, all previously stored strings will be cleared.

63
STATISTICS Screen
Track & Trace maintains statistics of all inspections performed for the current batch. To view the statistics for the current
batch, click the Statistics button on the main menu, which opens the STATISTICS screen.

Figure 4-3: STATISTICS Screen

Batch Statistics
The Batch Statistics displays the overall pass/fail statistics for the current batch. Batch Statistics are reset to zero when a
new batch is initiated. Click the Defect details button to see a count of defects for each of the OCR lines and ID codes
that are enabled.

Figure 4-4: DEFECT DETAILS Screen

64
Operating Track & Trace

Operator Statistics
The Operator Statistics can be used to maintain a subset of statistics beginning from a particular point in time. For
example, a line supervisor might be interested in seeing the pass/fail statistics for all inspections performed while they are
logged on to Track & Trace. Click the Reset button to reset the Operator Statistics at any time; the Batch Statistics are not
affected.

65
66
Appendix A - OCRMax Font Training
OCRMax Font Training allows you to train, view, rename and remove characters using the OCRMax Font Training
screen.
®
Note: For more information on the OCRMax function, refer to the In-Sight Explorer Help file.

Tip: Providing OCRMax with multiple training instances of each character to be read during run-time allows it 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 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.

Training Characters
There are three options to train characters: All Characters, New Characters and Selected Characters. When the All
Characters option is selected, all of the characters in the region of interest will be trained. When the New Characters
option is selected, only new characters in the region of interest will be trained. When the Selected Characters option is
selected, specific characters in the region of interest will be trained. If creating a new custom font, select the All
Characters option. To add additional characters to the font database, select the New Characters or Selected Characters
options.
Once characters are trained, each trained character will be visible in the Font's Characters list, where the characters are
assigned a folder and label, and grouped together (if the characters have matching labels). When a character model is
selected in the Font's Characters list, the trained Instances for that model are also listed. The indicator adjacent to each
character instance is <character label>:<instance number>. In the example below, the second instance of character '0' is
indicated by '0:2'.

Figure A-1: OCRMax Font Training

67
Note:
l Before characters can be trained, they must be correctly segmented. If segmented incorrectly, adjust the
settings in Use Manual Segmentation Settings For Font1 in the TRAIN FONTS Screen, or adjust the OCRMax
segmentation settings in In-Sight Explorer for other fonts until the text is correctly enclosed with individual
character regions.
l Multiple-byte character model names (e.g. Kanji) are not supported. Multiple-byte characters can be trained,
but the name given to the character model must be a single byte name.

All Characters Option


1. Click the All Characters button.

2. Click the Edit button. Using the on-screen keyboard, enter the characters expected to be trained. The number of
characters entered must match the number of segmented characters.
3. Click OK to accept the characters, or Cancel to undo the changes. When OK is clicked, the entered characters
are displayed in the Train String field.
4. Click the Train button. All the characters are trained and displayed in the Font's Characters list.

5. If a character model or instance is incorrect, highlight the mislabeled model or instance and click the Rename
button to correct the label. If a character model is selected, Rename will change the name of every instance for
that model. If a single character instance is selected, then only that instance will be renamed and moved to the
corresponding character model. Rename will not take effect in the font database until OK is clicked.
6. To delete a character model, or individual instances from a character model, highlight the model or instance and
click the Delete button. To delete all characters and individual instances, click the Delete All button. Delete will
not take effect in the font database until OK is clicked.

Note: Deleting a character model will permanently delete all trained instances of that character.

7. Click OK to add the trained font to the font database, or Cancel to undo the changes.

New Characters Option


1. Click the New Characters button.

2. Click the Edit button. Using the on-screen keyboard, enter the characters expected to be trained. The number of
characters entered must match the number of segmented characters.
3. Click OK to accept the characters, or Cancel to undo the changes. When OK is clicked, the entered characters
are displayed in the Train String field.
4. Click the Train button. Only new characters are trained and displayed in the Font's Characters list.

5. If a character model or instance is incorrect, highlight the mislabeled model or instance and click the Rename
button to correct the label. If a character model is selected, Rename will change the name of every instance for
that model. If a single character instance is selected, then only that instance will be renamed and moved to the
corresponding character model. Rename will not take effect in the font database until OK is clicked.
6. To delete a character model, or individual instances from a character model, highlight the model or instance and
click the Delete button. To delete all characters and individual instances, click the Delete All button. Delete will
not take effect in the font database until OK is clicked.

Note: Deleting a character model will permanently delete all trained instances of that character.

7. Click OK to add the trained font to the font database, or Cancel to undo the changes.

68
Appendix A - OCRMax Font Training

Selected Characters Option


1. Click the Selected Characters button. When this option is selected, the Edit button is disabled.

2. Click the Train button to launch the Train Selected Characters screen. This screen contains an unwrapped image
of the region, 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).

Figure A-2: Train Selected Characters Screen

3. Enter a label for each segmented character in the text-entry box next to the label. Leave the text-entry box empty
to not train characters.

Note:
l When selected, the character image will be highlighted and the corresponding text-entry box will be
enabled. After entering a label in the text-entry box, the next character image will be automatically
selected.
l If all characters cannot be displayed in the screen, an ellipsis (...) symbol will be displayed on the right
and/or the left side of the character images group box. To display hidden characters, click the arrow key
as many times as necessary to scroll through the group box.

The following explains the keyboard actions on the Train Selected Characters Screen.
Table A-1: Train Selected Character Screen Keyboard Actions
Keyboard Action
Left arrow Selects the previous character image.
Right arrow Selects the next character image.
Space Enters a space in the text-entry box to train a space character.
Backspace Clears the text-entry box within the highlighted character image and selects
the previous character image.

4. Click OK to accept the labels, or Cancel to undo the changes. The Train Selected Characters screen will be
closed, and the OCRMax Font Training screen will appear. When OK is clicked, specific characters are trained
and displayed in the Font's Characters list.

69
5. If a character model or instance is incorrect, highlight the mislabeled model or instance and click the Rename
button to correct the label. If a character model is selected, Rename will change the name of every instance for
that model. If a single character instance is selected, then only that instance will be renamed and moved to the
corresponding character model. Rename will not take effect in the font database until OK is clicked.
6. To delete a character model, or individual instances from a character model, highlight the model or instance and
click the Delete button. To delete all characters and individual instances, click the Delete All button. Delete will
not take effect in the font database until OK is clicked.

Note: Deleting a character model will permanently delete all trained instances of that character.

7. Click OK to add the trained font to the font database, or Cancel to undo the changes.

70
Appendix B - User Authentication
Before a user can log in to Track & Trace to configure batch settings, change a batch, or view batch statistics they must
exist as a user on every In-Sight vision system they will need to access. After a user has been created on the vision
system, their ability to interact with the Track & Trace user interface is determined by the Track & Trace user permissions
that have been defined for them.

Creating In-Sight Users


In-Sight users are created using In-Sight Explorer software. Each In-Sight vision system supports up to 32 users. Every
In-Sight user is assigned an Access Level:
l Full access level users have complete, unrestricted access to the vision system, including the ability to change
system settings. Job files can be created, modified, loaded or saved, and all In-Sight Explorer software selections
are available. However, the ability of Full access level users to interact with the Track & Trace user interface is
determined by their Track & Trace user permissions. The default In-Sight admin user account has Full access.
l Protected access level users have limited access to the vision system, but without the ability to change system
settings. Protected access level users can switch to live video mode, toggle the Online/Offline status of the vision
system (if permitted by their Allow Online/Offline privileges) and open or save jobs (if permitted by their FTP
Read/Write privileges). The ability of Protected access level users to interact with the Track & Trace user interface
is determined by their Track & Trace User Permissions. The default In-Sight operator user account has Protected
access.
l Locked access level users can login to the vision system to monitor its operation, and have no ability to change
system settings or to interact with the Track & Trace user interface. The default In-Sight monitor user account has
Locked access.

Only In-Sight users with a Full or Protected access level can interact with the Track & Trace user interface, regardless of
their Track & Trace user permissions. In-Sight users with a Locked access level can log on to the Track & Trace user
interface to monitor its operation; however, all of the controls will be disabled. Except for administrators who require
access to vision system settings, most users who will log on to In-Sight through the Track & Trace user interface should
have a Protected access level.

Note: For instructions on creating and maintaining users on In-Sight vision systems, refer to the User List topic in the
®
In-Sight Explorer Help file.

71
Setting Track & Trace User Permissions
The Track & Trace job file supports three different types of users: Operator, Supervisor and Administrator. The default
user permissions in the Track & Trace job are most restrictive for an Operator, and most permissive for an Administrator.
However, the permissions for each type of user can be modified in the USER PERMISSIONS screen.

Figure B-1: USER PERMISSIONS Screen

If you are installing Track & Trace for the first time and want to set user permissions, you can access the USER
PERMISSIONS screen from the HMI Display Control sample application installed with Track & Trace:

1. Launch the Cognex HMI Display Control sample application from the Windows Start Menu and log on to a vision
system running a Track & Trace job.
2. In the Sample Controls dialog, click Dialog in the Symbolic Tag list. Scroll down through the list and select the
UserPermissions tag.
3. Click the Perform Action button. The USER PERMISSIONS screen will open in the HMI Display Control sample
application.
4. For each type of user, check the checkbox for each control that they will be able to access in the Track & Trace
user interface, and uncheck the box for each control that will be inaccessible. Controls that are unchecked for a
type of user will be grayed out for all users who log on with that user type.
5. Click OK.

The HMI Display Control sample application can also be used to test the user permissions you define:

1. Scroll down to the bottom of the Symbolic Tag list and click UserGp (User Group).

2. Select the UserGroup tag then click the Set Value button. The default value is 2 (Administrator). Change the
value to 0 (Operator) or 1 (Supervisor) and click OK.
3. If you changed the UserGroup tag value to 0, the Setup button on the Track & Trace main menu in the HMI
Display Control window will be grayed out and inaccessible. If you changed the UserGroup tag value to 1, click
the Setup button on the Track & Trace main menu, then click the ID CODE 1 button. Most of the controls in the
ID CODE 1 screen will be grayed out and inaccessible.
4. Repeat steps 6 and 7, but this time change the UserGroup tag value back to 2 in order to restore access to all
controls in the Track & Trace user interface.

72
Appendix B - User Authentication

Note:
l In order to apply Track & Trace user permissions, the UserGroup symbolic tag must be set programmatically
whenever a user logs in to the Track & Trace interface from your custom application. Refer to the Programming
the HMI Display Control section for more information.
l The USER PERMISSIONS screen is designed to be accessed programmatically using the HMI Display Control.
Refer to the Programming the HMI Display Control section for information on how to open the USER
PERMISSIONS screen from your custom application.

Idle Timeout
To prevent unauthorized users from changing Track & Trace settings, a timeout can be set to automatically log the
previous user off of the vision system after a period of inactivity. If a user is automatically logged out, the next user to log
on must enter their user name and password in order to access Track & Trace. The steps to set the idle timeout differ,
depending on which user interface is used to log on to an In-Sight vision system running Track & Trace.
To set the idle timeout for the HMI Display Control in your application, refer to the Integrating the HMI Display Control on
page 97.
To set the idle timeout for the VisionView Operator Interface Panel or the VisionView PC software, refer to the
®
VisionView Software Manual.
Note: When using In-Sight Explorer to log on to the vision system running a Track & Trace job, no idle timeout is
available.

73
74
Appendix C - Creating an Audit Trail
In-Sight Track & Trace supports FDA 21 CFR Part 11 validation with the ability to automatically generate time-stamped
audit messages that can be archived in your audit trail log file or compliance database. Audit messages are supported
for the following types of activity:

l In-Sight system events, such as startup, user logon and logoff, switching into Online and Offline operation and job
changes.
l Changes to In-Sight system settings.

l Changes to settings in a Track & Trace job, and batch changes.

Creating an audit trail for your In-Sight Track & Trace installations requires four steps:

1. Install and configure an audit message server on a PC. An audit message server “listens” for audit messages sent
from one or more vision systems on the network. Cognex provides sample code for developers to create an audit
message server when audit messages need to be recorded in a compliance database or written to an audit trail
log file. Track & Trace also includes the Cognex Audit Message Demo, which writes audit messages in XML
format to a plain text log file.
2. Configure Audit Message Settings on your In-Sight vision systems.

3. Connect to the audit message server from your database or logging application to collect audit messages
received from In-Sight vision systems.
4. Import audit messages into your compliance database or audit trail log file.

The remainder of this section provides setup instructions, audit message specifications, and audit message server
sample code for creating an audit trail for In-Sight Track & Trace vision systems.

Note: When using the Cognex Audit Message Demo application or the Cognex Audit Message Server Sample
application on the Windows 7 operating system, if the User Account Control (UAC) settings are not disabled, run the
application as an administrator.

Configure the Cognex Audit Message Demo Application


See Sample Code – Visual Studio .NET C# 2010 on page 79 if you will create your own audit message server. But first, it
is recommended that you configure the Cognex Audit Message Demo to see how audit messaging works.

Note:
l The Cognex Audit Message Demo application included in the Track & Trace installer is for demonstration and
test purposes and not intended for deployment.
l If Track & Trace 2.0.0 is already installed on your PC, you must uninstall the Cognex Audit Message Service
from your PC using the system tray uninstall option before using the Cognex Audit Message Demo application.

75
1. Launch the Cognex Audit Message Demo from the Windows Start menu (the default location is
Programs\Cognex\In-Sight\In-Sight Track & Trace 2.0.0\).

Figure C-1: Cognex Audit Message Demo Application

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 checkbox 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.

Figure C-2: Add Audit Message Port

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.

76
Appendix C - Creating an Audit Trail

Configure Cognex Audit Message Settings


Before an In-Sight vision system running Track & Trace can generate and send audit messages, the vision system’s
Audit Messaging Settings must be configured in In-Sight Explorer.

1. Open In-Sight Explorer and log on to a vision system running a Track & Trace job.

2. From the Sensor menu, select Audit Message Settings.

Figure C-3: Audit Message Settings dialog

3. Check Enable Audit Messages to turn audit messaging on for this vision system.

4. For the Server Address, enter the IP address of the PC running the audit message server, and the Server Port
number. If you are using the Cognex Audit Message Demo, enter the IP Address and the Audit Message Port you
configured in the previous section.
5. Select the message types for which this vision system will generate audit messages:

l System Events

l Changes to Tagged Cells

l Changes to System Settings


6. Click OK to close the Audit Message Settings dialog.

77
7. 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.

Figure C-4: Cognex Audit Message Demo, first audit message

Notice that In-Sight sends audit messages in XML format, which is described in Audit Message Format on page 80.

78
Appendix C - Creating an Audit Trail

Sample Code – Visual Studio .NET C# 2010


The Cognex Audit Message Demo application is fully functional, but you will want to integrate an audit message server
into your own application.
Track & Trace includes the source code for a basic 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.

Figure C-5: Sample Code

79
Audit Message Format
In-Sight audit messages are in XML format, which provides maximum flexibility for converting the data into records for
your compliance database or entries in your audit trail log file.

Note:
l The audit messages described in this section are based on In-Sight Audit Message version 1.1 included in the
In-Sight Explorer firmware version 4.8.0 or higher.
l The firmware will not generate an audit message that exceeds 10000 bytes.

Audit Message Header


All Audit Messages are preceded by an XML declaration, containing the date and time; the name of the currently logged
on user; the Host Name of the vision system; the name of the PC (or VisionView Operator Interface Panel) from which the
action was initiated; and a message ID. This information is relayed in the attributes of the XML <AuditMessage> tag.

Figure C-6: Audit Message Header

XML Declaration
The Audit Message includes an XML declaration to indicate the formatting of the message as UTF-8.

Example: <?xml version="1.0" encoding="UTF-8"?>

Version
The version in the AuditMessage designates the schema of the XML sent by the In-Sight. "version=1.1" is sent in
message from In-Sight vision systems with firmware version 4.8.0 and higher.
Example: version=”1.1”

System
The system attribute is a string containing the vision system host name.

Example: system="ism1400_010203"

System Type
The system type attribute is a string containing type of the vision system.

Example: systemType=”In-Sight”

Date
The date attribute follows the ISO 8601 calendar date format: YYYY-MM-DD.

Example: date="2009-08-17"

Time
The time attribute follows the ISO 8601 time format: hh:mm:ss±hh:mm.

Example: time="10:54:47-07:00"

80
Appendix C - Creating an Audit Trail

User
The user attribute is a string containing the user name that is currently logged on to the vision system. If no user is
currently logged on, an empty string "" is returned.
Example: user="admin"

Connection
The connection attribute is a string containing a description of the connection to the vision system. If no connection is
established – during startup, for example – an empty string "" is returned.
Typically, the string is the host name of the PC or VisionView Operator Interface Panel through which the user is logged
on to the vision system. There are two exceptions:
l NativeMode: Indicates the message was generated as a result of a Native Mode command using telnet to port
23.
l DiscreteInput: Indicates the message was generated as a result of a signal on the hardware input lines (either
serial or internal).

connection="NativeMode"
connection="DiscreteInput"
Example:
connection="PC17689"
connection=""

ID
The ID attribute is a non-zero positive integer indicating the sequence number of the Audit Message from a particular
vision system. This number starts at 1 when the vision system starts up, and increments with each message sent. When
combined with the Date, Time and System attributes, every audit message sent can be uniquely identified.

Note: IDs can be repeated in messages from different vision systems or when a vision system is restarted.

Example: id="3"

Escaped Data in XML


Because XML requires that special characters be encoded (this is called escaped), the user who processes the XML
must be able to unescape the XML. The following characters will be encoded when sent as part of the XML:
l “ with &quot;

l ‘ with &apos;

l & with &amp;

l > with &gt;

l < with &lt;

81
Message Response
The firmware will send messages one at a time. These messages will not be deleted until they have been received and
processed by an audit message server. When the message response is not received (or is incorrect), then the message
will be resent.

Note: To maintain backwards compatibility, audit messages with version of 1.1 or higher will require a response. The
audit message server will not generate a response for audit messages with no version indicated or for audit messages
that have a "version" attribute less than 1.1. Modify the programs accordingly if the API/DLL is not used.

Response Format
The format for the audit message response sent by the audit message server is shown below:

Figure C-7: Example: Response Format

l version: The version of the XML response.

l system: The system that generated the message that was received.

l id: "id" attribute contained in the Audit Message Header that was received.

Audit Message Samples

Change Messages (Data or Formula)


If a cell in a job spreadsheet has been assigned an Audit Message Symbolic Tag, and that cell is edited (e.g. changes
are made to the cell's formula, or the user changes the value of an interactive control), a data or formula message is
generated; both the old and new values are included in the message.

Button
The following message is generated when a Button cell is pressed in the job.

Figure C-8: Example: Button

CheckBox
The following message is generated when a CheckBox cell is modified in the job.

Figure C-9: Example: CheckBox

82
Appendix C - Creating an Audit Trail

EditAnnulus
The following message is generated when an annulus graphic is edited in the job.

Figure C-10: Example: EditAnnulus

EditCircle
The following message is generated when a circle graphic is edited in the job.

Figure C-11: Example: EditCircle

EditFloat
The following message is generated when an EditFloat cell is modified in the job.

Figure C-12: Example: EditFloat

EditInt
The following message is generated when an EditInt cell is modified in the job.

Figure C-13: Example: EditInt

83
EditLine
The following message is generated when a line graphic is edited in the job.

Figure C-14: Example: EditLine

EditPoint
The following message is generated when a point graphic is edited in the job.

Figure C-15: Example: EditPoint

EditRegion
The following message is generated when a regional graphic is edited in the job.

Figure C-16: Example: EditRegion

EditString
The following message is generated when an EditString cell is modified in the job.

Figure C-17: Example: EditString

84
Appendix C - Creating an Audit Trail

ListBox
The following message is generated when a ListBox cell is modified in the job.

Figure C-18: Example: ListBox

TrainFont
The following message is generated when a font in the job has been trained.

Figure C-19: Example: TrainFont

Formula Change
The following message is generated when an expression is changed in the job.

Figure C-20: Example: Formula Change

85
System Change Events
If a system setting (any setting stored in the In-Sight vision system’s proc.set file) is modified, a system message is
generated. The Audit Message includes the name of the setting that was changed, and the new value.

Note: Unless otherwise noted, these settings may be changed in In-Sight Explorer, the In-Sight Software
Development Kit (ISDK), or via a native mode command.

Serial Settings

Figure C-21: Example: Serial Settings

86
Appendix C - Creating an Audit Trail

FTP Settings

Figure C-22: Example: FTP Settings

Network Settings

Figure C-23: Example: Network Settings

87
User List

Figure C-24: User List

88
Appendix C - Creating an Audit Trail

Host Table

Figure C-25: Example: Host Table

Startup Settings

Figure C-26: Example: Startup Settings

Discrete Input

Figure C-27: Example: Discrete Input

Discrete Output

Figure C-28: Example: Discrete Output

89
Time Settings

Figure C-29: Example: Time Settings

Default Settings

Figure C-30: Example: Default Settings

Job Languages

Figure C-31: Example: Job Languages

System Language

Figure C-32: Example: System Language

DeEnergeize Outputs

Figure C-33: Example: DeEnergeize Outputs

DHCPTimeout

Figure C-34: Example: DHCPTimeout

RAMDISK Size

Figure C-35: Example: RAMDISK Size

White Balance

Figure C-36: Example: White Balance

90
Appendix C - Creating an Audit Trail

Connection Timeout

Figure C-37: Example: Connection Timeout

Telnet Port

Figure C-38: Example: Telnet Port

LiveImage Settings

Figure C-39: Example: LiveImage Settings

OnlineImage Settings

Figure C-40: Example: OnlineImage Settings

ImageCellGraphicsMode

Figure C-41: Example: ImageCellGraphicsMode

FormatOutputBufferErrData

Figure C-42: Example: FormatOutputBufferErrData

FormatOutputBufferErrString

Figure C-43: Example: FormatOutputBufferErrString

91
Service Enabled - EIP and ProfiNET stacks

Figure C-44: Example: Service Enabled - EIP and ProfiNET stacks

IPProtAddLicense

Figure C-45: Example: IPProtAddLicense

IPProtRemoveLicense

Figure C-46: Example: IPProtRemoveLicense

ActiveCellLimit

Figure C-47: Example: ActiveCellLimit

JobCompleteMode

Figure C-48: Example: JobCompleteMode

EnableCameraUpdateTimeout

Figure C-49: Example: EnableCameraUpdateTimeout

JobDialogsUndoOnCancel

Figure C-50: Example: JobDialogsUndoOnCancel

JobDialogsFastOnlineUndo

Figure C-51: Example: JobDialogsFastOnlineUndo

92
Appendix C - Creating an Audit Trail

AuditIPSettings

Figure C-52: Example: AuditIPSettings

AuditPerformanceSettings
Note: This setting may only be changed via a native mode command.

Figure C-53: Example: AuditPerformanceSettings

AuditEnableSettings

Figure C-54: Example: AuditEnableSettings

ModbusMaximumConnections

Figure C-55: Example: ModbusMaximumConnections

ModbusIdelTimeout

Figure C-56: Example: ModbusIdelTimeout

93
Event Messages
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 or firmware update), an event message type is generated. Certain events (start up,
load job, save job, failed logon attempt and firmware update) convey additional information, with <value> tags surrounding
the additional data.

Online
The event occurs when the sensor goes online.

Figure C-57: Example: Online

Offline
The event occurs when the sensor goes offline.

Figure C-58: Example: Offline

LogOn Failure
When a logon attempt fails, the following information is displayed within <value> tag:

Figure C-59: Example: LogOn Failure

l Invalid Password: The password entered is incorrect.

l Invalid Username: The User Name entered does not exist in the User List.

l System Locked: The vision system is locked by another user. This information is usually displayed when a
firmware update is in process.
l Access Not Permitted For User: The user is not authorized access to the vision system.

l 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 has access to the EasyBuilder View.
l Unspecified Failure: The logon attempt is unsuccessful for unknown reasons.

LogOn Success
The event occurs when successfully logging on to a sensor.

Figure C-60: Example: LogOn Success

LogOff
The event occurs when successfully logging off from a sensor.

Figure C-61: Example: LogOff

NewJob
The event occurs when a new, empty job is created.

Figure C-62: Example: NewJob

94
Appendix C - Creating an Audit Trail

LoadJob
The event occurs when a job is loaded on a sensor.

Figure C-63: Example: LoadJob

SaveJob
The event occurs when the current job is saved on a sensor.

Figure C-64: Example: SaveJob

StartUp
The event occurs when the sensor is powered-up or restarts.

Figure C-65: Example: StartUp

FirmwareUpgrade
The event occurs when the sensor’s firmware is upgraded.

Figure C-66: Example: FirmwareUpgrade

95
Native Mode Commands
The following native mode commands can get or set the audit message settings on the sensor.

Setup Audit Message IP Settings


Audit messages are sent to a server (IP Address) at a specified port. The IP Address and Port can be set using using
native mode.
EV SetSystemConfig("AuditIPSettings", <IPAddress>, <Port#>, <WritetoProc>)
Example: EV SetSystemConfig(“AuditIPSettings”, 127.0.0.1, 5753, 1)

Enable Audit Messages


Audit messages can be enabled using native mode.
EV SetSystemConfig("AuditEnableSettings", <enabled>, <eventsEnabled>,
<tagsEnabled>, <sysChanges>, <WritetoProc>)
Example: EV SetSystemConfig("AuditEnableSettings", 1, 1, 1, 1, 1)

Audit Message Memory


Audit Message will be preserved on the vision system (by default, up to 2,000 messages) during network outages or
when the Audit Server is unavailable. If Audit Messages are delayed, due to network outage, or server availability, they
will be sent when a connection to the Audit Server is established.

Schema for Audit Messages


You can access to the Audit Message Schema file (AuditMessage.xsd) in the following directory (default):

C:\Program Files\Cognex\In-Sight\In-Sight Track and Trace 2.0.0\Cognex Audit Message Server\AuditMessage.xsd

96
Appendix D - Integrating the HMI Display Control
The Cognex HMI Display Control (CnxHmiDisplay) is a .NET control that allows developers to seamlessly integrate the
In-Sight Track & Trace user interface into a custom application. For example, the Track & Trace interface can be
integrated into an HMI that also hosts the user interfaces to other devices on the same packaging line such as a printer
or a weigh station.
The “touch screen” friendly, look-and-feel of the HMI Display Control is similar to that of the Cognex VisionView Operator
Interface Panel. Interactive graphical elements in the HMI Display Control provide easy access to essential functionality
for interacting with the vision system, such as adjusting the image or switching the vision system Online and Offline. By
simply dropping the HMI Display Control into a .NET application and setting a few properties, users have the power to
view and interact with Track & Trace from within the context of your custom application.

Figure D-1: Cognex HMI Display Control Sample Application

The HMI Display Control provides a rich API to access various Track & Trace and In-Sight vision system features and
functions. To help you get started, use the Cognex HMI Display Control Sample application to understand how to
integrate Track & Trace into your own application.

97
HMI Display Control Prerequisites
The following are requirements for use of the Cognex HMI Display Control:

l Visual Studio 2010:

l VB.NET or C# programming experience

l Cognex Track & Trace software installation

Adding the HMI Display Control to your Application


When you install In-Sight Track & Trace, a sample HMI application is also loaded as shown in Integrating the HMI Display
Control on page 97. This section describes the steps necessary to develop a new application that consumes the HMI
Display Control.
1. Start Microsoft Visual Studio and create a new Windows Application project.

Figure D-2: New Project Dialog

98
Appendix D - Integrating the HMI Display Control

2. If it is not already visible, open the Toolbox (View menu > Toolbox). In the Cognex In-Sight Components tab,
right-click Choose Items...

Figure D-3: Toolbox

3. In the Choose Toolbox Items dialog locate the CnxHmiDisplay component in the .NET Framework Components
tab and make sure it is checked.

Note: If the CnxHmiDisplay component is missing from the list of components, it can also be manually located
by selecting Browse… then navigating to the Track & Trace installation folder and selecting the
Cognex.Cnx.Components.dll assembly (by default the installation folder is C:\Program Files\Cognex\ In-
Sight\In-Sight Track and Trace 2.0.0\Cognex HMI Control).

Figure D-4: Choose Toolbox Items

Once added to the Toolbox, the CnxHmiDisplay component can then be inserted into the application’s form.

99
4. Adding the CnxHmiDisplay to the form automatically adds several required references to the project, specifically: l
Cognex.Cnx.Controls
l Cognex.Cnx.Components l

Cognex.Cnx.Core
l Cognex.Cnx.Framework
There are two additional references that need to be added. Under the Project menu, select Add Reference…

Figure D-5: Add Reference Dialog

You will need to locate and select the following two references:

l Cognex.Cnx.InSight

l Cognex.InSight

Using the HMI Display Control – Properties


The HMI Display Control can be used in a mode that emulates the VisionView Operator Interface Panel. No
programming is required in this configuration. The connection and the appearance of the HMI Display Control can be
configured simply using the control’s properties. The following properties are available through the Properties pane
when the HMI Display Control is selected:
l AutoConnectString: Allows connection to an In-Sight vision system running a Track & Trace job file. The format of
the string is either “IP,username,password” (without the quotes) or “IP,username” if no password is required. For
example, “192.168.0.1,admin” will allow connection to a vision system located at IP address 192.168.0.1 that has
a user named admin and no password.

Note: A successful connection requires that a valid Track & Trace job is loaded on the target In-Sight vision
system. If a valid Track & Trace job is not loaded there will be no error, but the control will not connect.

l LiveImageQuality: Configures the sub-sampling (if any) of the live video image.

l OnlineImageQuality: Configures the sub-sampling (if any) of the inspected image.

l OperatorControls: Determines which user interface components are displayed.

l ShowFilmstrip: Determines if the image history filmstrip is displayed.

l ShowStatusPanel: Determines if the status panel is displayed.

100
Appendix D - Integrating the HMI Display Control

Note: It is highly recommended that ShowStatusPanel be set to True to determine if a connection to an


In-Sight vision system has been established.

l StatusLevelStyle: Sets the visual style of the status panel widgets.

These properties can be accessed directly in the control’s property sheet. The usage of these properties is defined in the
CnxHmiDisplay class reference.

Programming the HMI Display Control


In addition to the properties available in the HMI Display Control property sheet, the control has additional properties and
methods that can be accessed programmatically. In order to fully make use of these members, access to additional
classes is needed. All of these classes are defined in the Cognex.Cnx.Components assembly. These classes can be
accessed using a fully qualified path, or by simply importing the Cognex.Cnx.Components namespace by placing the
following statement at the top of the form code:
For VB.NET Imports.Cognex.Cnx.Components

For C# using Cognex.Cnx.Components

The methods and properties of the HMI Display Control are listed in the Cognex HMI Display Control Reference help
documentation. Example usages of these members are provided below; consult the documentation for further
information.

Examples
The following examples assume a control has already been added with the default name CnxHmiDisplay1.

l Manually establishing a connection to a Track & Trace vision system at IP address 192.168.1.1
CnxHmiDisplay1.Connect("192.168.1.1, admin")

l Determine if the Track & Trace vision system has a valid job loaded
bIsValid = CnxHmiDisplay1.IsValidJob

l Setting the idle time (in minutes) before an operator user is logged out (default is 10 minutes)
CnxHmiDisplay1.IdleTimeout = iTimeout

Note: The timeout can be disabled by specifying a value of zero.

l Retrieving the name of an available display view


myBrowseName = CnxHmiDisplay1.AvailableViews(index).BrowseName

l Switching to a display view by name


CnxHmiDisplay1.SelectView(myBrowseName)

101
Services
As noted previously, the Track & Trace job and In-Sight vision system are independent of the HMI Display
Control. Services provide a way for the HMI Display Control to access the job and vision system to perform
job-related actions such as changing jobs and job configuration. The services that are available are provided
as members of the display control, and include:

ChangeJobService (for accessing Track & Trace jobs)


LiveAcquisitionService (for setting a vision system’s live video mode)
OnlineOfflineService (for setting a vision system’s in/out inspection mode)
ResultService (for retrieving or modifying job parameters)
TrainFontScreenService (for training the OCR font)
For example:

l Retrieving available jobs from a connected Track & Trace vision system
myJobNames = CnxHmiDisplay1.ChangeJobService.GetJobNames()

l Setting the current Track & Trace vision system job (not as the startup job)
CnxHmiDisplay1.ChangeJobService.ChangeJob(myJobName, False)

Symbolic Tags
Services also provide the ability to retrieve and modify values in the job, as well as to display various dialog boxes that
enable advanced configuration. This level of access is gained through the use of tags along with the services. Tags
identify the specific items within the job. The following are two code examples of accessing and using tags to perform
actions:
l Retrieving symbolic tags available in a Track & Trace job

(collection of Cognex.Cnx.ComponentModel.CnxTaggedResultMetadata)
myTags = CnxHmiDisplay1.ResultsService.SymbolicTags()

l Retrieving a value corresponding to a symbolic tag


CnxHmiDisplay1.ResultsService.GetValue(myTag.BrowseName)

l Setting the value corresponding to a symbolic tag


CnxHmiDisplay1.ResultsService.SetValue(myTag.BrowseName, valueString)

l Changing user access level using the UserGP.UserGroup tag


cnxHmiDisplay1.ResultsService.SetValue("UserGP.UserGroup",
iLevel) where iLevel can have the following values:
0 (Operator)
1 (Supervisor)
3 (Administrator)

l Displaying a dialog to modify user access permissions using the Dialog.UserPermissions tag
cnxHmiDisplay1.ResultsService.PerformAction("Dialog.UserPermissions”)

l Displaying a dialog to modify user access permissions using the Dialog.UserPermissions tag

cnxHmiDisplay1.ResultsService.PerformAction("Dialog.UserPermissions”)

102
Appendix D - Integrating the HMI Display Control

A list of the most useful symbolic tags in a Track & Trace job, along with their related services are provided below. To see
all of the symbolic tags available in the Track & Trace job, refer to the Symbolic Tag list in the HMI Display Control Sample
application.
Table D-1: Track & Trace Symbolic Tag Names
Tag Description Required Service and Method
JobVersion
JobVersion Gets the job version information. ResultsService.GetValue()
System.BuildNumber Gets the job build number. ResultsService.GetValue()
Batch Statistics
Statistics.Batch.Total Gets the actual batch statistic: count of total parts. ResultsService.GetValue()
Statistics.Batch.Passed Gets the actual batch statistic: count of passed parts. ResultsService.GetValue()
Statistics.Batch.Failed Gets the actual batch statistic: count of failed parts. ResultsService.GetValue()
Operator Statistics
Statistics.Operator.Total Gets the actual operator statistic: count of total parts. ResultsService.GetValue()
Statistics.Operator.Passed Gets the actual operator statistic: count of passed ResultsService.GetValue()
parts.
Statistics.Operator.Failed Gets the actual operator statistic: count of failed ResultsService.GetValue()
parts.
Statistics.Reset Resets the Operator statistics. ResultsService.SetValue()
Batch Information (buttons)
Verification.ChangeBatch Accesses the “Change Batch” button that applies ResultsService.PerformAction()
and activates any new batch information.
Dialog Boxes
Dialog.Setup Opens the Setup menu. ResultsService.PerformAction()
Dialog.Statistics Opens the Statistics dialog. ResultsService.PerformAction()
Statistics.DefectDetails Opens the Defect Details dialog. ResultsService.PerformAction()
Dialog.ChangeBatch Opens the Change Batch screen. ResultsService.PerformAction()
Dialog.ImageSettings Opens the IMAGE SETTINGS screen. ResultsService.PerformAction()
Dialog.LocationTools Opens the LOCATION TOOLS screen to configure ResultsService.PerformAction()
the PatMax or PatFind search tool.
Dialog.IDCode1 Opens the ID CODE 1 screen. ResultsService.PerformAction()
Dialog.IDCode2 Opens the ID CODE 2 screen. ResultsService.PerformAction()
Dialog.OcrLines Opens the OCR LINES screen. ResultsService.PerformAction()
Dialog.Verification Opens the Verification screen. ResultsService.PerformAction()
Dialog.Communication Opens the COMMUNICATION screen. ResultsService.PerformAction()
Dialog.Output Opens the OUTPUT screen. ResultsService.PerformAction()
Dialog.Format Opens the FORMAT screen. ResultsService.PerformAction()
Dialog.BundleReader Opens the BUNDLE READER screen. ResultsService.PerformAction()
Dialog.TrainFonts Opens the TRAIN FONTS screen. ResultsService.PerformAction()
Dialog.DateFormat Opens the DATE FORMAT screen. ResultsService.PerformAction()
Dialog.Display Opens the ON-SCREEN DISPLAY screen. ResultsService.PerformAction()
Localization
Localized.SelectedLanguage Returns the current language. ResultsService.GetValue()
Authorization

103
Authorize.Type Specifies the Authorization level (None, Authorize- ResultsService.GetValue() and
Only, Double-Blind). ResultsService.SetValue()
InspectionResult
Inspection.FinalResult Returns the Final Inspection Result. ResultsService.GetValue()

Language Localization
As noted in at the beginning of this section, the HMI Display Control and the Track & Trace job are distinct and
independent. Consequently, modifying the language in one does not affect the language in the other; both the HMI
Display Control and the Track & Trace job need to be localized, as required.
Changing the language used for the HMI Display Control (but not the Track & Trace job) is performed using the following
sequence:
Cognex.Cnx.CnxApplication.Culture = CnxHmiDisplay.InstalledCultures(i)
cnxHmiDisplay1.Refresh()
Changing the language in the job requires the use of the In-Sight Track & Trace Configuration Utility. See Set Up the
Language on page 9 for details.

104
P/N 597-0050-04
Printed in the USA

You might also like