views:

133

answers:

3

I want to get input from a barcode-scanner, which is connected to a CHD cash register, which is connected to a Windows XP PC trough a COM port. I want to read the data from the scanner and the cash register, and send the data to a program, which has a table with items in a shop. And provide a function which removes items, too.

Where should I start? Is there a code in Delphi or Java, that can get that data into a program?

+5  A: 

@Demonick, most barcode scanners work is simply as a keyboard interrupt. you need just set the focus of an text control (like an TEdit or TMemo) an will receive the barcode as if it was typed using the keyboard.

Anyway if you need access the com port using delphi you can use the TurboPower Async library or the ComPort Library.

RRUZ
And how does the PC read data from the cash register? Is that a special event? I don't have any experience with that. And most of the testing will be without the needed hardware.
Demonick
@Demonick The ComPort components will provide events that are triggered when data is received whether from the scanner or the cash register (you said it's connected via COM port).
yozey
+1  A: 

I like TComPort, but if you prefer to write your own code you can also use ReadFile.

Mike Versteeg
A: 

There's also comport library from Synapse project: Synaser. I haven't used Synaser, but I have good experiences with Synapse and Synaser should be pretty similar.

Harriv