Barcode

Tedmonds

Member
Join Date
Jul 2009
Location
Louisiana
Posts
7
Anybody know the logic it takes to read a barcode scanner in contrologix that will read different length barocodes through the serial port? The buffer does not clear all the way thus combining two different reads together making the string that was read incorrect. If I scan 123456789 and then scan abcdefghi I would end up with 789abcdef.
 
Our application was not exactly the same but similar. We were triggering an action which included reading a received string when the received string length went from zero to non-zero. We were getting the effect you describe. We found that, after detecting the length change we had to wait a minimum amount of time for the receipt of the string to be complete before using the new string. The amount of time was found by trial and error. I hope this give you some ideas.
 
Could you just use the ARL (ASCII READ LINE) instruction? That will read until your predefined terminator character(s) are read in. Just set the scanner to send a normal terminator after it's data, like CR or CRLF, etd.
 
This is my approach and it is working right now.
All my codes are 14 characters, but can try to compare with codes with less characters. Please be care full with end characters like CR, LF and so on.
I do not use them so when i read my code, I only read bare code with no extra characters. You can sse it in the figure.

codigo.jpg
 

Similar Topics

Hi to everybody. I need to read the first 12 characters of the message that a barcode reader sends to the ascii card (1734-rs232 ascii) and I...
Replies
8
Views
724
I thought I was nearly finished on this TIA Portal/s7-1212C project (famous last words)... Up until now, I'd developed the PLC/HMI such that the...
Replies
10
Views
1,537
Does anyone know a way to dynamically generate a 2D barcode on a PanelView screen? An Activex Control maybe? If such a method is out there, it...
Replies
14
Views
2,978
I'm wondering if anyone has a solution where I can use a barcode scanner to input a string into a PLC tag. All AB hardware/software. I'm aware...
Replies
8
Views
17,964
Looking for some application advice with barcode scanners and Compactlogix PLC and a Panelview Plus. I assume Ethernet/IP is the way to go here...
Replies
1
Views
1,644
Back
Top Bottom