PDA

View Full Version : Barcode scanner question


pc_geek
December 12th, 2007, 05:19 PM
Hi all,
Today at work I was approched with the question "how difficult would it be to scan barcodes into existing plc system"? And of course I didn't have an answer because it's something I've never done before.

The current system uses 2 Sick clv-450 scanners which scan and send the data to a horner barcode system which sends the data to a pc which sends the data along with the weight from a weightronix scale (which is also attached to the pc)up to an oracle server which marries the weight and the barcode together then sends the "data received" signal back down to the pc which at that point the pc sends the print command to a paragon label printer which prints and applies the barcode label with the weight. The conveyor system that the skids travel on is controlled by 2 allen-bradley 5/05 processors which message skid locations to each other over ethernet.
(Sorry to seem so long drawn out on the explanation).

As you see from my explanation of the barcode system there is alot of equipment for a couple of tasks.
I never triggered scanners or aquired barcodes with a plc. What logic would I use to trigger the scanners through the serial port of the plc and how would this be stored.
Thank you in advance for assistance

PeterW
December 12th, 2007, 05:35 PM
I've always used Sick scanners, these usually have a controller into which a digital signal from its own PEC triggers it to read and also they have their own encoder to time the read result.

The PLC also has an encoder to track the product and reads the same PEC that triggers the scan read, then expects the read result when the object read has moved into a position where the scanner sends the result.


EDIT, the result would be sent either by serial comms or Profibus. There's usually a heartbeat as well.

gosenbach
December 12th, 2007, 05:38 PM
I have never used a bar code scanner directly with a PLC either but I have done a lot of work with barcode scanners and Lab View and I would imagine it would be similar.

Most scanner can be triggered via serial by sending an ascii command. I always set up the ones I used with something simple. The entire string was '<#>'. (The scanner interpripted anything inside < > as a command). I had some code that basically lisened to the serial port for an incoming code. Every time the scanner read a code it would end with a carriage return. After sending the command to scan, read the port for data until you see a CR, and store that in a DINT.

Most PLCs have some sort of ascii read and write commands that you should be able to use.

Greg

Doug-P
December 13th, 2007, 04:12 AM
Set up properly you don't have to 'do' anything to the scanner. We have Accusort scanners of several types and all have multiple triggering methods. Mostly they trigger by photocell. A conveyance of some sort blocks a PE and the scanner starts looking for a valid barcode. When the PE gets unblocked, the scanner sends whatever it read during the active time. This way 'no reads' are possible. A couple are set to self-trigger. This means that the scanner sends nothing until it gets a good read on a valid barcode. This type will allow unread items to pass without a response. There is also the possiblity of triggering the scanner by command through a serial port.

At the PLC end an ARD instruction configured to monitor the necessary port is executed every scan. When the scanner deposits characters in the PLC's channel buffer, the logic is triggered to massage the data and either store it in a file or operate some sort of divert mechanism.

The 5/05 does have a basic set of string manipulation instructions (they all start with 'A'). While more clunky than what's available in higher level languages, correctly applied, you can get done about anything you'd need done with strings.

If each PLC only has to deal with one scanner it's not a terribly big deal to get the data into a String file location to do what needs done. For multiple scanners BASIC modules are commonly used.

I'm sure someone will be along soon with even more information.

Norml
December 13th, 2007, 06:35 AM
Check this out

http://www.rtaautomation.com/ethernetip/435nba/#application

brucechase
December 13th, 2007, 06:42 AM
I have many PLCs (SLC 504 and 505s)that read directly from the scanner. Scanners I have used are Accusort - Adaptascan, AV4000 and the OMNI, and CIMatrix. Many of the scanners go into a BASIC module, mainly because I have 2 scanners in series to greatly increase the read rate. On some of the others, I have gone into the serial port of the SLC. I also have a system with 9 barcode readers going into 1 SLC 504 via Devicenet - this prevented me from having to put in 5 BASIC modules (2 scanners per module). On the new AV4000, that has a PC on it to decode the barcode and that sends the barcode to a 505 via ethernet. All of the barcode readers have photoeyes that tell when the product is enter the inzone and some have a photoeye telling when it is exiting the inzone and some use an encode to tell when the belt has traveled far enough to decode. The big difference is using 2 photoeyes, there can only be one barcode in the zone at a time, and on the encoder, I can set it up so it transmits after a certain amount of travel.

I can help with specific if you are interested - although I am no expert at all. If you want to see some code in the plc and/or basic module, let me know.

