LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyence Barcode Reader & RS-232

Hey gang! Just wondering if anybody out there has successfully communicated with a Keyence BL-600 series barcode reader (or any Keyence barcode reader for that matter, I'm desperate) via RS-232.
 
I have a BL-601 and I can communicate with it when I'm using Keyence's software, but I can't get it to do anything through LabVIEW.
 
I've tried using the Instrument I/O Assistant and coding it the "low level way" and I'm just not getting anywhere with it so I decided I would throw my problem into the internet tubes and see what happens....
 
Thanks!
 
-- Jason
0 Kudos
Message 1 of 9
(10,153 Views)
Communicating with a barcode reader over RS232 is the same as communicating with any RS232 device. You should first verify that you can communicate with it by using HyperTerminal if you're on Windows, or your favorite terminal program if you're using another OS. Next, call up the "Basic Serial Write and Read" example that ships with LabVIEW (Help->Find Examples). Set up the communication parameters as you need. In your case you probably want the "write" off. The VI is not set up to run in a loop so you will need to scan first then run the VI to get the data off the serial port buffer.

One suggestion: can you use a keyboard wedge with this reader instead? This would make it so that the string you scan would be as if you had physically typed it via a keyboard, and the application wouldn't know the difference.
Message 2 of 9
(10,141 Views)
Thanks smercurio_fc!
 
I am able to communicate with the scanner using hyperterminal and I can send commands to the scanner (laser on/off). I'll try look at the serial examples and see if I'm missing anything.
 
I might have to look into using a keyboard wedge. The ones I originally found where all handheld scanners and not very durable looking. Thanks again for your help!
 
I'll post back what turns up.
 
 
0 Kudos
Message 3 of 9
(10,124 Views)
Okay here is where I'm currently at...
 
The basic serial write and read allows me to read what the scanner is scanning, but the write part of it is not working.
 
Curiously I've discovered that when using hyperterminal to send a command I have to type in the command (press enter) and then type the command in again followed by enter to get the scanner to accept the command.
 
What could this mean?
 
 
0 Kudos
Message 4 of 9
(10,114 Views)
It's quite likely a string termination issue. When using the serial port to send commands you typically need to send one or two characters after the command to indicate the end of the command. When you first open the "Basic Serial Write and Read" VI you will see that the "string to write" control has the text "*IDN?\r\n". the "\r\n" are the characters carriage return and linefeed characters, respectively. The string is being displayed in \ mode which means that some non-printable characters are displayed using special characters. Carriage return is indicated by "\r" and linefeed by "\n". Note that you need to be in "\" mode to see this properly. Each instrument is different, so you need to look in the scanner's manual to see what it says about this.
Message 5 of 9
(10,111 Views)
Thank you! Thank you! Thank you!
 
I added in a carriage return constant and concatonated it at the beginning of my command and it works! Thanks for your help!
0 Kudos
Message 6 of 9
(10,100 Views)
Glad you got it working, but I'm a bit puzzled over the fact that you said you had to add it to the beginning of the command. That's unusual.
0 Kudos
Message 7 of 9
(10,094 Views)

Hi,

I am also working on a Keyence Barcode scanner but so far i cant make it

work. I can read the barcode scanner data using its utility program and

windows hyperterminal, but using the labview is cant make it work yet.

If its not asking too much can i request for a screen shot of the part

to poll the barcode data.

I would appreciate for your kind help.

thanks a lot.

bong 

0 Kudos
Message 8 of 9
(7,999 Views)

Hi,Jtc.

I wonder whether you have any recommendation about the related vb.net barcode reader? I am also testing about the related projects these days. Do you have any ideas about it? Or any good suggestion? Thanks in advance.



Best regards,
Arron

0 Kudos
Message 9 of 9
(7,741 Views)