Author Topic: Bar code reader buffer issue?  (Read 636 times)

posdiver

  • Newbie
  • *
  • Posts: 3
    • View Profile
Bar code reader buffer issue?
« on: December 04, 2014, 08:51:42 pm »
Hi guys,

I'm looking out to find out why we get to read multiple scan values from the buffer when scanning multiple items very fast.

We have an Honeywell 3800g USB bar code scanner configured as a USB Com Port Emulation for serial emulation.
We are using Delphi 5 and the TnrBarCodeScan component of the library and reading bar code value on event OnBarCode.

Here's the object properties:
object bcsScanner: TnrBarCodeScan
  CharEnd = #13
  Timeout = 50
  Active = False
  Options = [boAutoDetect, boAnyChars]
  BaudRate = 9600
  Parity = pNone
  StopBits = sbOne
  ByteSize = 8
  ComPortNo = 4
  ComPort = cpCOM4
  StreamProtocol = spHardware
  OnBarCode = bcsScannerBarCode
  UseMainThread = True
  EnumPorts = epQuickAll
  Left = 8
  Top = 192
end


When scanning items very fast we end up having multiple scan values instead of just one in the buffer. Do you an idea what could be the problem?

Thank you
Francois

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Bar code reader buffer issue?
« Reply #1 on: December 05, 2014, 01:24:34 pm »
Hello

You need to change component options. By default it uses timeout for detect barcode end.
You can change this behavior to detect by END char.

Initialization can look like following:

Code: [Select]
object bcsScanner: TnrBarCodeScan
  Options = [boUseEndChar]
  CharEnd = #13
end


Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

posdiver

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Bar code reader buffer issue?
« Reply #2 on: December 08, 2014, 03:26:53 pm »
That would make sense, will try for sure!
Thank you