What is Code 93? What are the encoding rules for Code 93?
We know that each character of Code 39 barcode is composed of 5 bars and 4 spaces, a total of 9 elements, and each character accounts for 12 equal parts (module), as shown in the following figure for the encoding of the "A" character of Code 39 barcode.
Code 39 barcode encoding structure occupies a considerable amount of printing space, can record limited information, because the printed barcode is relatively long, close-range barcode scanner is not easy to read, so it needs to be more expensive long-distance wide-angle barcode scanner to read. In order to improve the shortcomings of the Code 39 barcode, Intermec developed the Code 93 barcode in 1982.
The basic structure of Code 93 characters
The following figure shows the "A" character encoding structure of the Code 93.
A character of Code 93 is composed of 3 bars, 3 space, a total of 6 elements, and each character accounts for 9 equal parts (module), the thick element can be 2 times, or 3 times, or 4 times of the thinnest element, so it can shorten the length of the barcode.
Code 93 character list
Code 93 has 10 numbers, 26 English capital letters, 7 special characters, 4 check characters, a total of 46 characters, plus the start and end code "*" (start/stop code).
Encoding method of Code 93
For example, the "A" character is encoded as 211113, the Bar of B1 is twice as thick, the Space of S3 is 3 times thick, and the rest is 1 times the thin line.
Code 93 structure, as shown in the following figure:
Code 93 barcodes start with "Start Code".
The start code is followed by the "data code".
Then it is "Checksum C", and then "Checksum K".
Finally, it is "end code STOP"
The start code and end code are both 111141 "*" characters, and one of the thickest Bars (B3 position) is 4 times the ratio of the thinnest Bar.
Code 93 checksum
Code 93 has 2 checksums to reduce the error rate when reading barcodes by barcode scanners.
Let's take the actual barcode to illustrate, as shown in the figure below, the data code of the Code 93 barcode is "ANDY" as an example to calculate the checksum C and checksum K.
First of all, we have to figure out the value of the checksum C.
Step 1: According to the weight of the cycle 1-20, add up the weight of each character in the data group, as shown in the above figure Code 39 barcode is "ANDY", check the figure 1 character value comparison table, "A" character value is 10, "N" character value is 23, "D" character value is 13, "Y" character value is 34.
Formula 1: (10*4)+(23*3)+(13*2)+(34*1)=169
Step 2: Then divide the sum of 169 by 47, 169/47=3......the remainder is 28, and the comparison table of the one-character table of the figure is "S", then the value of the check code C is "S".
Step 3: Place the "S" character on the far right of "ANDY" ---> "ANDYS" to calculate the checksum K value together.
Step 4: According to the weight of the loop 1-15, add up the weight of each character of the data group (including checksum C) by multiplying the weight.
Formula 2: "ANDYS" weights add up (10*5) + (23*4) + (13*3) + (34*2) + (28*1) = 277
Step 5: Finally, divide the sum of 237 by 47, 277/47=5...the remainder is 42, and the value of the figure is "%" in the comparison table of the figure 1 character table, then the value of the check code K is "%".
If the data code has 21 characters, the weight of the leftmost multiplier returns to 1, and the formula is SUM = (B21*1)+(B20*20)+ (B19*19)+(B18*18)+(B17*17)+(B16*16)+(B15*15)+(B14*14)+(B13*13)+(B12*12)+(B111). *11)+(B10*10)+(B9*9)+(B8*8)+(B7*7)+(B6*6)+(B5*5)+(B4*4)+(B3*3 )+(B2*2)+(B1*1)。
If the data code has 16 characters, the weight of the leftmost multiplier returns to 1, and the formula is SUM = (B16*1)+(B15*15)+(B14*14)+(B13*13)+(B12*12)+(B11*11)+(B10*10)+(B9*9)+(B8*8)+(B7*7)+(B6*6) +(B5*5)+(B4*4)+(B3*3)+(B2*2). )+(B1*1)。
A comprehensive description of Code 93 barcode features
1.Code 93 barcode, its start/end code is "*" (its code B1, S1, B2, S2, B3, S3=1, 1, 1, 1, 4, 1).
2. There are a total of 46 characters in the data, with "($)", "(%)", "(/)", "(+)", which can be expanded into Full ASCII Code 93 barcode, and the number of characters becomes 128.
3. There is no gap between each character, but a continuous arrangement of characters.
4. Checksum C is obtained by adding the multiplier weights of the data code to formula 1.
5. Checksum is obtained by adding the multiplier weights of the data code and check code C to formula 2.
6. The printing length of the Code 93 barcode is shorter than that of Code 39, and the barcode reader is easier to read.
7. Code 93 barcode character list is compatible with Code 39 barcode.
8. Full ASCII Code 93 barcode character list, as shown in the following table: