Search code examples
javadelphibarcode-scanner

Reading data from a COM port


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?


Solution

  • @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.