Siemens CP340 RS232C with barcode scanner

coa

Member
Join Date
Jun 2004
Posts
96
Hi All,
I have application to read data from barcode scanner to S7 PLC through CP340 RS232C. I looked at sample program from Siemens but looks like no info. about barcode application. I think CP340 must be able to work with barcode because it has ASCII communication.
If you have done this kind of application, please guide me how to setup for this.

Thanks for all help.
 
You need to add a FB2 Receive block and if you wish a FB3 Send Block which is not required for a barcode reader.

Fill out all your inputs and outputs of the block and it will eventually work. The chraracters that you receive will be ASCII so you will have to convert them to text. It is cumbersome but is a rock solid Serial unit. PM me if you would like more info.

Giz
 
Today I've tested CP340 with barcode scanner. I used FB2 (P_RCV) and setup CP340 in hardware configuration to ASCII mode. Everything is working good. I can get barcode data into datablock which has array of char data type.

Thanks for your help "Giz"
 
I am glad that it worked. The function blocks can be confusing and you have to do a lot of math if you want Integer Values but once it is set up the Card is rock solid. If your barcode scanner allows Serial inputs to trigger scans you can use the FB3 block to trigger the scan from your PLC.

Giz.
 
Hello

coa said:
Today I've tested CP340 with barcode scanner. I used FB2 (P_RCV) and setup CP340 in hardware configuration to ASCII mode. Everything is working good. I can get barcode data into datablock which has array of char data type.

Thanks for your help "Giz"

I am trying to read barcode datas via CP340 module. But I couldnt achieve yet. I am using FB2 as you did. Could you send me your FB2 in your programme?
 
Make sure your baud rates match and that you have a cross over RS232 cable. The block will work what problems are you having.


Giz
 

Similar Topics

Hello! Have anyone in here used the Siemens CP340 RS232C communication processor (6ES7 340-1AH01-0AE0)? I'm trying to figure out how to use this...
Replies
12
Views
42,016
Hi, been looking everywhere for this info but cant find it. Does anyone know if the CP340 RS232 card supplies 5v to Pin 9. Thanks
Replies
2
Views
1,406
Hello, We have a Sartorius CP scale connected via RS232 to the PLC. All was working well but when the scale was replaced with a newer version...
Replies
8
Views
2,534
I am trying to only receive data from a device via serial communication. I can read the data through my com port on my computer so I know that it...
Replies
4
Views
1,660
All, one of our industrial printers we do represent is communicating with a Siemens CP340 RS232c PLC through a comms cable which is only using...
Replies
0
Views
1,328
Back
Top Bottom