Sign in to follow this  
Followers 0
ALIEN AUTOMATED

barcode scanner help needed

11 posts in this topic

hello, I know that this is probably an easy thing to do but I have never done it before and cannot seem to get it to work. What I want to do and have seen it done before, is to attach a serial barcode scanner to my micrologix 1500 LRP through the db9 serial port on the side. All I want to do is to input the scan and then verify against code stored in PLC. No special reading speed requirements but I just dont know I guess where to start with the scanner as how to set up the com port to power the scanner and allow it to operate. Some assistance would be much appreciated and if anyone has some code that may work that would be great. Thanks guys.

Share this post


Link to post
Share on other sites
First, realize that the RS-232 port doesn't have enough juice to power the barcode scanner; that's strictly a data interface. What kind of scanner do you have ? Someone may have used the same one and will be able to describe the precise wiring between your scanner and the MicroLogix. I have posted a simple example to the "Download Code" section of this website that monitors the serial port for an incoming string, then uses the ASCII Read Line (ARL) instruction to get that data into the MicroLogix. That's the most effective way I have found to do an "Input Only" sort of barcode reader interface to the MicroLogix 1500.

Share this post


Link to post
Share on other sites
By power up the scanner do you mean to send it the command to turn on? Providing that your scanner is able to do this function, then it's just a matter of sending the the correct ASCII string out of the channel 1 port using an AWT instruction. To get started with though, you'll have to make sure that your channel 1 port is setup to the same comm standards as your barcode reader. (ASCII, Baud Rate, Data, Stop, Parity)

Share this post


Link to post
Share on other sites
Ken, I think you may be able to help with this one: How would you send out an ASCII char value? What I mean is, in order to turn on the barcode, it requires you to send the following command: SYN T CR. When trying to send this, it doesn't seem to work. It will work if triggered from Visual basic or hyperterminal, but it is sent as Chr(22) + Chr(84) + Chr(13). So my question then is how to send ASCII Dec instead of char values?

Share this post


Link to post
Share on other sites
I am trying to use a Symbol Technologies LS-4000-I000 serial scanner with rs-232 com cable. Any help would be appreciated. I am trying to get the cable pin out from Symbol Tech. to splice in the power and am waiting on thier response. If anyone could help me I would appreciate it very much. Thanks

Share this post


Link to post
Share on other sites
Hi there, In order to make the scanner works, first you have to send a trigger signal to the scanner (to tell it to scan the barcode label). After the scanner has scanned the label, it will send back the label information back to the PLC. So, you have to find out from the scanner manual what ASCII need to send to the scanner to trigger it. After you find out all information you need, I suggest you should do a test with the scanner using hyperterminal before doing it using the PLC. The reason is if you are sucessful with the hyperperminal then you know that the commands you send to the scanner are correct. Then apply the same to the PLC (now you only have to worry about the communication. This is what I use to do with any serial devices attached to the PLC). I used the Microscan scanners before with AB PLCs, so if you do not understand or having problems, just ask. Good luck Lavinh Edited by lavinh

Share this post


Link to post
Share on other sites
this model should be hand held scanner so triggering is manual. as for pinout, i'm not sure you can get it because if i remember correctly DB9 was used only for RS232. there should be round power jack on the back side of the same DB9 connector. i don't think this power connection come to any of the DB9 pins (except maybe pin5 connecting to negative terminal).

Share this post


Link to post
Share on other sites
. I figured out what I was doing wrong.

Share this post


Link to post
Share on other sites
1. Make sure the scanner did work well by PC and hyperterminal or some software else. 2. Note that the PLC'S RS232 Port can receive the ASC2 Character Stream and It's port setting need to be same with the scanner's setting strictly: baud, Data bit, stop bit. 3. take look at RA's knowledge base ,that may make some help.

Share this post


Link to post
Share on other sites
forget one item; 4. make sure the cable you use to connect is standard RS232 Cable. 2to3, 3 to2, 5 to five.

Share this post


Link to post
Share on other sites
I am not familiar with your scanner, but i recently used my first scanner a few months ago. It was a Datalogic. The main problem i had was, after a few days of frustration, found to be that i neglected to set the correct baud rate. I need to remember to always double check. Anyway, i don't know if this will help but this was the program i used for a 1500 to retrieve the information i needed from the barcode. Hope it helps. BARCODE_MATCH.RSS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0