Code 128. Контрольная сумма code 128


Штрихкод code 128: axiger

Штриховой код (штрихкод, штрих-код) — это последовательность чёрных и белых полос, представляющая некоторую информацию в удобном для считывания техническими средствами виде. Линейными (обычными) называются штрихкоды, читаемые в одном направлении (по горизонтали). На данный момент существует более 300 стандартов штрих-кодирования. Различные стандарты используют различные алгоритмы кодирования. У каждого алгоритма существуют свои особенности такие как минимальная и максимальная длинна данных, ограничения на размер штрих-кода и т.д. различные стандарты имеют свои достоинства и недостатки и часто разрабатываются с учетом конкретной области применения. Однако, есть небольшое количество стандартов, которые подходят для большинства приложений.

Code 128 - штрих-код переменной длины. Обычно кодируются буквенно-цифровые данные. Данный стандарт подходит для общего применения, например, для маркировки DVD-дисков, удостоверений личности и многих других целей. Для более плотного кодирования цифровых данных может использовать кодирование пар цифр, при этом в этом же коде могут быть закодированы алфавитные данные.Код состоит из полосок (slim bar). Ширина полоски измеряется в модулях (module). Slim bar может иметь ширину в 1,2,3 или 4 модуля. Промежутки между полосками (spaces) тоже могут иметь ширину в 1,2,3 или 4 модуля.

Существует 107 шаблонов (patterns), каждый из которых кодируется 11 модулями, включающими 3 полоски (slim bars) и 3 промежутка (spaces). Исключение - стоп-шаблон (STOP) имеет 4 полоски и кодируется 13 модулями.

Каждый шаблон декодируется по нижеприведенной таблице, для некоторых шаблонов определены управляющие воздействия, определяющие режим декодирования.

Один из трех стартовых шаблонов START-A, START-B или START-C ограничивает код слева и определяет таблицу декодирования (A, B или C). Шаблон STOP ограничивает код справа. Перед шаблоном STOP идет шаблон контрольной суммы. (Мне не удалось выяснить, требуется ли перед контрольной суммой переключить таблицу декодирования, если в этом есть необходимость? Думаю что нет) Слева и справа штрих-кода должны быть промежутки шириной по крайней мере в 10 модулей.

