Kashmir9d Posted April 18, 2017 Report Share Posted April 18, 2017 Hi All - I am working to connect a barcode reader to a Vision 120 PLC via RS232. I have two barcode readers on hand - a Motorola Symbol LS4278 (which reads 1D and 2D codes), and a 1D-only Royal PS700-LSR. Both readers are set up the same way - serial cable with external power input into the scanner, connected to the PLC by a DB9 to RJ45 adapter. When connected to a Serial-to-USB converter to the computer, both scanners send the same data to the Serial Terminal (I am using Hercules). But when connected to the PLC, the Royal scanner data is read as expected, but nothing happens when scanning codes with the Symbol scanner. On the PLC, the Session Complete bit is never set by the Protocol Scan block so none of the other processing is triggered when the Symbol scanner is connected. With the Royal scanner, each scan flips the Session Complete bit, and data is copied and formatted correctly. When the scanners are connected to the computer, I see the exact same hex characters in Hercules from both scanners. PLC program attached. I have tried and confirmed various serial communication settings (baud rate, STX/ETX chars, handshaking, etc.) to match between the scanner and the PLC, and I have worked through the suggestions in this thread: Can anyone suggest what the difference between the two readers might be? I need to make the Symbol reader work since the system will read 2D barcodes. Thanks, Doug Davies 120-barcode-scanner2.vlp Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted April 18, 2017 MVP 2023 Report Share Posted April 18, 2017 There may be a missing termination character in the barcode stream. Terminal programs are a lot more forgiving than Unitronics serial ports are. Does your terminal program have a hex mode where you can see ALL the characters coming in? If not, use this one: https://sites.google.com/site/terminalbpp/ You'll see it has a little radio button for HEX and ASCII selection. In hex mode, you will see all the characters including the non-printing ones such as CR and LF. This will allow you to really tell the difference between the outputs of the barcode readers. Joe T. 1 Link to comment Share on other sites More sharing options...
Kashmir9d Posted April 18, 2017 Author Report Share Posted April 18, 2017 Joe - Thanks for your quick response! It looks to me like the termination characters are not the problem - I can see the hex characters in the terminal programs (I like that Terminal you suggested), and I can program the barcode scanners to send or not send termination characters. Including all Hex characters, both scanners are reading the same. At the moment I have both scanners set to send no termination characters (they both send ONLY the characters in the barcode), and I still see the same behavior - one scanner works fine, the other doesn't register. My program is only looking for an ASCII stream, with Silence as the termination condition in the Protocol scan block - are there any other places in the setup that might affect which streams register on the PLC? - Doug Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted April 18, 2017 MVP 2023 Report Share Posted April 18, 2017 I have more time so I looked carefully at the program and with the silence termination the termination characters don't matter. I turned the silence up to 20 ms. I made your stream variable bigger to allow a little more room in case the scan is larger than you think. I also reset the Session Complete bit MB 1 in Net 4. You have to do that to cock the block for the next scan. This is probably the main problem. Let us know if it works. Joe T. 120-barcode-scanner2 JT.vlp Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now