CP340 example read serial port program

  • Thread starter jose luis bortolazzi
  • Start date
J

Thread Starter

jose luis bortolazzi

please,
i am looking for visual basic code to read serial port from cp 340 siemens.

is very dificult for me

my application must read the serial port and then print on the label printer

please help me

sorry my english is not very good..

jose luis
miramar
rep. argentina
 
H

Hakan Ozevin

You should think the other way around: You should write a program in VB AND in STEP 7 to establish a communication.
CP340 is not an automatic interface and so you get nothing from it unless you write programs for both sides.

For detailed information go to Siemens website www4.ad.siemens.de and search for "cp340 manual".
 
M

Michael R. Batchelor

Unless it has to do other things with the data, who not simply write the Siemens code to drive the label printer. Most label printers have a serial interface. the computer is just one more
link in the chain to get broken.

Michael R. Batchelor - Industrial Informatics, Inc.
 
A

Alejandro.Abril

Hello josè luis:

Right now I'm studying the CP340 from Siemens to comunicate an S7 with an S5. For the moment I have no result but I have just started. To configurate the card for the protocoll you need a Siemens software you can get free in internet. With this software you get two fb's one for read and another to write. If you want more information about these I can tell you all I know (it is not too much), write me an e-mail to [email protected] Better in Spanish

Alejandro Spain
 
D

Donald Pittendrigh

If you have any specific questions about this link I will be happy to help. The software needed for setting up the card is supplied free on CD with the CP340, it includes self explanatory programming examples, but not for an S5-S7 link. You must set up the RK512 procedure with P3964 protocol on both ends, the CP525 and the CP340, then the job is quite simple.

Regards
Donald P
 
A

ALEJANDRO.ABRIL

Thank you for your offer Donald.

For the moment I have no questions because I have just working in this link. I must use ASCII beteween CP340 and a CP521 for S5 because I'm triying to connect an existing S5 with a new S7 and the protocoll that is in use is ASCII. I don't know what you mean with set up the procedure rk512. Thank you for your help again
 
D

Donald Pittendrigh

Hi All

Sorry you are stuck with the CP521, that is a bad card, the CP544 would be better and the CP525 or 524 would also work, if you have an option,
get rid of the CP521, at least I hope it is a CP521SI if you have to use it.

Email me your address at donaldp(at)iasicc.co.za, I'll send you a screen dump of the CP340 setup.

Donald P
 
Top