| Customize Help

Supported code types



Whether you plan on reading, grading, training, or writing codes, you typically need to specify the code type when adding a code model to your code context using McodeModel(). If your operation is not successful, ensure that you have added a code model of the appropriate code type. Alternatively, you can automatically detect the code type of most 1D code occurrences in an image, using McodeDetect(), and then automatically add a code model for each detected code type to your code context, using McodeModel() with M_RESET_FROM_DETECTED_RESULTS. For information, see the Automatically detecting the code type section later in this chapter.

A code context can contain multiple code models of 1D code types (excluding GS1 databar, Planet, Postnet, and 4-state); for other code types, a code context can contain at most one code model. Although a code context can contain only one 2D code model, you can specify to perform a read, grade, or train operation on more than one occurrence of a Data Matrix code model (or any 1D code model that is not a GS1 Databar, Planet, Postnet, and 4-state code model), using McodeControl() with M_NUMBER.

If setting up a code context for reading codes that meet an ISO-compatible SEMI-specification, you can use a predefined code context, distributed with MIL, using McodeRestore().

This section lists the supported code types, and their MIL predefined constants. It also lists the predefined SEMI code contexts.

1D code types

The following is a list of the supported 1D code types.

Code type

Sample

MIL constant

McodeDetect() supported

4-state

M_4_STATE

--

BC412

M_BC412

Yes

Codabar

M_CODABAR

Yes

Code 39

M_CODE39

Yes

Code 93

M_CODE93

Yes

Code 128

M_CODE128

Yes

EAN 8

M_EAN8

Yes

EAN 13

M_EAN13

Yes

EAN 14

M_EAN14

Yes

GS1-128

M_GS1_128

Yes

GS1 Databar 1

M_GS1_DATABAR

--

Industrial 2 of 5 (standard 2 of 5)

M_INDUSTRIAL25

Yes

Interleaved 2 of 5 (ITF-14)

M_INTERLEAVED25

Yes

Pharmacode

M_PHARMACODE

--

Planet

M_PLANET

--

Postnet

M_POSTNET

--

UPC-A

M_UPC_A

Yes

UPC-E

M_UPC_E

Yes

1 There are several different sub-types of the GS1 Databar code type; see the Supported encoding schemes and sub-types for the GS1 Databar code type subsection of the Supported encoding schemes, sub-types, and error correction schemes by code type section later in this chapter.

2D code types

The following is a list of the supported 2D code types.

Family of code

Code type

Sample

MIL constant

Matrix

Aztec

M_AZTEC

Data Matrix

M_DATAMATRIX

Maxicode

M_MAXICODE

QR code

M_QRCODE

Micro QR code

M_MICROQRCODE

Cross-row

PDF417

M_PDF417

MicroPDF417

M_MICROPDF417

Truncated PDF417

M_TRUNCATED_PDF417

Composite codes

A composite code combines a 1D and 2D code together in a single image. You specify the 1D and 2D components by specifying their corresponding encoding scheme. For more information, refer to the Supported encoding scheme for composite codes subsection of the Supported encoding schemes, sub-types, and error correction schemes by code type section later in this chapter. Control types that apply to either part of a composite code also apply to the composite code as a whole. For the purposes of this chapter, composite codes will not be discussed explicitly.

The following is an example of a composite code.

Code type

Sample

MIL constant

Composite code

M_COMPOSITECODE

Predefined SEMI code contexts

MIL is distributed with three ISO-compatible SEMI code contexts, each containing a code model and code model settings that match the specification. These can be used directly, or modified to suit your needs.

Code context file

Specification

Associated code type

SEMI_T1-95r0303.mfo

SEMI T1-95 (Reapproved 0303)

M_BC412

SEMI_T2-0298E.mfo

SEMI T2-0298E

M_DATAMATRIX

SEMI_T7-0303.mfo

SEMI T7-0303

M_DATAMATRIX

To use a predefined SEMI code context, restore it using McodeRestore() with the appropriate file name. These files are located in the Matrox Imaging\contexts folder. Once restored, the code context can be modified using the MIL Code module's functions.