LOGISTAR

       

Code 128 Barcode
Technical Specifications & Data Sheet

[IDAutomation.com Home | Specifications | Order Code 128 bar code Fonts]
[Download Code 128 Bar Code Fonts
]

Code 128 Symbology Barcode Data Sheet

  • The Code 128 barcode fonts are scaleable and should be printed at the correct font size to suit your application and scanning equipment.  Six (6) versions of the Code 128 barcode fonts are provided to support different width and height requirements. The last character in the Code 128 barcode font name determines the height of the barcode with the shortest being AdvC128a and the tallest being AdvC128f. when printed at 20 points, the AdvC128d font will produce the exact dimensions for USS Code 128 required by the USPS special services, which is a height of .75" and an X dimension of .013". When printed at 25 points, the AdvC128d font will produce the dimensions required by the CANADA POST, which is a height of 1" and an X dimension of .017". The Code 128 barcode fonts were created to meet ANSI and CEN requirements when printing with the font size of 12 or greater. When printing EAN-14, UCC-128, SSCC-18, SCC-14 and EAN-128 barcodes the font size of 14 or greater should be used. 
  • To determine which Code 128 barcode font to use, first print out the AdvC128b barcode font at various font sizes to determine which size is the smallest that will work with your scanning equipment. Then, choose the tallest version that will fit in your scanning area.
  • Our Code 128 fonts can also be printed at very small point sizes with high quality laser printers and scanners that support reading very small x dimensions. Printed with an HP Laserjet at 600 DPI, we have been able to dependably scan our Code 128 font printed at 6 points with the Intermec CCD scanner we sell for $219 at our IDAutomation.com site.
  • UCC/EAN-128 bar codes always contain a special non-data character known as function 1 (FNC 1), which follows the start C character of the bar code. Our function "UCC128()" in our MS Office Macros and VB source code can be used for this. For more information on the formatting and placement of UCC/EAN-128 barcodes, contact the Uniform Code Council or visit the UCC website.
  • To help users integrate barcodes into their applications, we provide font automation tools such as MS Office Macros for Word, Excel and Access, Visual Basic, FoxPro, ANSI C and JAVA Source Code, LotusScript, ActiveX DLLs for development platforms that support Microsoft's ActiveX / COM technology, Crystal Reports User Function Libraries (UFLs) and a check digit calculation application with Visual Basic source code as a free download for programmers and technical users. The DLLs, macros, UFLs and code provided automatically format the start, stop and check characters to the barcode font.
  • When using our "UCC128()" macro and VB function, the first FNC1 code is included automatically. If you need to enter additional FNC1 codes, enter "FA" in the data to encode field. If you do this MAKE SURE that EVEN numbers are between "FA"; this code performs no checking for this! Example: 1234FA567800.
  • Our MS Office Macros for Word, Excel and Access also include special functions for the creation of EAN14, SSC14, SSCC18 and USPS Special Services. These functions automatically add in the required application identifier as well as calculate the MOD 10 check digit and the symbology check digit. USPS Special Services also requires the OCR-A font.
  • Three different start characters are used in the Code 128 bar codes to tell the barcode reader which character set is being used. The table below illustrates the three different character sets and the ASCII location to print the character. If you are using character sets A or B you can create the Code 128 barcode output simply by selecting the Code 128 font and typing the appropriate letter from the keyboard with the exception of the space character barcode, extended functions and the start / stop characters. It is possible to copy and paste these extended characters from the Character Map application, for more information on this function, please review our font FAQ page

    The three character sets are listed below for Code 128 in columns. In the columns A, B and C, we list the character or function that the barcode scanner will read for the associated symbol. The columns ASCII, Char and Unicode are unique to our Code 128 barcode fonts. These columns designate the location in either ASCII or Unicode where the barcode symbol for the character resides. The column Char lists the character that resides at the ASCII location which can be used to print the corresponding symbol. Our character set provides easy methods of encoding functions such as returns and tabs in the barcode.

     

 

* It is necessary to print the Code 128 space character from ASCII 194 instead of ASCII 32 because Windows cannot print a symbol instead of a space character from Visual Basic and most other development environments. Macintosh systems should print the Code128 font from unicode locations if possible because the extended characters map to different characters than what is displayed on the "Char" column in MAC Roman encoding. 

* The columns ASCII, Char and Unicode are unique to our Code 128 barcode fonts.

The following code from Visual Basic prints out all characters of the Code 128 font in order:

Private Sub Command1_Click()
 Dim x As Integer
 Dim I As Integer
 For x = 0 To 105
   Printer.FontSize = 12
   Printer.Font = "Times New Roman"
   If x < 95 Then I = x + 32    'Add 32 to characters of value less or = to 95
   If x >= 95 Then I = x + 100  'Add 100 to characters of value over 95
   If x = 0 Then I = 159        'Necessary to print the space character
   Printer.Print x              'Print the Code 128 value
   Printer.FontSize = 20
   Printer.Font = "AdvCode128c" 'Print the Code 128 bar code font for the value
   Printer.Print Chr(I)
 Next x
 MsgBox "Done printing."
