Monitoring I/O data from a PLC Using Visual Basic

F

Thread Starter

faidhizakwan

I use omron CP1E NA type, my CX-programmer version 9.2, using the omron cable rs232c. and i want to monitor input and output from PLC using visual basic 6.0. i want to collect input data from PC sent to PLC and output data from PLC sent to PC. can you help me with it?

Thanks
E-mail: [email protected]
 
D
I briefly reviewed the CX-programmer version 9.2 description and it mentions that the tool is for configuration purposes. Maybe a more in-depth look at the manual will reveal that it is possible to achieve your goal. If you want to approach this task via a different path you might want to try using OPC. MatrikonOPC has several free tools and trials you can look at to historize and read write to PLC.

Good luck..
 
J

James Ingraham

First question: Can you write a program to get data from a serial port using VB6? That's step one. If you can do that, then you can start looking at what the protocol looks like to get data out of the CP1E. I believe that reading from the serial port using VB6 has been discussed on the forum in the past, but that's a general problem that will have lots of examples you can find.

As for the CP1E itself, the User Manual Chapter 12 (at least in the 2009 version I found) covers Serial Communication. 12-6 describes what they call Host Link protocol. It also calls out a manual with more information, Communication Instructions Reference Manual (Catalog number W342). It's 267 pages long. However, I think most of that is reference material, and the information for actually writing the program is not too bad. Section 2-2 (again, a 2009 dated version) lists the request / response format, and even has sample code. The sample code is, unfortunately, in BASIC, as in old school BASIC, not Visual Basic, so it won't be very helpful.

User manual:
http://industrial.omron.com.br/uploads/arquivos/CP1E_2009_W480-E1-01_USERMANUAL.pdf

Communications manual
https://www.myomron.com/downloads/1.Manuals/PLCs/CPUs/W342-E1-14 CS_CJ_CP+HostLink FINS ReferenceManual.pdf

Good Luck,
James Ingraham
Sage Automation, Inc.
 
Top