PLC GURU
December 13th, 2007, 07:01 AM
We are actually using those same scanners and a quintronics weight scale.
there are photo eyes attached the scanner that trigger the read. then there is another PE slightly downstream that triggers the sendinging of the barcode data and weigh scale data to a multiplexer which send it through serial comms to a PLC-5 where the data is broken up into weight and barcode and sent to a warehouse management system(server) that sends back a desination to the PLC. Shouldn't be too difficult

PeterW
December 13th, 2007, 07:14 AM
We are actually using those same scanners and a quintronics weight scale.
there are photo eyes attached the scanner that trigger the read. then there is another PE slightly downstream that triggers the sendinging of the barcode data and weigh scale data to a multiplexer which send it through serial comms to a PLC-5 where the data is broken up into weight and barcode and sent to a warehouse management system(server) that sends back a desination to the PLC. Shouldn't be too difficult


OK...... I can go one better...... we had a Sick/Avery combination thet sent BarCode, Weight and ...... Volume (height/width/depth).......

beat that :whistle:

PLC GURU
December 13th, 2007, 04:50 PM
OK...... I can go one better...... we had a Sick/Avery combination thet sent BarCode, Weight and ...... Volume (height/width/depth).......

beat that :whistle:
you 1 upped me my friend! although maybe they should calc volume. then they'd be able to pack the containers more efficently. right now we just do length so we know how many shoes to divert on the sorter.

pc_geek
January 2nd, 2008, 05:00 PM
Hi all, and Happy New Year!


I want to thank all of you who responded back with suggestions on how to improve this system. It has been put on the back-burner for now, but we are favoring going with a device-net scanner system and using RSView to send it to the printer. A rep from the scale company was in and told us that this is the way he has seen many systems set up. The upgrade will probably occur sometime this spring. I'll keep you posted as to how it comes out.

Thanks again

mracer
January 2nd, 2008, 06:33 PM
I am using the RTA unit to send bar code data to a ML1100.
From the ML1000 the Metric's system logs it with the machine run times for OEE.
It was easy to set up(even for me) and seems to work vary well.

pc_geek
January 3rd, 2008, 06:21 PM
Thanks mracer

rowens
January 4th, 2008, 10:19 AM
I would like to say thank you for all of the response on this thread. Although I did not start it, it is a project we have been discussing the addition of on our conveyor lines to help automate the routes to the dock doors. This information is very helpful since I have never included barcodes in a project.

thanks again

JERA
January 4th, 2008, 10:31 AM
You can use the Sick CDM 420-0001 (http://www.mysick.com/eCat.aspx?go=DataSheet&Cat=Row&At=Fa&Cult=English&Category=Produktfinder&ProductID=22600) or CDM 420-0004 (http://www.mysick.com/eCat.aspx?go=DataSheet&Cat=Row&At=Fa&Cult=English&Category=Produktfinder&ProductID=26337) to connect the CLV-450 scanner to DeviceNet or Profibus. In this way you get the data direct from the scanners to the PLC without using a PC.

We have used the CMD system on Profibus for some projects, without problems.

jdonoj
December 27th, 2011, 12:02 PM
Would you still have some sample code for the basic module to the slc I would be interested in seeing it. Thanks

brucechase
December 28th, 2011, 08:02 AM
Would you still have some sample code for the basic module to the slc I would be interested in seeing it. Thanks


What code do you want? Do you want the basic code that resides in the basic module or do you want code in the SLC that reads the basic module?

Brijm
December 28th, 2011, 09:33 AM
I was asked to make a demo, to read and totalize barcodes, for products merging into a conveyor for final packaging. We used an ascii/ethernet barcode scanners, into a red lion data station plus. Then we only had to update the register numbers in the SLC. Production data was then to be shown on a plant marquee. It was very easy.

We didn't get the project, as the plant was shut down (bought out and downsized); but I never liked handling strings in a SLC PLC. Perhaps because I haven't done much.

brucechase
December 28th, 2011, 10:49 AM
....... but I never liked handling strings in a SLC PLC. Perhaps because I haven't done much.


A trick I used to do for handling strings is to just convert them to a integer (with the copy command) and then handle the data that way.

On my previous systems, I would track 10-15 products with barcodes and data down conveyor lines and through machines. It was just a simple moving of data from one N register block to another.

denz24
October 22nd, 2015, 06:05 AM
I know it's long time ago but could you please show me the code @brucechase ?
On the one hand the code on the basic module and on the other the code on the slc.

jdonoj
October 23rd, 2015, 06:57 AM
you need to send an email address I can't attach any files to this site (all to big) I can send you the PLC code for prosoft but, I believe you can go to their web site and download sample code for free. I also have a pretty good manual for prosoft.

denz24
October 23rd, 2015, 07:44 AM
What do you mean with prosoft?