| Customize Help

Supported encoding schemes, sub-types, and error correction schemes by code type



In many cases, each of the supported code types can use one of several encoding schemes and error correction schemes. In addition, composite codes and GS1 Databar 1D codes are families of codes, with each member being a sub-type and typically having a different encoding scheme.

Supported encoding schemes and sub-types

To read, grade, or write most code types, you must ensure that the proper encoding scheme is selected for your code model using McodeControl() with M_ENCODING; in some cases, M_ANY is supported. McodeDetect() can help you establish the encoding scheme if it supports the code type; for information, see the Automatically detecting the code type section later in this chapter. You can also train the encoding scheme using McodeTrain() with a sample set of your images. For information, see the Training read and grade operation settings section later in this chapter.

Note that, for best results, specify the encoding scheme when reading a Code 39 code type.

When reading or grading composite code types, both M_ENCODING and M_SUB_TYPE are used. M_SUB_TYPE allows you to specify multiple sub-types so that you can limit the number of sub-types that MIL tries to read or grade. For example, when dealing with a composite code, if you specify a sub-type of M_GS1_DATABAR_EXPANDED + M_EAN13, MIL reads your code more quickly because it will only look for these two family members as opposed to all the available sub-types.

Supported encoding schemes for 1D code types (except GS1 Databar)

The following table lists the encoding schemes supported by each 1D code type (except M_GS1_DATABAR):

Encoding scheme (M_ENCODING)

1D code types (except GS1 Databar)

M_BC412 and M_CODABAR

M_CODE39 and M_CODE93

M_CODE128, M_EAN14, and M_GS1_128

M_INDUSTRIAL25, M_INTERLEAVED25, M_PHARMACODE, M_PLANET, and M_POSTNET

M_EAN8

M_EAN13

M_UPC_A

M_UPC_E

M_4_STATE

M_ENC_ASCII

Yes

Yes 1

Yes

M_ENC_EAN8_ADDON

Yes

M_ENC_EAN13_ADDON

Yes

M_ENC_UPCA_ADDON

Yes

M_ENC_UPCE_ADDON

Yes

M_ENC_NUM

Yes

Yes

Yes

Yes

Yes

M_ENC_STANDARD

Yes

Yes

M_ENC_KOREA_MAIL, M_ENC_US_MAIL, and M_ENC_UK_MAIL

Yes

1 Note that M_ENC_ASCII is only available for M_CODE128 and M_EAN14.

Supported encoding schemes and sub-types for the GS1 Databar code type

The following table lists the encoding schemes and sub-types supported by the GS1 Databar code type (M_GS1_DATABAR):

Encoding scheme (M_ENCODING)

Sub-type (M_SUB_TYPE)

Image

M_ENC_GS1_DATABAR_EXPANDED

M_GS1_DATABAR_EXPANDED

M_ENC_GS1_DATABAR_EXPANDED_STACKED

M_GS1_DATABAR_EXPANDED_STACKED

M_ENC_GS1_DATABAR_LIMITED

M_GS1_DATABAR_LIMITED

M_ENC_GS1_DATABAR_OMNI

M_GS1_DATABAR_OMNI

M_ENC_GS1_DATABAR_STACKED

M_GS1_DATABAR_STACKED

M_ENC_GS1_DATABAR_STACKED_OMNI

M_GS1_DATABAR_STACKED_OMNI

M_ENC_GS1_DATABAR_TRUNCATED

M_GS1_DATABAR_TRUNCATED

Supported encoding schemes for 2D code types

The following table lists the encoding schemes supported by each 2D code type:

Encoding scheme (M_ENCODING)

2D code types

M_AZTEC

M_DATAMATRIX

M_MAXICODE

M_MICROPDF417, M_PDF417, and M_TRUNCATED_PDF417

M_QRCODE

M_MICROQRCODE

M_ANY

Yes

Yes

Yes

Yes

Yes

M_ENC_ALPHA

Yes

M_ENC_ALPHANUM

Yes

M_ENC_ALPHANUM_PUNC

Yes

M_ENC_ASCII

Yes

M_ENC_AZTEC...

Yes

M_ENC_ISO8

Yes

M_ENC_MODE2

Yes

M_ENC_MODE3

Yes

M_ENC_MODE4

Yes

M_ENC_MODE5

Yes

M_ENC_MODE6

Yes

M_ENC_NUM

Yes

M_ENC_QRCODE_MODEL1

Yes

M_ENC_QRCODE_MODEL2

Yes