Некоторые специальные шаблоны (#99, #100 и #101), позволяют переходить от одной таблице декодирования к другой. Шаблон SHIFT (#98) позволяет переключаться между таблицами A и B.

Функциональные шаблоны [FNC1]-[FNC4] не определены.

Контрольная сумма занимает один шаблон и должна быть добавлена перед шаблоном [STOP]. Шаги для расчета контрольной цифры таковы:

1. Начальное значение = значению шаблона START (103, 104 или 105).2. Для каждого следующего шаблона в сообщении (исключая [STOP]): взять его значение, умножить его на свою позицию (позиция первого шаблона после START равна 1). Результат добавить к контрольной сумме3. Контрольной суммой будет считаться остаток от деления результата на 103.

Значением (value) шаблона считается его порядковый номер в таблице (считаем с нуля).

Таблица декодирования (поле "Character" определяет позицию символа в шрифте code128.ttf, который позволяет набивать символы вручную):

Value Table A Table B Table C ASCII Code Character Pattern ValueTable A Table B Table C ASCII Code Character Pattern
0 Space Space 00 0032 or 0212 Space or Ô

11011001100

54V V 54 0086 V 11101011000
1 ! ! 01 0033 ! 11001101100 55W W 55 0087 W 11101000110
2 " " 02 0034 " 11001100110 56X X 56 0088 X 11100010110
3 # # 03 0035 # 10010011000 57Y Y 57 0089 Y 11101101000
4 $ $ 04 0036 $ 10010001100 58Z Z 58 0090 Z 11101100010
5 % % 05 0037 % 10001001100 59[ [ 59 0091 [ 11100011010
6 & & 06 0038 & 10011001000 60\ \ 60 0092 \ 11101111010
7 ' ' 07 0039 ' 10011000100 61] ] 61 0093 ] 11001000010
8 ( ( 08 0040 ( 10001100100 62^ ^ 62 0094 ^ 11110001010
9 ) ) 09 0041 ) 11001001000 63_ _ 63 0095 _ 10100110000
10 * * 10 0042 * 11001000100 64nul ` 64 0096 ` 10100001100
11 + + 11 0043 + 11000100100 65soh a 65 0097 a 10010110000
12 , , 12 0044 , 10110011100 66stx b 66 0098 b 10010000110
13 - - 13 0045 - 10011011100 67etx c 67 0099 c 10000101100
14 . . 14 0046 . 10011001110 68eot d 68 0100 d 10000100110
15 / / 15 0047 / 10111001100 69eno e 69 0101 e 10110010000
16 0 0 16 0048 0 10011101100 70ack f 70 0102 f 10110000100
17 1 1 17 0049 1 10011100110 71bel g 71 0103 g 10011010000
18 2 2 18 0050 2 11001110010 72bs h 72 0104 h 10011000010
19 3 3 19 0051 3 11001011100 73ht i 73 0105 i 10000110100
20 4 4 20 0052 4 11001001110 74lf j 74 0106 j 10000110010
21 5 5 21 0053 5 11011100100 75vt k 75 0107 k 11000010010
22 6 6 22 0054 6 11001110100 76ff l 76 0108 l 11001010000
23 7 7 23 0055 7 11101101110 77cr m 77 0109 m 11110111010
24 8 8 24 0056 8 11101001100 78s0 n 78 0110 n 11000010100
25 9 9 25 0057 9 11100101100 79s1 o 79 0111 o 10001111010
26 : : 26 0058 : 11100100110 80dle p 80 0112 p 10100111100
27 ; ; 27 0059 ; 11101100100 81dc1 q 81 0113 q 10010111100
28 < < 28 0060 < 11100110100 82dc2 r 82 0114 r 10010011110
29 = = 29 0061 = 11100110010 83dc3 s 83 0115 s 10111100100
30 > > 30 0062 > 11011011000 84dc4 t 84 0116 t 10011110100
31 ? ? 31 0063 ? 11011000110 85nak u 85 0117 u 10011110010
32 @ @ 32 0064 @ 11000110110 86syn v 86 0118 v 11110100100
33 A A 33 0065 A 10100011000 87etb w 87 0119 w 11110010100
34 B B 34 0066 B 10001011000 88can x 88 0120 x 11110010010
35 C C 35 0067 C 10001000110 89em y 89 0121 y 11011011110
36 D D 36 0068 D 10110001000 90sub z 90 0122 z 11011110110
37 E E 37 0069 E 10001101000 91esc { 91 0123 { 11110110110
38 F F 38 0070 F 10001100010 92fs | 92 0124 | 10101111000
39 G G 39 0071 G 11010001000 93gs } 93 0125 } 10100011110
40 H H 40 0072 H 11000101000 94rs ~ 94 0126 ~ 10001011110
41 I I 41 0073 I 11000100010 95us del 95 0200 È 10111101000
42 J J 42 0074 J 10110111000 96Fnc 3 Fnc 3 96 0201 É 10111100010
43 K K 43 0075 K 10110001110 97Fnc 2 Fnc2 97 0202 Ê 11110101000
44 L L 44 0076 L 10001101110 98Shift Shift 98 0203 Ë 11110100010
45 M M 45 0077 M 10111011000 99Code C Code C 99 0204 Ì 10111011110
46 N N 46 0078 N 10111000110 100Code B Fnc 4 Code B 0205 Í 10111101110
47 O O 47 0079 O 10001110110 101Fnc 4 Code A Code A 0206 Î 11101011110
48 P P 48 0080 P 11101110110 102Fnc 1 Fnc 1 Fnc 1 0207 Ï 11110101110
49 Q Q 49 0081 Q 11010001110 103Start A Start A Start A 0208 Ð 11010000100
50 R R 50 0082 R 11000101110 104Start B Start B Start B 0209 Ñ 11010010000
51 S S 51 0083 S 11011101000 105Start C Start C Start C 0210 Ò 11010011100
52 T T 52 0084 T 11011100010 106Stop Stop Stop 0211 Ó 1100011101011
53 U U 53 0085 U 11011101110

START-C FNC1 90 02 10 27 53 STOP ÒÏz"*;UÓ

axiger.livejournal.com

Code 128 - WikiVisually

1. ASCII – ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard. ASCII codes represent text in computers, telecommunications equipment, and other devices, most modern character-encoding schemes are based on ASCII, although they support many additional characters. ASCII was developed from telegraph code and its first commercial use was as a seven-bit teleprinter code promoted by Bell data services. Work on the ASCII standard began on October 6,1960, the first edition of the standard was published in 1963, underwent a major revision during 1967, and experienced its most recent update during 1986. Compared to earlier telegraph codes, the proposed Bell code and ASCII were both ordered for more convenient sorting of lists, and added features for other than teleprinters. Originally based on the English alphabet, ASCII encodes 128 specified characters into seven-bit integers as shown by the ASCII chart above. The characters encoded are numbers 0 to 9, lowercase letters a to z, uppercase letters A to Z, basic punctuation symbols, control codes that originated with Teletype machines, for example, lowercase j would become binary 1101010 and decimal 106. ASCII includes definitions for 128 characters,33 are non-printing control characters that affect how text and space are processed and 95 printable characters, of these, the IANA encourages use of the name US-ASCII for Internet uses of ASCII. The ASA became the United States of America Standards Institute and ultimately the American National Standards Institute, there was some debate at the time whether there should be more control characters rather than the lowercase alphabet. The X3.2.4 task group voted its approval for the change to ASCII at its May 1963 meeting, the X3 committee made other changes, including other new characters, renaming some control characters and moving or removing others. ASCII was subsequently updated as USAS X3. 4-1967, then USAS X3. 4-1968, ANSI X3. 4-1977 and they proposed a 9-track standard for magnetic tape, and attempted to deal with some punched card formats. The X3.2 subcommittee designed ASCII based on the earlier teleprinter encoding systems, like other character encodings, ASCII specifies a correspondence between digital bit patterns and character symbols. This allows digital devices to communicate each other and to process, store. Before ASCII was developed, the encodings in use included 26 alphabetic characters,10 numerical digits, ITA2 were in turn based on the 5-bit telegraph code Émile Baudot invented in 1870 and patented in 1874. The committee debated the possibility of a function, which would allow more than 64 codes to be represented by a six-bit code. In a shifted code, some character codes determine choices between options for the character codes. It allows compact encoding, but is reliable for data transmission. The standards committee decided against shifting, and so ASCII required at least a seven-bit code, the committee considered an eight-bit code, since eight bits would allow two four-bit patterns to efficiently encode two digits with binary-coded decimal

2. Code 39 – Code 39 is a variable length, discrete barcode symbology. The Code 39 specification defines 43 characters, consisting of letters, numeric digits. An additional character is used for both start and stop delimiters, each character is composed of nine elements, five bars and four spaces. Three of the nine elements in each character are wide, the width ratio between narrow and wide is not critical, and may be chosen between 1,2 and 1,3. The barcode itself does not contain a check digit, but it can be considered self-checking on the grounds that a single erroneously interpreted bar cannot generate another valid character. Possibly the most serious drawback of Code 39 is its low density, It requires more space to encode data in Code 39 than, for example. This means that very small goods cannot be labeled with a Code 39 based barcode, however, Code 39 is still used by some postal services, although the Universal Postal Union recommends using Code 128 in all cases and can be decoded with virtually any barcode reader. Code 39 was developed by Dr. David Allais and Ray Stevens of Intermec in 1974 and their original design included two wide bars and one wide space in each character, resulting in 40 possible characters. Setting aside one of characters as a start and stop pattern left 39 characters. Four punctuation characters were added, using no wide bars. Code 39 was later standardised as ANSI Mh20.8 M-1983, MIL-STD-1189 has been cancelled and replaced by ANSI/AIM BC1/1995, Uniform Symbology Specification — Code 39. The * character presented below is not a true encodable character, the asymmetry of the symbol allows the reader to determine the direction of the barcode being scanned. This code is mapped to the * character in barcode fonts. For example, the letter P has its bars aligned to represent the number 6, when represented as a digit, the number 10 is used to encode the number zero. Because there are six letters in the Letters group, the other four positions in this group are used to represent three symbols as well as the start/stop character. The two wide bars, out of five positions, encode a number between 1 and 10 using a two-out-of-five code with the following numeric equivalence,1,2,4,7,0. For example, the number 6 is encoded NWWNN, with wide bars occupying the positions for 2 and 4, in the case of NNWWN which is 4+7 =11 it is assigned to 0 for digits, and 10 for the letter columns. When encoding the Letters the equation needs a −1 added so A is WNNNW →1 +10 −1 →10 as shown in the table, the last four characters consist of all narrow bars and three wide spaces

3. Штриховой код – A barcode is an optical, machine-readable, representation of data, the data usually describes something about the object that carries the barcode. Originally barcodes systematically represented data by varying the widths and spacings of parallel lines, later two-dimensional codes were developed, using rectangles, dots, hexagons and other geometric patterns in two dimensions, usually called barcodes although they do not use bars as such. Barcodes originally were scanned by special optical scanners called barcode readers, later applications software became available for devices that could read images, such as smartphones with cameras. An early use of one type of barcode in a context was sponsored by the Association of American Railroads in the late 1960s. Two plates were used per car, one on side, with the arrangement of the colored stripes encoding information such as ownership, type of equipment. The plates were read by a scanner, located for instance, at the entrance to a classification yard. The project was abandoned after ten years because the system proved unreliable after long-term use. Barcodes became commercially successful when they were used to automate supermarket checkout systems and their use has spread to many other tasks that are generically referred to as automatic identification and data capture. The very first scanning of the now ubiquitous Universal Product Code barcode was on a pack of Wrigley Company chewing gum in June 1974, silver told his friend Norman Joseph Woodland about the request, and they started working on a variety of systems. Their first working system used ultraviolet ink, but the ink faded too easily and was expensive, convinced that the system was workable with further development, Woodland left Drexel, moved into his fathers apartment in Florida, and continued working on the system. His next inspiration came from Morse code, and he formed his first barcode from sand on the beach, I just extended the dots and dashes downwards and made narrow lines and wide lines out of them. To read them, he adapted technology from optical soundtracks in movies and he later decided that the system would work better if it were printed as a circle instead of a line, allowing it to be scanned in any direction. The patent was issued on 7 October 1952 as US Patent 2,612,994, in 1951, Woodland moved to IBM and continually tried to interest IBM in developing the system. IBM offered to buy the patent, but its offer was not high enough, philco purchased their patent in 1962 and then sold it to RCA sometime later. During his time as an undergraduate, David Collins worked at the Pennsylvania Railroad, immediately after receiving his masters degree from MIT in 1959, he started work at GTE Sylvania and began addressing the problem. He developed a system called KarTrak using blue and red reflective stripes attached to the side of the cars, encoding a six-digit company identifier, light reflected off the stripes was fed into one of two photomultipliers, filtered for blue or red. The Boston and Maine Railroad tested the KarTrak system on their cars in 1961. The tests continued until 1967, when the Association of American Railroads selected it as a standard, Automatic Car Identification, the installations began on 10 October 1967

4. Codabar – Codabar is a linear barcode symbology developed in 1972 by Pitney Bowes Corp. It and its variants are known as Codeabar, Ames Code, NW-7, Monarch, Code 2 of 7, Rationalized Codabar. Although Codabar has not been registered for US federal trademark status and it was designed to be accurately read even when printed on dot-matrix printers for multi-part forms such as FedEx airbills and blood bank forms, where variants are still in use as of 2007. Although newer symbologies hold more information in a space, Codabar has a large installed base in libraries. After each printed code, the stamp is mechanically turned to the next number. Because Codabar is self-checking, most standards do not define a check digit, some standards that use Codabar will define a check digit, but the algorithm is not universal. For purely numerical data, such as the library barcode pictured above, when all 16 symbols are possible, a simple modulo-16 checksum is used. The values 10 through 19 are assigned to the symbols –$, /+. ABCD, each character comprises 7 elements,4 bars and 3 spaces, and is separated from adjacent characters by an additional narrow space. Each can be narrow or wide. The width ratio between narrow and wide can be chosen between 1,2.25 and 1,3, the minimum narrow width varies with the specification, with the smallest being 0.0065 inches, allowing 11 digits per inch to be encoded. The characters are divided into three groups, based on the number of elements, The basic 12 symbols are encoded using all possible combinations of one wide bar. An additional 4 symbols are encoded using 3 wide bars and no wide spaces,4 start and stop symbols are encoded using one wide bar and two wide spaces. The original Pitney-Bowes specification actually varies the narrow, wide width ratio to all characters the same width. That is, characters with 2 wide elements use a 3,1 ratio, while characters with 3 wide elements use a 2,1 ratio, Rationalized codabar uses a fixed ratio and allows the character widths to vary. Some variants allow the dollar, dash, plus sign, colon, slash. The alphabet characters A, B, C, D are used to mark the beginning and they do not appear in the body of a Codabar string. The 16 possible combinations of start and stop symbol may be used to different applications. For example, the library barcode illustrated begins with A and ends with B, types of barcodes Online Codabar generator

5. European Article Number – EAN barcodes are used worldwide for lookup at retail point of sale, but can also be used as numbers for other purposes such as wholesale ordering or accounting. The most commonly used EAN standard is the thirteen-digit EAN-13, a superset of the original 12-digit Universal Product Code standard developed in 1970 by George J. Laurer, an EAN-13 number includes a 3-digit GS1 prefix. A prefix with a first digit of 0 indicates a 12-digit UPC-A code follows, a prefix with the first two digits of 45 or 49 indicates a Japanese Article Number follows. The less commonly used 8-digit EAN-8 barcode was introduced for use on small packages, 2-digit EAN-2 and 5-digit EAN-5 are supplemental barcodes, placed on the right-hand side of EAN-13 or UPC. These are generally used for periodicals like magazines or books, to indicate the current years issue number, note that EAN-13 codes beginning with 0 are actually 12-digit UPC codes with prepended 0 digit. In the last few years, more products sold by retailers outside United States and Canada have been using EAN-13 codes beginning with 0, the 020-029 GS1 Prefixes are worth a special mention. GS1 defines this as being available for internal use. Some retailers use this for proprietary products, although many retailers obtain their own code for their own brands. Other retailers use at least part of this prefix for products which are packaged in store, for example, in these cases, the barcode may encode a price, quantity or weight along with a product identifier - in a retailer defined way. The product identifier may be one assigned by the Produce Electronic Identification Board or may be retailer assigned, retailers who have historically used UPC barcodes tend to use GS1 prefixes starting with 02 for store-packaged products. This is informally known as Bookland, the prefix 979 with first digit 0 is used for International Standard Music Number and the prefix 977 indicates International Standard Serial Number. The manufacturer code is a code assigned to each manufacturer by the numbering authority indicated by the GS1 Prefix. All products produced by a company will use the same manufacturer code. EAN-13 uses what is called variable-length manufacturer codes, thus if a potential manufacturer knows that it is only going to produce a few products, EAN-13 may issue it a longer manufacturer code, leaving less space for the product code. This results in efficient use of the available manufacturer and product codes. The product code is assigned by the manufacturer, the product code immediately follows manufacturer code. The total length of manufacturer code plus product code should be 9 or 10 digits depending on the length of country code, the check digit is an additional digit, used to verify that a barcode has been scanned correctly. It is computed modulo 10, where the weights in the checksum calculation alternate 3 and 1, in particular, since the weights are relatively prime to 10, the EAN-13 system will detect all single digit errors

6. GS1-128 – GS1-128 is an application standard of the GS1 implementation using the Code 128 barcode specification. The former correct name was UCC/EAN-128, other no longer used names have included UCC-128 and EAN-128. GS1-128 uses a series of Application Identifiers to include data such as best before dates, batch numbers, quantities, weights. The GS1-128 standard is a standard within the Code 128 barcode. It identifies data with Application Identifiers,00 is the serial shipping container code AI that designates the following data as a serial shipping container code. It is possible to encode several pieces of data in one barcode and this is not required before the expiration date, because the production date is fixed length. However, there is no mapping for the number with EPC-SGTIN. This list is from 2003 and therefore out of date and possibly incorrect, all dates are formatted as YYMMDD. Y in the AI gives a number of places in the following value. The represented value is the following integer divided by 10y, for example, a net weight of 22.7 kg could be coded as 3101000227,3102002270,3103022700, or 3104227000

7. ITF-14 – ITF-14 is the GS1 implementation of an Interleaved 2 of 5 bar code to encode a Global Trade Item Number. ITF-14 symbols are used on packaging levels of a product. The ITF-14 will always encode 14 digits, the GS1 GEPIR tool can be used to find out the company identification for a given GTIN-14 that is encoded in an ITF-14 Symbol. The thick black border around the symbol is called the Bearer Bar

8. Universal Product Code – UPC consists of 12 numeric digits, that are uniquely assigned to each trade item. Along with the related EAN barcode, the UPC is the mainly used for scanning of trade items at the point of sale. UPC data structures are a component of GTINs and follow the global GS1 specification, but some retailers do not use the GS1 system. On the other hand, some use the EAN/UPC barcode symbology. Wallace Flint proposed an automated system in 1932 using punched cards. Bernard Silver and Norman Joseph Woodland, a student from Drexel Institute of Technology, developed a bulls-eye style code. In the 1960s, railroads experimented with a barcode for tracking rail cars. Technology firms including Charegon, IBM, Litton-Zellweger, Pitney Bowes-Alpex, Plessey-Anker, RCA, singer, and Dymo Industries/Data General proposed alternative symbol representations to the council. In the end the Symbol Selection Committee chose to modify, changing the font in the human readable area. The first UPC marked item scanned at a retail checkout was at the Marsh supermarket in Troy, Ohio at 8,01 a. m. on June 26,1974. The shopper was Clyde Dawson and cashier Sharon Buchanan made the first UPC scan, the NCR cash register rang up 67 cents. The entire shopping cart also had barcoded items in it, and this item went on display at the Smithsonian Institutions National Museum of American History in Washington, D. C. Around late 1969, IBM at Research Triangle Park in North Carolina assigned George Laurer to determine how to make a supermarket scanner, in late 1970, Heard Baumeister provided equations to calculate characters per inch achievable by two IBM bar codes, Delta A and Delta B. In February,1971, Baumeister joined Laurer, in mid 1971, William Bill Crouse invented a new bar code called Delta C. It achieved four times the characters per inch as Delta B, Delta B compared bar widths to space width to code bits. This was extremely sensitive to ink spread where too much ink or pressure would cause both edges of a bar to spread outward and too little to them to shrink. To make it worse as bars spread spaces shrink and vice versa, Delta C achieved its higher performance by only using leading to leading or trailing to trailing edges which was unaffected by uniform ink spread. The code provided best performance when it had a character set with a fixed reference distance that spanned most or preferably all the character

9. Фармакод – Pharmacode, also known as Pharmaceutical Binary Code, is a barcode standard, used in the pharmaceutical industry as a packing control system. It is designed to be readable despite printing errors and it can be printed in multiple colors as a check to ensure that the remainder of the packaging is correctly printed. For best practice, the code should contain at least three bars and should always be a combination of both thick and thin bars. Pharmacode can represent only an integer from 3 to 131070. The minimum barcode is 2 bars and the maximum 16, so the smallest number that could be encoded is 3 and it represents colors which are on the label

10. PDF417 – PDF417 is a stacked linear barcode symbol format used in a variety of applications, primarily transport, identification cards, and inventory management. PDF stands for Portable Data File, the 417 signifies that each pattern in the code consists of 4 bars and spaces, and that each pattern is 17 units long. The PDF417 symbology was invented by Dr. Ynjiun P. Wang at Symbol Technologies in 1991, PDF417 is one of the formats that can be used to print postage accepted by the United States Postal Service. PDF417 is also selected by the airline industrys Bar Coded Boarding Pass standard as the 2D bar code symbolism for paper boarding passes, PDF417 is the standard selected by the Department of Homeland Security as the machine readable zone technology for RealID compliant driver licenses and state issued identification cards. It is also used by FedEx on package labels, in addition to features typical of two dimensional bar codes, PDF417s capabilities include, Linking. PDF417 symbols can link to other symbols which are scanned in sequence allowing even more data to be stored, the user can decide how wide the narrowest vertical bar is, and how tall the rows are. Anyone can implement systems using this format without any license and it is the intent and understanding of ISO/IEC that the symbology presented in this International Standard is entirely in the public domain and free of all user restrictions, licences and fees. The PDF417 bar code consists of 3 to 90 rows, each of which is like a small linear bar code, each row has, a quiet zone. This is a minimum amount of white space before the bar code begins. A start pattern which identifies the format as PDF417, a row left codeword containing information about the row 1-30 data codewords, Codewords are a group of bars and spaces representing one or more numbers, letters, or other symbols. A row right codeword with more information about the row, all rows are the same width, each row has the same number of codewords. PDF417 uses a base 929 encoding, each codeword represents a number from 0 to 928. The codewords are represented by patterns of dark and light regions, each of these patterns contains four bars and four spaces. The total width is 17 times the width of the narrowest allowed vertical bar, each pattern starts with a bar and ends with a space. The row height must be at least 3 times the minimum width, there are three distinct bar–space patterns used to represent each codeword. These patterns are organized into three groups known as clusters, the clusters are labeled 0,3, and 6. No bar–space pattern is used in more than one cluster, the rows of the symbol cycle through the three clusters, so row 1 uses patterns from cluster 0, row 2 uses cluster 3, row 3 uses cluster 6, and row 4 again uses cluster 0. Alternatively, K = E1 − E2 + E5 − E6 +9 Where Ei is the i-th edge-to-next-same-edge distance, odd indices are the leading edge of a bar to the leading edge of the next bar, even indices are for the trailing edges

wikivisually.com

КОДИРОВКИ - Штриховое кодирование

Код 128

Штриховой Код 128 является непрерывным двунаправленным контролепригодным кодом переменной длины и позволяет отобразить 128 знаков ASCII.

Пример штрихового Кода 128

Пример штрихового Кода 128

Код 128 - код высокой плотности, отличительной особенностью которого является возможность кодирования ста пар чисел, позволяющей вдвое увеличить плотность записи при представлении штриховым кодом цифровых данных.

Знаки штрихового Кода 128 состоят из трех штрихов и трех промежутков. Штрихи и промежутки имеют модульное построение и их ширина составляет от одного до четырех модулей. Ширина знака равна одиннадцати модулям. Исключением является знак "Стоп", который состоит из тринадцати модулей и имеет четыре штриха и три промежутка.

Пример построения знака "Стоп".

Пример построения знака "Стоп"

Каждый знак Кода 128 может иметь три значения в зависимости от управляющего знака впереди. Выбор одного из трех знаков "Старт" означает обращение при кодировании к одной из трех подсистем (A,B,C). Переход от одной подсистемы к другой в кодовом ряду может осуществляться при помощи соответствующего знака "Shift".

Штрихкодовый символ Кода 128 состоит из зоны стабилизации (1), предшествующей знаку "Старт", соответствующего знака "Старт" (2) подсистемы A, B или C, информационных знаков (3), в том числе и контрольного знака (4), знака "Стоп" (5) и зоны стабилизации (6), следующей за знаком "Стоп".

Структура Кода 128

Контрольное число - это остаток, полученный от деления на число 103 значения выражения:

Формула расчета контрольного числа

где:

- числовое значение знака "Старт";
- количество знаков в кодовой строке;
- номер позиции знака в кодовой строке,счита с первого знака, следующим за знаком "Старт";
- числовое значение знака в i-й позиции.
Пример расчета контрольного числа.

Числовые значения знаков смотрим по таблице.

Код данных

C

o

d

e

1

2

8

Номер позиции

1

2

3

4

5

6

7

8

Числовое значение знака ()

35

79

68

69

0

17

18

24

Значение

35

158

204

276

0

102

126

192

1093

Числовое значение знака "Старт" подсистемы B равно 104 (по таблице).

Подстановка значений в формулу

1197/103=11 и 64 в остатке. Числовому значению 64 соответствует знак [`] (по таблице). Таким образом, полное представление данных с учетом контрольного знака будет: [Code 128`].

Вы можете также сгенерировать собственный штрихкод, указав свои данные, зайдите сюда.

 Cимволика штрихового Кода 128

Числовоезначение ПодсистемаA ПодсистемаB ПодсистемаC Bar/Space PatternB S B S B S
0 SP SP 00 2 1 2 2 2 2
1 ! ! 01 2 2 2 1 2 2
2 " " 02 2 2 2 2 2 1
3 # # 03 1 2 1 2 2 3
4 $ $ 04 1 2 1 3 2 2
5 % % 05 1 3 1 2 2 2
6 & & 06 1 2 2 2 1 3
7 ' ' 07 1 2 2 3 1 2
8 ( ( 08 1 3 2 2 1 2
9 ) ) 09 2 2 1 2 1 3
10 * * 10 2 2 1 3 1 2
11 + + 11 2 3 1 2 1 2
12 , , 12 1 1 2 2 3 2
13 - - 13 1 2 2 1 3 2
14 . . 14 1 2 2 2 3 1
15 / / 15 1 1 3 2 2 2
16 0 0 16 1 2 3 1 2 2
17 1 1 17 1 2 3 2 2 1
18 2 2 18 2 2 3 2 1 1
19 3 3 19 2 2 1 1 3 2
20 4 4 20 2 2 1 2 3 1
21 5 5 21 2 1 3 2 1 2
22 6 6 22 2 2 3 1 1 2
23 7 7 23 3 1 2 1 3 1
24 8 8 24 3 1 1 2 2 2
25 9 9 25 3 2 1 1 2 2
26 : : 26 3 2 1 2 2 1
27 ; ; 27 3 1 2 2 1 2
28 < < 28 3 2 2 1 1 2
29 = = 29 3 2 2 2 1 1
30 > > 30 2 1 2 1 2 3
31 ? ? 31 2 1 2 3 2 1
32 @ @ 32 2 3 2 1 2 1
33 A A 33 1 1 1 3 2 3
34 B B 34 1 3 1 1 2 3
35 C C 35 1 3 1 3 2 1
36 D D 36 1 1 2 3 1 3
37 E E 37 1 3 2 1 1 3
38 F F 38 1 3 2 3 1 1
39 G G 39 2 1 1 3 1 3
40 H H 40 2 3 1 1 1 3
41 I I 41 2 3 1 3 1 1
42 J J 42 1 1 2 1 3 3
43 K K 43 1 1 2 3 3 1
44 L L 44 1 3 2 1 3 1
45 M M 45 1 1 3 1 2 3
46 N N 46 1 1 3 3 2 1
47 O O 47 1 3 3 1 2 1
48 P P 48 3 1 3 1 2 1
49 Q Q 49 2 1 1 3 3 1
50 R R 50 2 3 1 1 3 1
51 S S 51 2 1 3 1 1 3
52 T T 52 2 1 3 3 1 1
53 U U 53 2 1 3 1 3 1
54 V V 54 3 1 1 1 2 3
55 W W 55 3 1 1 3 2 1
56 X X 56 3 3 1 1 2 1
57 Y Y 57 3 1 2 1 1 3
58 Z Z 58 3 1 2 3 1 1
59 [ [ 59 3 3 2 1 1 1
60 \ \ 60 3 1 4 1 1 1
61 ] ] 61 2 2 1 4 1 1
62 ^ ^ 62 4 3 1 1 1 1
63 _ _ 63 1 1 1 2 2 4
 64 NUL ` 64 1 1 1 4 2 2
65 SOH a 65 1 2 1 1 2 4
66 STX b 66 1 2 1 4 2 1
67 ETX c 67 1 4 1 1 2 2
68 EOT d 68 1 4 1 2 2 1
69 ENQ e 69 1 1 2 2 1 4
70 ACK f 70 1 1 2 4 1 2
71 BEL g 71 1 2 2 1 1 4
72 BS h 72 1 2 2 4 1 1
73 HT i 73 1 4 2 1 1 2
74 LF j 74 1 4 2 2 1 1
75 VT k 75 2 4 1 2 1 1
76 FF I 76 2 2 1 1 1 4
77 CR m 77 4 1 3 1 1 1
78 SO n 78 2 4 1 1 1 2
79 SI o 79 1 3 4 1 1 1
80 DLE p 80 1 1 1 2 4 2
81 DC1 q 81 1 2 1 1 4 2
82 DC2 r 82 1 2 1 2 4 1
83 DC3 s 83 1 1 4 2 1 2
84 DC4 t 84 1 2 4 1 1 2
85 NAK u 85 1 2 4 2 1 1
86 SYN v 86 4 1 1 2 1 2
87 ETB w 87 4 2 1 1 1 2
88 CAN x 88 4 2 1 2 1 1
89 EM y 89 2 1 2 1 4 1
90 SUB z 90 2 1 4 1 2 1
91 ESC { 91 4 1 2 1 2 1
92 FS | 92 1 1 1 1 4 3
93 GS } 93 1 1 1 3 4 1
94 RS ~ 94 1 3 1 1 4 1
95 US DEL 95 1 1 4 1 1 3
96 FNC 3 FNC 3 96 1 1 4 3 1 1
97 FNC 2 FNC 2 97 4 1 1 1 1 3
98 SHIFT SHIFT 98 4 1 1 3 1 1
99 CODE C CODE C 99 1 1 3 1 4 1
100 CODE B FNC 4 CODE B 1 1 4 1 3 1
101 FNC 4 CODE A CODE A 3 1 1 1 4 1
102 FNC 1 FNC 1 FNC 1 4 1 1 1 3 1
 103 Start A Start A Start A 2 1 1 4 1 2
 104 Start B Start B Start B 2 1 1 2 1 4
105 Start C Start C Start C 2 1 1 2 3 2
106 Stop Stop Stop 2 3 3 1 1 1 2

www.barcode.kiev.ua


Смотрите также