MAXICODE AND YOU - Zebra Technologies
MAXICODE
The ^BD command will generate a two-dimensional machine-readable barcode called Maxicode. Maxicode was developed by UPS to provide a barcode that could be scanned from many directions at high speeds. The fixed element size allows reliable reading of labels and the hexagonal pattern permits reading on warped or angled surfaces. Extensive error correction capabilities allow for reliable performance.
The ^BD command has three parameters that can be set.
^BDm,n,t
m = Mode
Default value: 2 Structured Carrier message - Numeric postal Code (US)
Other values: 3-6 (see below for definitions of modes).
n = Symbol number
Default value: 1
Other values: 1 to 8 symbols may be added in a structured document.
t = Total number of symbols
Default value: 1
Other values: 1 to 8, representing the total number of symbols in this sequence.
EXAMPLE OF ^BD STATEMENT: ^BD3,2,2
This instruction is showing that Mode 3 will be used. Two symbols will be added
to the structured document and a total of two symbols will be used.
When using Maxicode the ^FD statement must be formatted correctly or an error message will be generated. The statement is broken down into two sections: a High Priority Message or (Primary Message) and Low priority Message or (Secondary Message).
PRIMARY MESSAGE (hpm)
The primary message (shown in green) has two purposes. The most important is that it contains the first four bits (shown in orange) which designates what mode the remainder of the symbol will be encoded in. Secondly, the primary message (depending upon which mode is used) encodes a Structured Carrier Message which contains information used for package sorting and tracking. When high-speed scanners are used decoding past the primary message is normally not necessary.
SECONDARY MESSAGE (lpm)
The secondary message (shown in blue) provides additional information regarding the source and destination of the package. This is helpful when manual package handling is required.
SAMPLE ^FD STATEMENT
^FD001840152382802[)>_1E01_1D961Z00004951_1DUPSN_1D62X732_1D159_
1D12345671D1/11D20_1DY_1D634 ALPHA DR_1DPITTSBURGH_1DPA_1E_04^FS
001 - (Mandatory) Class of service. (3 numeric characters)
840- (Mandatory) Ship to country code. (3 numeric characters)
152382802- (Mandatory) Ship to postal code. Up to 9 digits in Mode 2. Mode 3 the limit is 6 alphanumeric digits.
1Z00004951- (Mandatory) Tracking Number
UPSN- (Mandatory) Standard Carrier Alpha Code (SCAC)
62X732- (Optional) Shipper number
159- (Optional) Julian day of pick up
1234567- (Optional) Shipment ID number
1/1- (Optional) Packages in shipment
20- (Optional) Weight (lbs.)
Y- (Optional) Address Validation
634 ALPHA DR- (Optional) Ship to street address
PITTSBURGH- (Optional) Ship to city
PA- (Optional) Ship to state
MODE DEFINITIONS
MODE 0- (Obsolete) The primary message is a Structured Carrier Message and the secondary message encodes up to 84 uppercase characters, numerics, or punctuation. If mode 0 is selected it will default to mode 2.
MODE 1- (Obsolete) The primary plus secondary message encodes up to 93 uppercase characters, numerics, or punctuation. If mode 1 is selected it will default to mode 4.
MODE 2- The primary message is a Structured Carrier Message with a numeric postal code and the secondary message encodes up to 84 characters. Mode 2 is primarily used postal code destinations located in the U.S. as well as International postal codes that only utilize numbers.
MODE 3- The primary message is a Structured Carrier Message with an alphanumeric postal code and the secondary message encodes up to 84 characters. Mode 3 is used for International postal codes that use alphanumeric characters.
MODE 4- The primary plus secondary message encodes up to 93 characters. Mode 4 encodes any data and uses ECC better known as SEC (standard error correction). SEC employs 10 error correction characters for the 21 data characters in each message, this allows full data recovery when up to 16% of the symbol characters in the Secondary message are damaged.
MODE 5- The primary plus secondary message encodes up to 77 characters with extended "error correction" throughput. Mode 5 uses EEC (enhanced error correction). EEC employs one error correcting character for every data character, providing a maximum error correction of about 25%.
MODE 6- The primary plus secondary message encodes up to 93 characters for reader configuration purposes only. Mode 6 is used for programming hardware devices such as hand held scanners.
ZPL EXAMPLES
Below is a sample ZPL format that will produce Maxicode encoded in mode 2. Mode 2 supports only numeric postal codes and is primarily used for US destinations. International countries that use only numeric zip codes should also be formatted in Mode 2. All numeric postal codes may be up to 9 digits long, with leading zeros being treated as significant.
^XA^FO100,100^BD^FH^FD001840600612301[)>_1E01_1D961Z00009861_1DUPSN
_1D62X732_1D125_1D7654321_1D1/1_1D30_1DY_1D123 MAIN ST
_1DCHICAGO_1DIL_1E_04^FS^XZ
Below is a sample ZPL format that will produce Maxicode encoded in Mode 3. This mode is used for International postal codes that use alphanumeric characters. This postal code can be up to 6 characters long. Longer codes shall be truncated. Shorter codes shall be filled with trailing spaces.
^XA^FO100,100^BD3^FH^FD001826M160RA[)>_1E01_1D961Z00009861_1DUPSN
_1D62X732_1D125_1D7654321_1D1/1_1D30_1DY_1DOLD TRAFFORD
_1DMANCHESTER_1DUK_1E_04^FS^XZ
Below is a sample ZPL format that will produce Maxicode encoded in Mode 4. This mode is will encode any data that is entered, this means that you do not have to follow the High priority or Low Priority message format . The primary feature of Mode 4 is the SEC (Standard Error Correction). Since SEC is being used you can still get full data recovery when up 16% of the symbol characters in the secondary message have been damaged.
^XA^FO100,100^^BD4^FH^FD001840600612301[)>_1E01_1D961Z00009861_1DUPSN
_1D62X732_1D125_1D7654321_1D1/1_1D30_1DY_1D123 MAIN ST
_1DCHICAGO_1DIL_1E_04^FS^XZ
In Mode 5 you will only be allowed to encode up to 77 characters in the Primary and Secondary message. The reason for this is Mode 5 uses EEC (Enhanced Error Correction) which employs one error correcting character for every data character. You will still get full data recovery even if up to 25% of the data is damaged.
Mode 6 is used for programming the hardware that will be used to read Maxicode. You are able to encode up to 93 characters in the primary and secondary message.
RULES OF THUMB TO PRODUCE VALID MAXICODE FROM ZPL
1) Maxicode utilizes header and field separator characters that must be incorporated in the ZPL string. To create these characters you will need to use the ^FH command. The HEX indicator must precede each hexadecimal value. The default HEX indicator is the underscore "_". An example of a ^FH command can be seen below.
^XA^FO100,100^BD3^FH^FD001826M160RA[)>_1E01_1D961Z00009861_1DUPSN
_1DCHICAGO_1DIL_1E_04^FS^XZ
Note that the ^FH command precedes the ^FD statement. In the above example _1E represents the RS which is the message header. _1D represents the GS which is used to separate fields in the message. The last hexadecimal value used is _04 it represents EOT which is the end of transmission character.
2) The ^BY command has no effect on Maxicode. This is due to the fact that the size of the
symbol is fixed.
3) The ^CV command does work with Maxicode. The ^CV command, when turn on, will check the barcode data for the following error conditions. After each condition you will see the letter that designates that error. This letter will be printed on the label in the following format.
INVALID - P
|Character not in character set |C |
|Check digit not correct |E |
|Data field too long (too many characters) |L |
|Data field too short (too few characters) |S |
|Parameter string contains incorrect data or missing parameter |P |
Once the ^CV command is turned on, the instruction will remain active from format to format
until turned off by another ^CV command.
4) ZPL will not automatically select your mode based on the zip code entered. You must select
the mode in the ^BD statement.
5) Make sure that the right mode has been selected for the Maxicode that you wish to print.
If no mode has been selected the default is mode 2. If the wrong mode is used you will
receive an error message.
6) UPS requires that certain data be included in a specific manner. Always use upper-case
characters. Ensure that the data sizes in the secondary message fields are followed, if not, you will receive an error message. You can view the specifics of each field as well as other information at the link provided:
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.