SLC500 ASCII Buffer

MFF62

Member
Join Date
Jan 2011
Location
Massachusetts
Posts
1
I am taking a barcode scanner ASCII string into a SLC500 (CH0). Works well, but I am having a problem with about five barcodes out of one thousand. I find that only part of
the barcode makes it into the buffer.

Example:
I am using the ASCII read (ARD) instruction and am
looking for 21 characters (length of barcode string).
I might find that only 9 of the 21 characters make it
into the buffer. When the next barcode is coming into the buffer the ARD instruction executes after only 12 characters have been received because there are now 21 characters in the buffer. The string that receives the barcode data from the ARD now contains partial data from two different barcodes.

I should mention that a barcode network of 5 scanners is
sending there data to the SLC500 through the master scanner's
RS232 port. This means that the data strings can come one right after the other. My suspicion is that when a second barcode string is sent right after a first string I think the ASCII clear Buffers instruction is chopping off part of the second barcode.

Any thoughts.
 
If you are getting new Data faster than the PLC can process it, you need to use the Hardware Handshake Lines to control the flow of Data. Have a look at Chapter 10 of the SLC500 Instruction Reference for the ASCII Commands.

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1747-rm001_-en-p.pdf

I would be looking at the ARL Instruction to read the ASCII a line at a time. Is there a unique character for the ASCII End of Line you could use to detect new Bar Code Data with the ABL Instruction? There is also the ACB Instruction that tells you how many characters are in the Buffer. Last but not least, is the AHL Instruction, that manipulates the Hardware Handshake Lines, which might allow you to stop transmission from the Bar Code Scanner until you are ready for it.

If you can't get it to work, post your RSS file (Zip it first), and links to the Bar Code Manuals, and someone can have a look at it for you.

Stu....
 
Last edited:
It seems that for some reason the bar code is not read complete, I got the same problem here it was caused by bad printing of bar code on boxes or bad location of bar code. Anyway you have to clear the buffer everytime you have a reading this way next code wil have to be read it complete.
 

Similar Topics

I am using SLC500 how do you move ASCII (A10) into a string (ST9)? I tried cop FLL and no go Thanks
Replies
6
Views
2,212
Hello. I am trying to read in ascii data (from a welder) to a slc504 com port. I have looked at the ascii instruction set but I am not familiar...
Replies
3
Views
5,895
PLC5/SLC500 ASCII export only shows I/O tags which are configured (have description in them) When I click on the Data File I or O I can see other...
Replies
6
Views
7,589
E
In order to communicate with some 3rd party hardware, I need to build a ASCII-string based on HEX values. The basic problem is to have an...
Replies
16
Views
13,941
Firstly great website guys!! I am having difficulties copying an ascii string from an integer register to an ascii register. In our system, a...
Replies
6
Views
11,030
Back
Top Bottom