Clearing Channel 0 buffer

Sparky

Member
Join Date
Jan 2003
Location
Twin Falls, ID
Posts
64
I have got such good help in the past from every one here I figure I should try it again. My problem is my ACL (ascii clear buffer). I am reading a 42 character bare code into channel 0. My data and string conversions are great. The problem I am having is that my control DN bit is what is currently clearing my buffer. However some times after a block has left the cooler before it makes it to the barcode scanner the label gets smugged or smeared. when this happens then the scanner will only pick up a limited number of characters, this is good because this block would be rejected. the problem is that the next block is also rejected because the first partial scan characters are still in the buffer which are then compiled with the characters from the second block. This changes the ascii file in the buffer so that it no longer within the parameters. In short I need a way to clear the buffer when the scan isn't complete. It seams like hing I use ends up giving me an error in my ARD instruction.
 
Sparky there are several ways to clear your buffer. If you are using a sensor, you could possibly clear the buffer when the sensor returns to a non-detect status. Or you can time the sense/read routine and use a timer that clears the buffer after the required sense/read time. The last option assumes you've handed the read info off to another part of your program.
If you need clarification of either method or I'm not reading your question right let me know. We read barcodes alot where I work.
 
Tried both methods

I tried both methods. with the photo eye as well as a timer. The operation works great untill there is a partial scan when the phot eye or the timer tries to clear the buffer the ARD instructions gets an "0Eh" ERROR. I have to manually go into the control block and reset the ER bit after I untest my edits.
 
I have to admit I haven't had this error before so I may be shooting to low. Can you clear this bit by the program?

We use strings to extract the data from our scanners and if a string comparison comes up different from our "library" of acceptable strings, we consider that a "no read". Maybe this scenario can be used to clear the buffer.
Let me know more about your situation--maybe post part of your logic if you're able. This should be easy enough to figure out.
 
here is some of it

Hey rube here is my last attemp to clear the buffer as well as the ARD function. One thing I want to ask, is there an order that the two functions need to be cleared/reset. because I noticed when I use the control DN bit it works, but when I clear the buffer then try to reset the ARD control that is when I get mey errors.

rungs1.jpg
 
just to clarify

Just incase basically I'm trying to use the read character position number to clear the instructions. If the control reads from the buffer but doen't reach it's DN position then the timer will time out and IN THEORY clear the ARD and Buffer.
 
Can the scanner not be configured to send a fixed 'no read' message when a less than perfect bar code is read? We use (Accusort) scanners to read five digit numeric codes. They are set up such that when a barcode is unreadable the scanner sends 'FFFFF', which the logic interprets as a no read. So, in either case, a string with a correct delimiter (carriage return?) is always sent.

This way there are only two possibilities: 1. a good read, and therefore a known length and format of the data, or, 2. a no read, to be handled accordingly.

.02
 
??????

Doug I don't know for sure if it can be configured with a no read signal. I will have to check. I am using a SICK 430 series scanner. I will check into it and get back with every one.
 
Sparky

I printed your code and compared it to a situation I've done before. The biggest thing that jumps out at me, and i haved tried it in a PLC, is that your Scan control must leave "zero" to start timer T32:29, the timer you use to clear the buffer. If you get a no read, does the scanner send a value greater than "zero"? If not, T32:29 never starts and your buffer doesn't clear.

The way I write the code: I use a sensor to sense presence and start a cycle counter. Using LIM instructions, I should see a transmit from the scanner between two ACC values, The I let the PLC do it's string manipulation between two other ACC values, and lastly I clear the Buffers between two values. My cycle timer is onlt set for 50/100 sec. so it's not a long cycle.

This method works fine for my application and we have a medium speed conveyor that we read (1 box per sec.).
I hope I have given you an idea. If not let me know and I can post some ladder to illustrate what I mean.
 

Similar Topics

This problem has really got me going. First off both processors are AB SLC 500. I'm ussing Chanel 0 RS233 cable to read ASCII data from a barecode...
Replies
2
Views
2,924
I'm online with a 90-30 using PAC ME 9.8 No one has gotten online with this PLC for many years and the the I/O fault table has a total of 1209...
Replies
6
Views
2,937
Using an L81 - I have the arrangement below that will try the Ethernet Radio first and if that fails use the Cellular Radio. The Failover works...
Replies
16
Views
3,304
Since this is the most helpful place on earth for us programmers, I'm back with another one. Using Logix v32 I've got an array with 100 elements...
Replies
9
Views
2,902
Hey guys, I'm still pretty new to PLC's in general. For a program on RSLogix 500 with a micro1400 and pvp400, we are currently logging data for...
Replies
9
Views
2,784
Back
Top Bottom