ValidateIDData

Performs validation, which conforms to MIL-STD 130 and GS1, of the data decoded from an ID Code that is initially read by either the ReadIDMax or ReadIDCode functions. For more information, see ReadIDMax and ReadIDCode.

Note:
  • The ReadIDCode function is only available on In-Sight vision systems using In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Cognex recommends that the ReadIDMax function be used instead of the ReadIDCode function, which is a legacy function. The ReadIDMax function has enhanced performance capabilities.
  • When using a color In-Sight vision system, the ReadIDCode function must reference an Image processing function (for example, ColorToGreyscaleFilter), which converts the color image to greyscale. For more information, see Image.

ValidateIDData Inputs

Syntax: ValidateIDData(IDCode,Validation Options,DoD UID Construct,)

Parameter Description

IDCode

This argument must reference a spreadsheet cell that contains either a valid IDMax data structure returned by the ReadIDMax function, or a valid IDCode data structure returned by the ReadIDCode function.

Note: If referencing a ReadIDMax function, the Verify parameter must be enabled. If referencing a ReadIDCode function, the Algorithm parameter must be enabled.

Validation Options

Specifies which validation option is used.

0 = Data Qualifiers (Default)

Specifies that the data qualifiers in the data are valid and the characters that follow each data qualifier conform in type, length and value. A data qualifier is a specified character, or string of characters, that immediately precedes data that defines the general category or intended use of the data that follows. Three categories of data qualifiers can be validated:

  • Application Identifiers (AIs) – Format 05 of ISO/IEC 15434
  • Data Identifiers (DIs) – Format 06 of ISO/IEC 15434
  • Text Element Identifiers (TEIs)

1 = ISO 15434

Specifies ISO 15434 as the validation option. For more information, see

iso.org.

2 = DoD UID

Specifies the Department of Defense (DoD) Unique Identification (UID) as the validation option. For more information, see acq.osd.mil/dpap.

Note: The DoD minimum machine-readable information (MRI) symbology requirement is the Data Matrix ECC200 symbol defined by the ISO 16022 specification.

3 = GS1

Specifies GS1 standards as the validation option. For more information, see gs1.org.

Note:
  • For In-Sight Micro 1000 series, 5000 series and 70xx - 74xx series vision systems, In-Sight firmware version 4.10.1 and later is current with GS1 General Specifications, Version 14.
  • In-Sight firmware version 5.1.0 to 5.3.0 is current with GS1 General Specifications, Version 10, Issue 1, Jan-2010.
  • In-Sight firmware version 5.4.0 and later is current with GS1 General Specifications, Version 14.

4 = securPharm (strict)

Specifies "strict" securPharm (a German pharmaceutical industry barcode packaging system using DataMatrix symbols) as the validation option. Requires that Pharmacy Product Number (PPN), Serial Number, Lot and Expiration (GTIN is optional) be included.

5 = securPharm (loose)

Specifies "loose" securPharm (a German pharmaceutical industry barcode packaging system using DataMatrix symbols) as the validation option. Requires that only PPN be included, with the other information being optional.

DoD UID Construct

Specifies type of DoD UID Construct to validate.

Note: This parameter is only enabled when DoD UID is the selected value for the Validation Options parameter.

0 = Either DoD UID Construct #1 or Construct #2 (Default)

Specifies either DoD UID Construct #1 or Construct #2 as the validation option.

When complying with the DoD Construct #1 UID, all fields are validated and must contain, at a minimum:

  • Enterprise ID
  • Serial Number within the enterprise ID

When complying with the DoD Construct #2 UID, all fields are validated and must contain, at a minimum:

  • Enterprise ID
  • Original part, lot or batch number
  • Serial Number within the original part, lot or batch number
  • Current part, lot or batch number

1 = DoD UID Construct #1

Specifies DoD UID Construct #1 as the validation option.

2 = DoD UID Construct #2

Specifies DoD UID Construct #2 as the validation option.

ValidateIDData Outputs

Returns

An IDValid data structure containing validation metrics of the symbol or #ERR if any of the input parameters are invalid.

Results

When the function is initially inserted into a cell, the validation status will automatically appear in the adjacent cell to the right of the IDValid data structure, along with an applicable information string. For more information, see IDValidate.

ValidateIDData Vision Data Access Functions

When the ValidateIDData function is initially created, the following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Valid

GetValid(IDValid)

The validity of the data (0 = not valid, 1 = valid).

Diagnostic Info

GetDiagnosticString(IDValid)

Returns an applicable diagnostic information string.

Additional data elements can be accessed using the IDValidate Vision Data Access functions. For more information, see IDValidate.