[?]: Communication With Barcode Reader in Serial connection

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
reza662
Posts: 15
Joined: Wed Jan 26, 2011 1:24 pm

[?]: Communication With Barcode Reader in Serial connection

Post by reza662 » Sat Dec 29, 2012 2:09 pm

hello guys
i want to read a code by a bar-code reader in S7-400 PLC and for this, I need to use CP340 (RS232C Interface module) to read code information form barcode reader and use in PLC program but i don't know how?
I read on net that i must use FB2 & FB3 for reading from or writing to CP340 and where are they?
how do they work?
is there anything that i don't know yet?!
thanks (tyou)

Answers to FAQs
Faq & Info
Faq & Info
Posts: 173
Joined: Thu Oct 13, 2005 6:42 pm
Location: Frequently Asked Questions – Часто Задаваемые Вопросы

Re: [?]: Communication With Barcode Reader in Serial connect

Post by Answers to FAQs » Sat Dec 29, 2012 9:46 pm


reza662
Posts: 15
Joined: Wed Jan 26, 2011 1:24 pm

Re: [?]: Communication With Barcode Reader in Serial connect

Post by reza662 » Sun Dec 30, 2012 6:26 am

Thanks my Friend, it was really useful but i have two little questions!
first, what's the difference between CP340 And CP341 ?
and second every bar-code reader with RS232C Output like Data Logic with "DATA-PM8300-433" order number is compatible with CP340?
thank again (tyou)

Answers to FAQs
Faq & Info
Faq & Info
Posts: 173
Joined: Thu Oct 13, 2005 6:42 pm
Location: Frequently Asked Questions – Часто Задаваемые Вопросы

Re: [?]: Communication With Barcode Reader in Serial connect

Post by Answers to FAQs » Sun Dec 30, 2012 7:00 pm

siemens support wrote:How do you connect a SIMATIC HawkEye 4x(T) handheld code reading system to a serial CP340 or CP341
1 )
CP 340 wrote:Transmission rate, max. 19.2 kbit/s
Transmission rates, min. 2.4 kbit/s
Telegram length, max.
3964 (R) 1024 byte
ASCII 1024 byte
Transmission speed, RS232
with 3964 (R) protocol, max. 19.2 kbit/s
with ASCII protocol, max. 9.6 kbit/s
with printer driver, max., 9.6 kbit/s
CP 341 wrote:Transmission rate, max. 115.2 kbit/s
Transmission rates, min. 0.3 kbit/s
Telegram length, max.
3964 (R) 4096 byte
ASCII 4096 byte
RK 512 4096 byte
Transmission speed, RS232
with 3964 (R) protocol, max. 115.2 kbit/s
with ASCII protocol, max. 115.2 kbit/s
with printer driver, max., 115.2 kbit/s
with RK 512 protocol, max. 115.2 kbit/s

2 ) yes if your reader support one of protocol of CP.
check this too
http://support.automation.siemens.com/W ... n/26263724

reza662
Posts: 15
Joined: Wed Jan 26, 2011 1:24 pm

Reading a code from serial or USB port and send it to wincc

Post by reza662 » Tue Jan 15, 2013 6:59 am

Hi guys
I have a Question about reading data to wincc v7 I/O field, the Question is, I want to read a bar code from a car body by a serial or USB barcode reader and use it in PLC, the first way is using CP 340 or CP341 module but i don't want to use this way because i have a PC next to that station and I can read that code by PC very easily but the problem is how can I read data from a serial port or USB port directly and send this code to an I/O field in wincc v7?
P.S. I can exchange data between excel and wincc so if i could write in a cell of MS that's ok I can send it to an I/O field in wincc but it must repeat periodically not for one time (reading from that port and writing in that MS cell).
thanks for your help

Post Reply