Info to create your own PLC driver


Thread Starter


Does anyone know either how to make a PLC driver or where to find specific information on how to create your own PLC driver to communicate with a VB program?

Can you communicate with VB directly to the PLC or do you need some other language to do that?

Also, does anyone have any suggestions on where I could get an old (CHEAP) PLC to mess around with at home? (i'm a student)

There is a good book called "Home Automation Basics" by Leonik sold on Amazon that describes how to use the vb object MSCOMM to communicate
directly with an AB Plc

Jerry Hayden

Yes, you can write a driver with VB or pretty much any language. I have done it with VB, C, and even MS Basic. I have done this for
data acquisition systems. I found the information about the protocol from the manufacture manuals in most cases on-line.
Fairly cheap PLC'c can be found on Ebay for under $100 like the Allen-Bradley Micro-Logix bricks.

Robert Trask, PE

How about free. Goto "" and download the TwinCAT software. It will run for 30 days and you can reinstall as much as you want. You can turn any NT based (including 2000) computer into a PLC.

Robert Trask, PE
Mind Span eSciences
Wilmington, NC USA

>Can you communicate with VB directly to the PLC or do you need some other
>language to do that?

Directly with VB6 pro or with an add in comm driver.

>Also, does anyone have any suggestions on where I could get an old
>(CHEAP) PLC to mess around with at home? (i'm a student)


Bill Sturm

David Wooden

Hello Dave:

Each PLC has its own way of doing things, so the driver you need depends on the PLC you use. In the case of Omron PLCs, they use a serial protocol
called Host Link. You can download manuals from the Omron website at "": from the Knowledge Base in the Support section. The lower end of the Omron PLC range, CPM1, is not very expensive ( I don't know the price; I'm a software guy!) and supports the Host Link protocol through a serial port adapter. Omron's serial ports have the signal ground
on pin 9 instead of 5, so you will need to make a cable. The link below will take you to the CPM1A manual:$File/M11W228E17.pdf?OpenElement ::


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]
THere is a company called Automated Solutions that has all the drivers for AB and others. They also give you a VB demo that I have found very useful to cut apart and use in creating my own applications. You will find them on the intranet.

For a cheap PLC goto EBAY you can usually piece one together for under $100.oo.

Curt Wuollet

Hi Dave

Upon re-reading, I wonder if it wouldn't be easiest to get a PLC that supports OPC or something already? Adding this functionality to one that doesn't is improbable.


You want the DF1 manual from the AB website and the MODBUS protocol from the Modicon website. Omron has the description of the Hostlink protocol in some of its manuals.

You might also try the following site which has some ActiveX implemented plug in protocols available (for a low cost).


Mark Hutton
Software Engineer
YAC # 07092 032237
e-mail:[email protected]
I'm sorry, it sounded like he wanted to create a new driver on the PLC end to me. Yes if the data are associated with a well documented proto you can write to that. At least for serial protos you shouldn't really need a driver.



actually its a very simple operation to get information from a PLC to Visual Basic. Visual Basic simply accesses a COM/ActiveX object to do the read/write.

These objects can be written in C++ or Visual Basic or your language of choice to talk to the serial. Documentation for almost all PLC serial protocols is freely available (unlike the ethernet protocols, which are harder to get a hold of).

If you want to get the job done right now, there are people who will happily sell you components for a reasonable fee that easily install and provide all the communications. A few mouse clicks and a bit of typing, and you can be on your way. It's that easy -- really.

Alex Pavloff
Software Engineer
Eason Technology