makebarcode.com
 

 


Barcode InfoPCL FontsHome

 

ASCII Control Codes in Code 128 Barcodes
Home > Barcode Basics >
Application Notes > AppNote022

Code 128 barcodes can include ASCII control codes as well as all the standard printable ASCII characters. A keyboard wedge scanner will read a barcode and transmit characters to the computer just as though they had been typed at the keyboard. The key codes transmitted from the keyboard and the wedge scanner are in a format particular to the PC architecture; they are not standard ASCII codes. Every standard ASCII character has an equivalent key code, and the keyboard wedge scanner automatically performs the conversion and sends the appropriate key code.

However, virtually all keyboards include many keys for which there are no ASCII equivalents: the F1 through F12 function keys, for example. These key codes can be sent from the keyboard to the computer, but there is no equivalent ASCII character that can be printed in a Code 128 barcode.

Many keyboard wedge scanners can be configured replace a specific barcode character with a different keyboard code. Since the keyboard wedge scanner transmits key codes to the computer, it can send any keyboard character. For example, a scanner could be configured to FS code (ASCII decimal 28) to an F10 key.

Here is a list of ASCII control codes. The first column lists the equivalent CTRL+key codes (^ used to indicate holding down the CTRL key):

Key ASCII

Function

^2 00 NUL null
^A 01 SOH start of header
^B 02 STX start transmission
^C 03 ETX end transmission
^D 04 EOT end of tape
^E 05 ENQ enquiry
^F 06 ACK acknowledge
^G 07 BEL bell
^H 08 BS backspace
^I 09 HT horizontal tab
^J 10 LF line feed
^K 11 VT vertical tab
^L 12 FF form feed
^M 13 CR carriage return
^N 14 SO shift out
^O 15 SI shift in
^P 16 DLE data link enable
^Q 17 DC1 device control 1
^R 18 DC2 device control 2
^S 19 DC3 device control 3
^T 20 DC4 device control 4
^U 21 NAK negative acknowledge
^V 22 SYN sync
^W 23 ETB
^X 24 CAN cancel
^Y    25 EM
^Z 26 SUB substitute
^[ 27 ESC escape
^\ 28 FS field separator
^] 29 GS group separator
^6 30 RS record separator
^- 31 US

After this comes the space bar (32) followed by the normal printable characters.

   

home
Contact:  info@makebarcode.com
(c) Copyright Measurement Equipment Corporation
All Rights Reserved