SLC 5/05 and Barcode Scanners

POWER_PACKED

Member
Join Date
Apr 2004
Posts
48
Hi all – This is my second post and I think this is the right place to ask a rookie’s question.
I am pretty new to the PLC world, and especially its interaction via serial ports, My plc background is a 3 certificate’s courses and a 4 months working experience only, I would really appreciate simplicity. Thank you. :D
This is my Problem:
Need to automate a barcode placement and scanning process and to store barcode information in a string file and confirm that the correct bar code was read.

PLC Type: SLC 5/05
Scanner Type: SICK barcode scanner CLV295A1012

I have read through many posts regards similar questions; I still lack the understanding of channel settings (i.e. Channel 0,1,2,3) what do they mean and what does it do? And what doesn’t Channel 0 look at for communication from a hardware point of view. Currently we communicate with our hand held scanners via visual basic software. My background is in electrical engineering and programming is not my thing.
I don’t have any problems interacting with currently installed and setup systems and controls. Installing something new and from scratch is a new challenge for me.

Your help is highly appreciated.
Thank you banghead
 
Hi, Channel 1 will be your ethernet port and channel 0 will be the 9 pin port on your processor. Depending on what your barcode scanner can send, and I am presuming it will send an ASCII string then you need to set channel 1 to user mode. (from the channel config in the tree) That was the easy bit. You have to now write code to
a) grab what is in the buffer and to import it into the data tables
b) manipulate the data and check the data validity
The above is not rocket science but for a person starting out it can be quite daunting and hard. If this is an exercise you wish to do to teach yourself programming then good luck. If it is for a real world project then I would suggest to employ a good Rockwell Automation experienced integrator to set this up for you. It will save you a lot of time, heartache and if you add your costs into it a lot of money.
Regards Alan Case
 
Last edited:
Alan, isn't Channel 0 the 9 pin System/User port and 1 the Ethernet port on a 5/05?

Anyway, most, if not all, AB PLC's with standard serial ports can operate in either 'System' or 'User' Mode. Basically, you can consider the modes to be communications protocols (which, of course, especially for 'System' can have different actual protocols).

The 'System' Protocols are designed for reading and writing directly from/to the CPU memory, and are used for programming, online monitoring, and communications with other devices (mostly AB) that support the systme protocols (DH485, DF1 Full Dux, DF1 Half Dux...).

The 'User' Protocol is basically simple ASCII, and the communications parameters are mostly self explanitory. The important thing is that in USER mode, the serial port reading and writing is under the control of your PLC Program. It must issue commands to read and write the port. System mode is independent of your program.

Now, shove all that aside... To be honest, anytime I have to deal with a 'Generic Serial Device', such as your bar code scanner, I just pop a BASIC module in the rack. It's old, ugly line-numbered, non-structural basic, but it's still much better at handling strings, and doing checksum analysis for validation, and best, since it has it's own serial port, the CPU port is left free (and at default values for access by programming terminals).

High Level ASCII / Communications can indeed be done with only the SLC-500/05, but if you aren't comfortable or very knowledgable, then it will be much cheaper in the long run to do this interface with the basic module.

Good luck!
 
You are right, I stand corrected. I will edit my original post. Thanks and I do agree that a basic module is a better alternative.
Regards Alan
 
POWER_PACKED states that programming is not his thing. Considering this, if a BASIC module is used he will have to come to terms with:

1.
a. ladder logic
b. SLC string handling instructions

and

2.
a. M files
b. communication with the BASIC module
c. configuring the BASIC module
d. programming the BASIC module
e. making the BASIC module communicate with the scanner

In light of this, might it not be simpler, for this individual, to cut out the BASIC module and go direct through channel 0?

.02
 
Doug, I'd say no, it wouldn't be easier.

The Basic module has very good sample code for getting stuff in and out of the SLC CPU, and when trying to debug serial comms and protocols, the structured form of Basic is much easier to work with and troubleshoot than Ladder code.

Also, it's much easier to put in diagnostic tests (even just sanity-check 'Print' statements) in basic, than in ladder.

Also, if they already do interface to the scanners in Visual Basic, at least some structural code is there as a reference.

PLC's by themselves are pretty much stupid if you need to roll your own comms protocol; and often, error checking is omitted.
 
Thank you guys for your input on this. We are starting the integration process of an automated printing/scanning system here at our plant. "We currently place barcodes and scan them with human factor involved". From what I understood from your input, and which I see the easiest most flexible to do is basically have a stand alone serial input card attached to the PLC. My question is what do I need to be able to communicate correctly as far as the PLC side goes. Which channel should be looking at the mounted serial port. how can I extract the data to a string is ASCII?

I will keep updatin bawling g on the status for this project and will hopefully come up with a way to achieve this integration. Your input is highly appreciated.

Thank you :D
bawling
 
The basic card everyone is talking about is made by Allen Bradley and fits in a slot of the rack. It does not use the serial port on your processor, but communicates over the backplane via the M words. Part number 1746-Bas or 1747-Bas.
Go to the Allen Bradley site and download the manual for this card for the usage explanation. Regards Alan Case
 
Last edited:
rdrast said:
The Basic module has very good sample code for getting stuff in and out of the SLC CPU,

That being the case, I'd lean toward a module also, especially if there's any string manipulation involved.

rdrast said:
...and when trying to debug serial comms and protocols, the structured form of Basic is much easier to work with and troubleshoot than Ladder code.

For sure.

I was basing my post on previous, limited, experience with the GA-BASIC and 1771-DB modules. The word 'clunky' comes to mind in that respect. Maybe it's just that I'm not all that familiar with those modules.
 
here is an example of a scanning sortation conveyer. This will give you some idea of how extensive of a program your looking at for barcode scanners. The system used an accusort scanner thru channel 0
of an SLC 504
 
I'll probably get laughed at for suggesting this, but have you considered using an Opto22 based controller? Their string handling is excellent. We have mainly SLC 5/05's and Micrologix 1500's at the plant I work at, but 90% of our barcode handling equipment uses Opto22 LCM4 controllers connected to Sick clv-430s.
 

Similar Topics

I was wondering if anyone has worked with a sensopart visor scanner. I can see the sensopart in rslinks but I cant seem to get coms with slc 5/05...
Replies
14
Views
2,006
Im looking to buy a barcode scanner to communicate to a slc 5/03 or 5/04, threw serial port. Looking for a low price one i want to buy one on...
Replies
1
Views
2,950
Hi need help with an application that I working on and I'm having trouble in manipulation of a barcode which I need to extract data from...
Replies
16
Views
7,964
I have a slc 5/03 with a sick clv430 barcode scanner attached to the rs232 channel 0 port. I have used this setup throught the plant and works...
Replies
5
Views
4,947
I am a newbie at programming PLCs and I have just been given my first assignment. I have to obtain a barcode from an Accusort Model 22 scanner...
Replies
10
Views
6,267
Back
Top Bottom