Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 7 Jahren, 9 Monaten
Letzter Beitrag:
vor 4 Jahren, 1 Monat
Beteiligte Autoren:
PlusPoint, makaveiljojo, Manfred, Goof.pcs.crosspost, Paulo Oliveira

Serial Barcode Scanner

Startbeitrag von PlusPoint am 19.05.2010 14:08


Hi Everybody,

Has anyone integrated their application to accept a barcode using a serial barcode scanner.
Works ok with the USB or Keyboard Wedge interface. The scanner works fine in HyperTerminal mode..

Would like to know some sample code please.

Regards
Bhagwan

Antworten:

I don't have any sample for bar code reader but i use one card reader connected to com1.

I use sOpen, sParameter, sWrite, sRead and sClose instructions.

von Paulo Oliveira - am 20.05.2010 09:24
Le 20/05/2010 12:49, Paulo Oliveira a écrit :
> I don't have any sample for bar code reader but i use one card reader connected to com1.
> I use sOpen, sParameter, sWrite, sRead and sClose instructions.
>
USB-Wedge or PS2-Wedge scanner work as a keyboard.
The main disadvantage is that you have to be in the good input field to
make the application work properly.
To use a serial scanner (serial or USB-COM emulation) you could do a
thread that read serial port (as said upper, sopen,....) and send
"messages" to the main window to handle the bar-code scanned.
Or use sEvent() to avoid the usage of a thread and messages.
Anyway, i advise you to add a prefix and a suffix to the data (Try SOH
and ETX), so you should be able to detect a fully scanned bar-code.
Meanwhile it also permit to handle variable length bar-codes likes EAN 128.

Bye
Goof

PS : I hope that my English isn't that bad. So you could understand.
(thanks to Spell-checker and Google translation)
Message forwarded from pcsoft.us.windev

von Goof.pcs.crosspost - am 25.05.2010 11:11
One sample, in part supplied my by Arie Mars:

/// Open port

ComOpen = sOpen(Comport,16,16,sDefaultTimeout,True)

sParameter(Comport,nBaudrate,nparity,nDatabits,Nstopbits)

sEvent(Comport,eEveCharReceived,"PortChange") //

von Manfred - am 25.05.2010 16:56

Thanks guys,

I am going to try it out and revert back

Bhagwan

von PlusPoint - am 27.05.2010 19:07
Here is a Barcode Scanner Integration Tutorial which might be helpful!
It mainly talks about how to scan data into applications with a USB Barcode scanner or wand.

von makaveiljojo - am 23.12.2013 03:30
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.