Barcode Scanner code with CPU-317

sc191289

Member
Join Date
Apr 2013
Location
Woking
Posts
1
Hello,

I'm setting up a PLC rig at work which consists of a number of different hardware, I/O, AS-i and now scanners.

I have connected a Datalogic CBX500 box with external Datalogic scanner head via profibus to a CPU-317. All the hardware configuration is fine and set up on Simatic Manager however I would like help with the code within Simatic. I want to be able to gather the information scanned from barcodes into a Data Block? I have also included two photocells, one to trigger the scanner to read and one addressed through the AS-i to transfer data, not sure if i can get away with not having these?

Any help would be greatly appreciated.

Thanks

SC
 
Any Update?

Did you ever get anywhere with this?
I ask because I now have a similar challenge and the support from the suppliers is virtually non existent when it comes to the plc side.

Rgds,

Barry
 
Normally the barcode data is received in ASCII format, you should have some sort of valid data signal/handshake.

When the valid data becomes true, on a one shot, transfer the ASCII words into a DB, you can then do whatever you need from that. It depends on what the data is, in my experience it we converted the ASCII to numbers, as the barcodes were numbers, a set length.
 
I haven't done much with barcode scanners before other than teach them to verify a code and using digital inputs and outputs. Do they all generally output data in ASCII format? The barcodes I am expecting to read contain brackets, letters & numbers. I was hoping for string data to appear in my DB when I get it working. This could be a nightmare to convert from ASCII or is there a standard Siemens block to do this?

Regards,

Barry
 
your string will be a string of ASCII characters. These ASCII characters can include letters and brackets etc.

Siemens do have blocks for handling strings.
 
If the data from the scanners is in ASCII format and I copy it to a datablock in my plc made up of the data type Character are you saying it will be displayed in my datablock as the number, letter or bracket I am expecting?

For instance if I am reading a barcode of (20)12345 and I view the data in my datablock as characters without any conversion I will be able to read each of those characters individually or as 1 complete string.

Regards,
Barry
 

Similar Topics

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,551
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,968
Hello Everyone. I am working on a project where I need to scan in 2 Barcodes to populate 2 different tags. A glue Batch and a product serial...
Replies
12
Views
3,093
hi guys, I have to write a program to trigger and receive data from a barcode reader via an RS485 module plugged on Wago PFC 200. Does anyone know...
Replies
6
Views
2,728
I have a barcode scanner reading bin labels and handing a string to an Laser Guided vehicle to place the bin in its appropriate location based on...
Replies
1
Views
1,261
Back
Top Bottom