Barcode Scanner Interfaces

Connecting a Barcode Scanner to a computer

There are several different types of connectors that barcode scanners use. The three main ones are USB, Serial and Keyboard Wedge. USB is the main and modern method and this type of scanner should be made for new purchases. Many current computer models do not have a serial or keyboard port and this would be the only option for such users.  This page is supplied for reference and to help labs and clinics that may have old but working barcode scanners with different connectors and interfaces.


Keyboard Wedge


 

Keyboard Wedge scanners were popular when computers had PS2 keyboard connectors. Many modern computers do not have keyboard interfaces but USB to PS2 converters are available if a lab should have a number of older keyboard wedge scanners.

To interface a keyboard wedge barcode scanner to a PC, you would disconnect the keyboard from the keyboard port on the PC, plug the bar code scanner directly into the keyboard port and then connect your keyboard to a small "jumper cable" on the end of the bar code scanner cable (so that you do not lose the functionality of your keyboard). You are therefore connecting the bar code scanner in the line between your keyboard and you PC.

When you scan a bar code with a keyboard wedge scanner, the data that is encoded in the bar code goes into the PC through the keyboard port so that it appears as if it were being typed in on the keyboard. (The bar code scanner behaves exactly like a second keyboard connected to the PC.)

With a keyboard wedge scanner, you do not need any additional software. You simply plug the scanner in and start scanning bar codes. The keyboard wedge interface is extremely simple and in most situations, you do not need to make any changes to the software that you will be scanning the bar code data into.


RS232 (Serial)

The RS232 output option connects the bar code scanner directly to an available RS232 serial port on the back of your PC. (RS232 output scanners also normally require an AC adaptor to supply power to the scanner because the RS232 port cannot supply enough power to run a bar code scanner.)

With a RS232 output scanner, you would also need to either develop your application software to open and read in data from the RS232 serial port directly. The main advantage of the RS232 output option is that you can develop your application so that it does not matter where the cursor is. When you scan a bar code, the data always goes to the correct place in your application program because the data from the scanner is going directly into the application program and is not going through the keyboard port.

The RS232 output option also makes it possible to manipulate the data that you receive from the bar code scanner before writing the data to the application program where you want the data to go. For example, if you want to parse the bar code data or add a date or time stamp to it, the RS232 serial output option would allow you to do this.

USB Output

A USB Keyboard Wedge bar code scanner works exactly like a "Keyboard Wedge" bar code scanner except that instead of connecting the bar code scanner to the keyboard port on the PC, you plug it into a USB port. When you do this, the bar code scanner is recognised by the PC as a second keyboard device and when you scan a bar code, all bar code data goes into the PC just as if it were being typed in on a keyboard. As with a standard keyboard wedge scanner, no additional software is needed. Windows will automatically recognise the scanner and treat it as if it were a second keyboard connected to your PC.

Since the USB Keyboard Wedge option works exactly the same as a standard Keyboard Wedge bar code scanner, there is really little difference between the two other than the port that you plug the scanner into. USB scanners all get their power from the USB port so you do not need an additional power supply. This is the recommended option.

USB RS232 Serial Scanners

A scanner that has a USB RS232 serial interface will come with a special "Driver" program that you will need to install in the PC that you connect the scanner to. The purpose of the driver is to create a "Virtual RS232 serial port" that works exactly like a physical RS232 port.

After you install the driver that comes with the scanner and connect the scanner to a USB port on your PC, Windows will think that it has a new RS232 serial port and any serial communications software will be able to open this "Virtual RS232 serial port" just as if it were a standard RS232 serial port built into the motherboard of the PC.