M_ENC_STANDARD

Yes

Yes

Supported encoding scheme for composite codes

The following table lists the encoding schemes, 1D part, 2D part, and sub-types supported by composite codes. The supported composite codes have a 2D part that is either MicroPDF (CC-A or CC-B) or PDF417 (CC-C). The sub-type relates to the 1D part of the composite code, while the encoding scheme relates to both the 1D and 2D parts.

Encoding scheme (M_ENCODING)

M_COMPOSITECODE

1D part established by M_SUB_TYPE

2D part

M_MICROPDF417

M_PDF417

M_ENC_EAN8

M_EAN8

Yes

M_ENC_EAN13

M_EAN13

Yes

M_ENC_GS1_128_MICROPDF417

M_GS1_128

Yes

M_ENC_GS1_128_PDF417

M_GS1_128

Yes

M_ENC_UPCA

M_UPC_A

Yes

M_ENC_UPCE

M_UPC_E

Yes

M_ENC_GS1_DATABAR_EXPANDED

M_GS1_DATABAR_EXPANDED

Yes

M_ENC_GS1_DATABAR_EXPANDED_STACKED

M_GS1_DATABAR_EXPANDED_STACKED

Yes

M_ENC_GS1_DATABAR_LIMITED

M_GS1_DATABAR_LIMITED

Yes

M_ENC_GS1_DATABAR_OMNI

M_GS1_DATABAR_OMNI

Yes

M_ENC_GS1_DATABAR_STACKED

M_GS1_DATABAR_STACKED

Yes

M_ENC_GS1_DATABAR_STACKED_OMNI

M_GS1_DATABAR_STACKED_OMNI

Yes

M_ENC_GS1_DATABAR_TRUNCATED

M_GS1_DATABAR_TRUNCATED

Yes

Supported error correction schemes

In most cases, MIL can automatically detect the error correction scheme for read and grade operations. Similarly, MIL can automatically choose the best error correction scheme for most write operations. If your code type supports more than one error correction scheme and does not support M_ANY, you must specify the error correction scheme.

To specify the error correction scheme, use McodeControl() with M_ERROR_CORRECTION. If you specify a scheme that is not supported by your code type, MIL returns an error. If your code type uses a checksum, when a discrepancy exists between the calculated and stored checksum, the read operation will yield no results. You can also train the error correction scheme using McodeTrain() with a sample set of your images. For information, see the Training read and grade operation settings section later in this chapter.

The following table lists the error correction schemes supported by each 1D code type:

Code type

Error correction scheme

M_ECC_CHECK_DIGIT

M_ECC_NONE

M_ECC_4STATE

M_4_STATE

Yes

Yes

M_BC412

Yes

Yes

M_CODABAR

Yes

M_CODE39

Yes

Yes

M_CODE93

Yes

M_CODE128

Yes

M_EAN8

Yes

M_EAN13

Yes

M_EAN14

Yes

M_GS1_128

Yes

M_GS1_DATABAR

Yes

M_INTERLEAVED25

Yes

Yes

M_PHARMACODE

Yes

M_PLANET

Yes

M_POSTNET

Yes

M_UPC_A

Yes

M_UPC_E

Yes

The following table lists the error correction schemes supported by each 2D code type:

Code type

Error correction scheme

M_ANY

M_ECC_200

M_ECC_H, M_ECC_L, M_ECC_M, M_ECC_Q

M_ECC_REED_SOLOMON

M_ECC_REED_SOLOMON_n

M_AZTEC

Yes 2

M_DATAMATRIX

Yes 3

Yes

M_MAXICODE

Yes

M_MICROPDF417

Yes

M_MICROQRCODE

Yes

Yes 4

M_PDF417

Yes

Yes

M_QRCODE

Yes

Yes

M_TRUNCATED_PDF417

Yes

Yes

2 Note that M_ANY sets the percentage of the code to be used for error checking to 23%.

3 Note that M_ANY is not available for a Data Matrix code type when performing an McodeWrite() operation.

4 Note that M_MICROQRCODE does not support M_ECC_H.

Extended Channel Interpretation (ECI) encoding

McodeRead(), McodeGrade(), and McodeTrain() support occurrences of 2D code types (except M_MICROQRCODE) with an Extended Channel Interpretation (ECI) encoding. This is a piece of information embedded in a code occurrence that indicates that non-standard characters, such as Arabic or Mandarin characters, are used. To retrieve whether a code occurrence has an ECI encoding, use McodeGetResult() with M_IS_ECI.