End Sub

Code 128 Check Character Calculation

The check character is positioned after the data characters and just before the stop character.  To determine the value of the check character:

  1. Reference the table above to obtain the value of the start character and all data characters.
  2. Assign a weighting to each data character (not the start character, just the data characters.) The weighting starts at 1 and increases by one for each data character.
  3. Multiply the character values by their weights for the data characters.
  4. Add these all together including the start character, divide by 103 and obtain the remainder.
  5. Use the table above to locate the character that has the value of the remainder, use this as the check character.

Calculating Character Set A or B:

The following table is an example of how to obtain the check character for the data "biz" using Code 128 character set B.

  Start B b i z STOP
weighting   1 2 3  
values 104 66 73 90  
totals 104 66 146 270  
  1. Calculate Total: 104 + (66*1) + (73*2) + (90*3) = 586
  2. Calculate Checksum: 586 divided by 103 = 5 remainder of 71.  Check digit = value of 71. The character to print for the value of 71 is "g" or ASCII 103.

To print extended ASCII characters from your keyboard that do not have keys defined, you can use the ALT+<xxxx> key combination where xxxx equals the character's ASCII location in 4 digits.  For example, to type ASCII character 104 into Microsoft Word, select the font in Word, press the ALT key and while holding it down type 0104 on the keypad of your keyboard.  You must use the keypad to do this and you must enter 4 digits. 

Therefore to print the data "biz" as a barcode, you would need to type: ALT 0204, b, i, z, g, ALT 0206 or bizg . Click here for more information on printing fonts with extended ASCII characters or use our font automation tools.

Calculating Character Set C:

The following table is an example of how to obtain the check character for the number "667390" using Code 128 character set C. First we have to interleave the numbers into pairs and then choose the appropriate character that represents the number pair.

  Start C 66 73 90 STOP
weighting   1 2 3  
values 105 66 73 90  
totals 105 66 146 270  
  1. Calculate Total: 105 + (66*1) + (73*2) + (90*3) = 587
  2. Calculate Checksum: 587 divided by 103 = 5 remainder of 72.  Check digit = value of 72. The character to print for the value of 72 is ASCII 104.

Therefore to print the data "667390" as a barcode, you would need to type: ALT 0205, b, i, z, h, ALT 0206 or bizh . Click here for more information on printing fonts with extended ASCII characters or use our font automation tools

Switching Between Character Sets:

It is possible to switch between character sets in a single Code 128 barcode symbol. Although character set B can encode text and numbers, you may want to switch to set A to encode a function such as a tab or carriage return.

The following table is an example of how to encode the data "biz" using Code 128 character set B with a switch to character set A for a carriage return function.

  Start B b i z m STOP
weighting   1 2 3 4 5  
values 104 66 73 90 101 77  
totals 104 66 146 270 404 385  
  1. Calculate Total: 104 + (66*1) + (73*2) + (90*3) + (101*4) + (77*5) = 1375
  2. Calculate Checksum: 1375 divided by 103 = 13 remainder of 36.  Check digit = value of 36. The character to print for the value of 36 is "D" or ASCII 68.

This type of switching between character sets is also compatible with our font automation tools. For example, if you specify the data  bizm  (   is the switch to set A and  m  is the function according to the chart) as the input for the Code 128 B function, the data  bizmD  would be returned which would perform the switch to set A and the function of a return when printed with our font and scanned by a barcode scanner.

Source Code for a Code 128 Application

The following Visual Basic, ANSI C and Java Source Code is used to print a Code 128 B barcode and calculate the check character. You may use this code in your application as long as the copyright notice is not removed. If you plan to test this code you must install the appropriate font.

Specifications

The X dimension (X is the width of the narrow bar) is listed below for various point sizes. 

Our Code 128 fonts have been specially designed to be able to produce dependable and scannable barcodes when printed at large and small point sizes. With a 600 DPI laser printer, the Code 128 font can be printed as small as 6 points if the scanner supports reading it. Printed with a HP Laserjet at 600 DPI, we have been able to dependably scan our Code 128 font printed at 6 points with the Intermec CCD scanner we sell for $219 at our IDAutomation.com site. Excluding the start and stop characters, you can achieve slightly more than 20 CPI print density when printing at 6 points. Keep in mind though, the Code 128 fonts should be printed at 12 points or larger for open systems.

Point Size

Approximate X dimension

48 .85 mm .032"
36 .63 mm .024"
24 .42 mm .016"
16 .28 mm .011"
12 .21 mm .008"
8 .14 mm .006"
6 .105 mm .004"
 

 

Installation Instructions

For the most up to date installation procedures for Macintosh, UNIX and other operating systems please visit our Technical Support Site.

To install the Code 128 barcode font in Windows: 

If you have any questions or need assistance, please contact us.

Copyright IDAutomation.com, Inc. 2000.  All trademarks are the property of their respective owners. 

>