# How to write VB program to interface with OMRON PLC

L

#### Lee Chin Sin

I am new with PLC, i just learn in myself. I am now able to control a simple application, but i am looking for the solution in how to communicate in between PLC (OMRON) and the PC by using Visual Basic 6 programming.

best regards,
lee

N

Omron has given few sample programs in their programming manuals which you can consulte.
You can visit omron on their site "http:///www.omronsupport.net":http:///www.omronsupport.net
Good luck.

S

#### Sanjay Sheth

You are probably going to need a ActiveX control to allow you to communicate between the PC and the PLC. Omron makes several packages ... the most
appropriate in this case will depend on the type of connection between the PC and the PLC (ethernet, controllerlink, devicenet, etc.) and the scope of the project (are you looking for a tool to design a full-blown HMI or just do a few
sends/receives/updates of values from the plc). The low-end road is using FINS Gateway or CX-Server Lite. A more capable (but also more expensive) road is to use the full CX-Supervisor/Server suite.

As the other poster mentioned, perusing "www.omronsupport.net":http://www.omronsupport.net will likely help you decide which of the solutions is appropriate for your case.

D

#### David Wooden

Omron has several ActiveX controls available, such as CX-Lite and Compolet, which will allowsimple direct connection to any Omron PLC. contact your Omron representative for more information.
If you want to invest the time, you can write your own Host link code
using the MSComm control. Go to the following:
"http://oeiwcsnts1.omron.com/PDFCatal.nsf/PDFLookupByUniqueID/B949645C6D00823386$":http://oeiwcsnts1.omron.com/PDFCatal.nsf/PDFLookupByUniqueID/B949645C6D00823386$
You will be able to download the Host Link manual in pdf form. This manual specifies the Omron Host Link protocol, which is the best protocol for serial use.

Best of luck,

David Wooden
Senior Software Engineer, Systems Integration
Automation and Enterprise Solutions Group
TAS Division of Omron Electronics LLC
Office: (847) 884-7034 Extension 432
Fax: (847) 884-9383
E-mail: [email protected]

R

#### Rick Hudson

Look at a third party OPC Server. There are several available. We have used the one offered by Software Toolbox ( "www.softwaretoolbox.com":http://www.softwaretoolbox.com )on several installations (both Ethernet and serial connections) and have been pleased.

There is some sample VB code included in the package.

You can download a free demo verison which runs for a two hour period and can then be restarted.

Thanks,

Rick Hudson

A

#### Andrew Mott

I have interfaced with OMRON PLC’s many of times. I use mscomms control version 6. Add this to your project, you’ll find it in project->components Microsoft comm Control 6. If not you will have to download this. You will also need a programming manual for the PLC (you can acquire this of the omron web site) that you are using so that you know the strings that you will send and receive.

It is then a matter of putting together a command string, sending it through the comms control and waiting for a response.

Its actually very easy once you get the hang of it and you don’t need any OMRON 3rd party software to interface with it

J

#### Jan

Hi Lee,
If you want a low budget solution, you can use C-Commands (Hostlink) to control the PLC directly via RS232 or a high speed cable through the peripheral port. Omron have done very good documentation for this. Check-out the Omron knowledge center where you kan find all documentation and manuals in PDF format -> "oeiweb.omron.com/oei/":http://oeiweb.omron.com/oei/ or you can contact me and I can provide you with the PDF files and some examples.

Best regards,
jan

D

#### David Wooden

"oeiweb.omron.com":http://oeiweb.omron.com . Search for W143, which is the first part of the manual number.

Sorry,::

David Wooden
Senior Software Engineer, Systems Integration
Automation and Enterprise Solutions Group
TAS Division of Omron Electronics LLC
Office: (847) 884-7034 Extension 432
Fax: (847) 884-9383
E-mail: [email protected]

E

#### ETX

Has anyone here had any experience/luck in communicating over ethernet in VB? If so, please send some example code.

Thanks!

E

#### Esmond Chun

Hi,

You may use the Fin Gateway software from Omron. You are able to communicate with the controller using Ethernet or Serial for monitoring and control.

Hope help.

Esmond

G

#### Giorgio

try with www.plclibrary.com if you use visual basic Net to communicate eith your Omron Plc (both ethernet and serial).