04-18-2006 03:20 AM
04-18-2006 07:05 AM
It's not clear precisely what you are asking for.
Reading data from an RS-232 bar code scanner should be much trhe same as reading from any other serial device - check for examples of using serial IO in the LabVIEW examples.
You'll need to specify which serial port the scanner is plugged into, the baud rate, number of bits per character, number of stop bits, parity bits on or off.
You can read characters as they become available in a while loop, terminating the while loop when the scanner sends an end character.
You may want to flush the serial IO buffer before reading a new bar code scan, in order to avoid reading any backlog of old scans.
If you have more specific questions, do ask - but please try to be more specific.
04-18-2006 07:35 AM
Hi Maharlika,
As Mark mentionned, the barcode reader is basically treated as a regular serial device. From my past experience with many barcode readers, you will need to go through the User Manual and follow the steps to "setup & calibrate" the scanner, before you can use it. This sets up the serial port configuration, the type of characters (ASCII), bar-code types, etc. Simply follow the instructions and you should be fine.
JLV
04-18-2006 01:46 PM
Hi,
If it's a keyboard (AT/PS2) type of barcode scanner, then you don't have to do anything. You basically would bring a String control on your panel into focus and then scan the barcode. The barcode scanner should input the characters read right into the String control -- as if someone actually typed those characters in there.
I suggest you test this first in another program, like Notepad, to rule out any issues with the scanner itself.
Regards,
-Khalid
04-18-2006 01:50 PM
@Khalid wrote:
I suggest you test this first in another program, like Notepad, to rule out any issues with the scanner itself.
Yes, testing it is a very good idea.
You can use Notepad if it is a wedge-type (keyboard emulator) or USB scanner. Use Hyperterminal for serial port (RS-232) types of scanners.
JLV
04-18-2006 11:58 PM
04-19-2006 07:17 AM
You are welcomed.
Also let us know if it worked.. 🙂