Lazetti
Lazetti

Reputation: 70

What are the low level protocols used by Micrologix PLCs?

I am building an application in C# which needs to talk to a Allen-Bradley Micrologix PLC. I know about the InGear driver to talk to it. I've used InGear in the past to talk to the other Allen-Bradley PLCs, and so I know that licensing with them can present problems to me.

What I want to know is: Are there any TCP or UDP based protocols for communicating directly with the Micrologix PLC? Obviously there must be something since InGear probably builds their protocol on some lower level protocol.

Upvotes: 3

Views: 1411

Answers (1)

Paul Campbell
Paul Campbell

Reputation: 91

The Micrologix series PLC's use PCCC (aka CSP) protocol which is the DF1 protocol carried over TCP. The most lucid freely available code was written years ago by Ron Gage. Allen Bradley has a document available that details the origianl DF1 protocol quite well and in combination with Ron Gage's code it is pretty easy to figure out. Other than initial handshaking, it is a very simple request/response protocol. This is the same protocol that the PLC-5 series (from the 1980's) and the SLC series (from the 1990's) uses, but it is slowly being deprecated over time.

The second protocol that it supports is Ethernet/IP which uses a packet protocol called "CIP" which can be transported over either UDP or TCP but on initial contact you have to use TCP. The protocol standard is "open" and is published by the ODVA. This is also the same protocol that Omron brand PLC's among others use. For this communication you will want to use unconnected messaging mode (request/response). I've had great success using the "cpppo" protocol stack in Python but I have no idea what will work in .NET.

The third protocol that this PLC series uses is Modbus/TCP or Modbus (serial format), depending on the PLC. It can act as a master or slave. Modbus is the simplest protocol to use. Full documentation for the protocol itself is available for free on the modbus.org web site. I have worked with the older models but not the 1400 so I can't specifically state which flavors of Modbus it will support. Because this protocol is supported by essentially every PLC brand on the market, there are countless software libraries supporting it. Any reasonably competent programmer can usually write one in about a day worth of work from scratch because it is so simple.

Upvotes: 3

Related Questions