I think you are doing something wrong somewhere.
Are you using some API to read the scanner? A barcode has starting code and an ending code (2 lines). So the API should have some way to tell you that it is finished reading the barcode.


EDIT: Aaah... si beat me at that