Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
HANDBOOK
2-D CODE
BASIC GUIDE
CONTENTS
2
Chapter 1
What are 2D codes?
1 -1 Background of 2D codes
Barcodes are extensively used in various fields: POS systems in super markets and convenience stores, prevention of
production errors and production instructions in the manufacturing industry, ordering systems in enterprises,
prevention of errors in medical treatment, and so on.
As barcodes became common and their convenience was widely recognized, other needs arose. Some required storing
greater amounts of data and others required smaller barcodes for electronic parts, etc.
A bar code contains only about 30 characters to express product information. Other necessary data (item #.,
number of items, serial #., destination, address, etc.) should be stored in a computer. Thus, when using barcodes,
you always need a computer to store the data that the barcode cannot contain.
If there was a bar code with a large capacity, a computer becomes unnecessary. Information can be carried with the
product and you can extract necessary information without a computer. If a barcode can be attached on minute
parts, traceability control (controlling manufacturing/inspection records) of each component, once impossible,
becomes a possibility.
4
Chapter 1 What are 2D codes?
1 -2 Features of 2D codes
* 1 2 3 4 5 *
♦ Disadvantage of 2D codes
Human-readable characters
Personnel can check and input the data
5
Chapter 1 What are 2D codes?
• Stack type
Conventional barcodes are vertically stacked.
Sample
PDF417 Code 49
• Matrix type
Data is composed of black and white modules in a complex pattern.
Sample
The matrix type is composed of small squares or points called “modules” arranged in a square grid. They have a
square frame, an L-shaped frame or position detection patterns for reliable position detection. A camera or a reader
integrated with 2D CCDs decodes the module arrangement by image processing. It can be read from any direction.
6
Chapter 1 What are 2D codes?
1 -4 Application of 2D codes
3. Governmental use
PDF417 (Typical)
2D codes are often used by the government to prevent forgery. In Japan, PDF217 was used for entrance tickets to the
Nagano Olympics. It is widely used for driver's licenses or ID cards in U.S. as it can code facial portrait to ensure high
security. It is also widely used for passports, ID cards, insurance cards or customs forms in Southeast Asia, the Middle
and Near East, Africa and South America to prevent forgery.
5. Medical use
PDF417 (Typical)
"Guideline for the new code designation of ethical drugs" specifies to describe product codes, expiration dates,
production numbers, and quantities of special bio-based products, and injection drugs. For example, with respect to
tablets and capsules, such information is printed on a PTP sheet or a bottle that contains individual packages. For
injectable drugs, printing is performed on each dosage package (a minimum dosage package unit by which a
manufacturer produces and sells) such as an ampoule or a vial or on each commercial package (a minimum package
unit by which a wholesaler sells to medical agencies, etc.).
When printing on a dosage package or a commercial package which has a narrow space for printing a code, a
composite symbol is used. Within the composite symbol, a production code is printed using GS1DataBar and
variable information such as a production number expiration date, or quantity is printed with MicroPDF417.
7
Memo
8
Chapter 2
What is QR code?
9
Chapter 2 What is QR code?
2 -1 Structure of QR code
QR code (Quick response code) is a matrix 2D code for high-speed reading developed by DENSO WAVE in 1994. It
was registered to the ITS standard of the AIMI in 1997 and to ISO/IEC standards in 2000.
In addition, Micro QR code was standardized as JIS-X-0510 in 2004.
• Specifications of QR code
The smallest element (black or white square) of the QR code is called “a module”. A QR code is composed of a
combination of black and white modules, position detection patterns, timing patterns, format
information that contains error correction level and mask numbers, data area and error correction code
(Reed-Solomon code).
Specifications
Smallest symbol size 21 x 21 modules
Largest symbol size 177 x 177 modules
Numeric: 7089 characters
Maximum data capacity Alphanumeric: 4296 characters
Kanji: 1817 characters
B
A 1 1 3 1 1
1 1 3 1 1
10
Chapter 2 What is QR code?
• Alignment pattern
The alignment pattern is used for position detection when there is displacement of modules due to distortion. It is
applied to model 2.
Alignment pattern
• Margin
The margin is a blank area around the QR code. Model 1 and 2 require a margin of four modules and Micro QR code
requires of two modules.
Margin
• Timing pattern
White and black modules are alternately arranged to determine the coordinate.
Timing pattern
• Format information
It contains the error correction rate and mask pattern of the code. The format information is read first when the code
is decoded.
Format information
11
Chapter 2 What is QR code?
Damaged area to
Error correcting level
entire code size
L 7%
M 15%
Q 25%
Spot Stain Data missing H 30%
Data (D1~)
Error correcting code (E1~)
12
Chapter 2 What is QR code?
2 -2 Specifications of QR code
QR codes are classified into Model 1, Model 2 and Micro QR. They have different features and data capacities.
“Version” indicates the size (number of modules) of a QR code. A larger version contains greater data. (The actual size
of the code increases as well.)
The standard version is 21 x 21 modules (MicroQR has 11 x 11 modules), and as version increases, 4 modules
(2 modules for MicroQR) are added on each side.
Model 1
Model 1 is the prototype of Model 2 and Micro QR. 1 to 14 versions Maximum data capacity
are registered to the AIMI standard. Numeric: 1167 characters
Alphanumeric: 707 characters
Binary: 468 bytes
Kanji: 299 characters
• When a version increases, 4 modules are
added to the code in both the X and Y
directions.
Model 2
Model 2 has an alignment pattern for better position adjustment and Maximum data capacity
contains greater data than Model 1. 1 to 40 versions are registered to Numeric: 7089 characters
the AIMI standard. The version 40 can contain up to 7089 numeric Alphanumeric: 4296 characters
characters. Binary: 2953 bytes
Kanji: 1817 characters
• When a version increases, 4 modules are
added to the code in both the X and Y
directions.
Alignment pattern
25
21
e
cr eas
a in
Dat
21 25
Version 1 Version 2
Micro QR
Micro QR has only one position detection pattern to reduce the size Maximum data capacity
so that it can be printed on minute components such as printed Numeric: 35 characters
circuit boards. The least numbers of modules are 11 x 11. Micro QR Alphanumeric: 21 characters
codes offer a space-saving alternative to linear barcodes for Binary: 15 bytes
applications where 35 characters or less are acceptable. Kanji: 9 characters
• When a version increases, 2 modules are
added to the code in both the X and Y
directions.
as e 13
in c r e 11
Dat a
11 13
Version 1 Version 2
13
Chapter 2 What is QR code?
14
Chapter 2 What is QR code?
❚ Model 2
Version Numeric Alphanumeric Binary Kanji
(module
numbers) L M Q H L M Q H L M Q H L M Q H
1 (21) 41 34 27 17 25 20 16 10 17 14 11 7 10 8 7 4
2 (25) 77 63 48 34 47 38 29 20 32 26 20 14 20 16 12 8
3 (29) 127 101 77 58 77 61 47 35 53 42 32 24 32 26 20 15
4 (33) 187 149 111 82 114 90 67 50 78 62 46 34 48 38 28 21
5 (37) 255 202 144 106 154 122 87 64 106 84 60 44 65 52 37 27
6 (41) 322 255 178 139 195 154 108 84 134 106 74 58 82 65 45 36
7 (45) 370 293 207 154 224 178 125 93 154 122 86 64 95 75 53 39
8 (49) 461 365 259 202 279 221 157 122 192 152 108 84 118 93 66 52
9 (53) 552 432 312 235 335 262 189 143 230 180 130 98 141 111 80 60
10 (57) 652 513 364 288 395 311 221 174 271 213 151 119 167 131 93 74
11 (61) 772 604 427 331 468 366 259 200 321 251 177 137 198 155 109 85
12 (65) 883 691 489 374 535 419 296 227 367 287 203 155 226 177 125 96
13 (69) 1022 796 580 427 619 483 352 259 425 331 241 177 262 204 149 109
14 (73) 1101 871 621 468 667 528 376 283 458 362 258 194 282 223 159 120
15 (77) 1250 991 703 530 758 600 426 321 520 412 292 220 320 254 180 136
16 (81) 1408 1082 775 602 854 656 470 365 586 450 322 250 361 277 198 154
17 (85) 1548 1212 876 674 938 734 531 408 644 504 364 280 397 310 224 173
18 (89) 1725 1346 948 746 1046 816 574 452 718 560 394 310 442 345 243 191
19 (93) 1903 1500 1063 813 1153 909 644 493 792 624 442 338 488 384 272 208
20 (97) 2061 1600 1159 919 1249 970 702 557 858 666 482 382 528 410 297 235
21 (101) 2232 1708 1224 969 1352 1035 742 587 929 711 509 403 572 438 314 248
22 (105) 2409 1872 1358 1056 1460 1134 823 640 1003 779 565 439 618 480 348 270
❚ Micro QR
Version Error correcting Numeric Alphanumeric Binary Kanji
M1 (11) Error detection 5 - - -
L 10 6 - -
M2 (13)
M 8 5 - -
L 23 14 9 6
M3 (15)
M 18 11 7 4
L 35 21 15 9
M4 (17) M 30 18 13 8
Q 21 13 9 5
Note
Each number of characters in the table above is the maximum number of characters that can be entered.
However, a version(module number) becomes larger depending on the data component (e.g. a combination of
figures and symbols or a combination of upper and lower case alphabetic characters), even when the data
contains less characters than indicated in the table above.
15
Memo
16
Chapter 3
What is Data Matrix code?
17
Chapter 3 What is Data Matrix code?
Data Matrix code is a matrix 2D code that was developed by ID Matrix in 1987. It was registered to the ISS standard of
AIMI in 1996 and the ISO/IEC standard in 2000.
Specifications
Minimum size 10 x 10 modules
Maximum size 144 x 144 modules
Numeric: 3116 characters
Maximum data capacity
Alphanumeric: 2335 characters
Older versions of Data Matrix code include ECC000, ECC050, ECC080, ECC100 and ECC140. ECC200 is the latest version
of Data Matrix code and can be square or rectangular in configuration.
• ECC200
ECC200 has upgraded error correction capacity to eliminate distortion problems.
It uses Reed-Solomon for error correction that restores data when a part of a code is damaged.
ECC200 is internationally standardized. Generally ECC200 version is used when Data Matrix code is required.
The difference between the older versions (ECC000, ECC050, ECC080, ECC100, ECC140) and the new
version (ECC200) is the number of modules per side. Older versions have odd-numbered modules and the new
version has even-numbered modules.
ECC140 ECC200
18
Chapter 3 What is Data Matrix code?
Alignment pattern
When there are more than 24 x 24 modules, the code is divided in blocks that do not exceed 24 modules on a side.
This structure prevents distortion of the code.
19
Chapter 3 What is Data Matrix code?
• Margin
The margin around a Data Matrix code should be larger than a module.
Margin
3
4
2
5
1
1
6
8
7
7 3
4
For converting “YSK” into a Data Matrix code: YSK are coded and error correcting codes are calculated as below and
arranged in a square.
Original data :
Code (hex) :
20
Chapter 3 What is Data Matrix code?
Data Matrix code (ECC200) has two configurations, square and rectangular, and always contains an even number of
cells.
❚ Square type
There are twenty-four symbol sizes ranging from 10 x 10 modules to 144 x 144 modules. When there are more than
24 x 24 modules, the code is divided in blocks that do not exceed 24 modules on a side. This structure prevents
distortion of the code.
❚ Rectangular type
Note
In Data Matrix code, the error correction rate is automatically determined by the symbol size and data capacity.
Unlike QR code, it cannot be freely specified.
21
Chapter 3 What is Data Matrix code?
❚ Rectangular type
Data capacity
Module numbers Error correcting rate
Numeric Alphanumeric Binary
8 x 18 10 6 3 25%
8 x 32 20 13 8 24%
12 x 26 32 22 14 23 to 37%
12 x 36 44 31 20 23 to 38%
16 x 36 64 46 30 21 to 38%
16 x 48 98 72 47 18 to 33%
Note
Each number of characters in the table above is the maximum number of characters that can be entered.
However, a symbol size becomes larger depending on the data component (e.g. a combination of figures and
symbols or a combination of upper and lower case alphabetic characters), even when the data contains less
characters than indicated in the table above.
22
Chapter 3 What is Data Matrix code?
3 -4 GS1 DataMatrix
GS1 Data Matrix is a 2D code symbol that was standardized by GS1 for distribution. It is based on the ECC200
Standard and defines the the following rules in order to differentiate from conventional Data Matrix code.
Element AI Data
GTIN (14 fixed digits) 01 04912345678904
Quantity (variable length) 30 100
Sell-by date 17 120401
• Relation to GS1-128
GS1 Data Matrix code has the same data structure as that of GS1-128. Thus, it likely will be used when it is necessary
to deal with large amounts of data despite the fact that print area is limited. In addition, GS1 Data Matrix code will be
standardized in the medical industry. Since codes are to be directly printed on steel medical instruments, such as
surgical knifes and scissors, the guidelines have been established.
* Steel medical instrument: An instrument that is produced with such materials as stainless, aluminum, copper alloy,
titanium, or ceramics, and is reused in medical procedures and surgeries.
23
Memo
24
Chapter 4
Other 2D codes
25
Chapter 4 Other 2D codes
4 -1 Other 2D codes
■ PDF417
[Application]
PDF417 is used for motor vehicle licenses in Arizona and Pennsylvania, and vehicle ID labels in New Zealand. In the
Philippines, it is attached to passports and used for immigration control.
Specifications
Horizontal: 1 to 90 rows
Size
Vertical: 3 to 90 lines
Numeric: 2725 characters
Maximum data capacity Alphanumeric: 1850 characters
Kanji: 554 characters
■ MaxiCode
[Application]
MaxiCode is developed by the biggest delivery company in the world, UPS. It is used for sorting or tracking
deliveries.
Specifications
Size (fixed) W 28.14 mm (1.11”) x H 26.65 mm (1.05”)
Maximum data capacity Alphanumeric: 93 characters
■ VeriCode
[Application]
VeriCode is often used for controlling glass substrates or contact lenses.
Specifications
Minimum size 10 x 10 modules
Maximum size 48 x 48 modules
Numeric: 392 characters
Maximum data capacity Alphanumeric: 261 characters
Kanji: 112 characters
26
1 -1
CALL T O C O N TA C T Y O U R L O C A L O F F I C E
www.keyence.com
SAFETY INFORMATION
TOLL
FREE
1-888-KEYENCE Please read the instruction manual carefully in
1 - 8 8 8 - 5 3 9 - 3 6 2 3 order to safely operate any KEYENCE product.
The information in this publication is based on KEYENCE’s internal research/evaluation at the time of release and is subject to change without notice. 27
Copyright (c) 2010 KEYENCE CORPORATION. All rights reserved. BL2DCode-KA-TG-E 1080-1 E 611449 Printed in Japan
* 6 1 1 4 4 9 *