Help - Search - Members - Calendar
Full Version: 1761-NET-ENI Packet Level Protocol
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
fed007
Hi Guys,

I am an Instrument Tech turned Object Oriented Enterprise Java Architect (what a mouthful).

I have been writing custom web applications for years now and have taken on an automation project that requires me to communicate to a micrologix PLC through TCP/IP.

I will be using Java.

I am seeking information and samples if possible that show a basic request for data through TCP/IP for this device a MicroLogix 1200. The app I am building is supervisory only.

I have downloaded the http://www.odva.org Ethernet/IP specification and understand the object models however the document stops short at PLC devices. Furthermore, AB doesn't seem to provide this info linked to the product.

I fully expect I can address the system and connect to its port, however I am struggling to find documentation that explicitly tells me what kind of packets I need to fabricate and send to the PLC.

Any help would be appreciated.

Thanks in advance
Chris Elston
I hope Ken Roach replies, but I seem to remember running into AB Ethernet is not quite the same as "TCP/IP" as you would expect. I've had problems with AB Ethernet not working very well talking with native "ethernet" devices, but I was using a PLC-5 at the time. Maybe the protocol is a "TRUE" TCP/IP using the NET-ENI device. Just my two cents.
fed007
It is a true implementation of a protocol over TCP/IP, just like http,ftp,smtp etc...

Requests and Responses occur through specially fabricated packets, the question is where can we find the documentation specific to the AB PLC. Micrologix or for that matter all of their ethernet/IP enabled devices?
Chris Morris
I have a similar project underway. According to my tech support guy the 1761-NET-ENI only speaks DF-1, a documented protocol. There are of course generic serial device servers but you would have to reverse engineer the protocol to be able to probe data in the PLC. A lot of this work has been done for other AB PLC's by Ron Gage. The solution I came to was to use RSView and MySQL.
fed007
http://www.automation.rockwell.com/enabled/guides.html

The above link tells me most of what I need to know.

I am still concerned that the PLC profile was left out of the Ethernet/IP specification...
fed007
OK moving on in this topic we have a related question,

(Ken Roach if your reading, I have seen Misc posts which would tell me you may be able to help. NET ENI's and Micros. right up your alley)

I have read the specification to understand that the ENI device is really a DF-1 wrapper, however no where have I read that EIP/PCCC can not be used to some extent with the Micrologix,

in fact a compatibility charts labels it as such to support it.

So my latest attempt involves communicating with the PLC on its ethernet IP socket
which 44818 or xAF12 (for you hex junkies). I am sending a packet of data and getting a response however the response is stating a 1 in the status byte which saysit doesn't understand my command to register a session

I suspect my request is wrong somehow... take a look

x65 is a request to register a session where the 4 represents the field size at 4 bytes for the command

Request (fixed at 24 bytes)
registerPacket[]={6,5,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};


Response from Input Stream
byte value: 6
byte value: 5
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 4
byte value: 1 (<- this means sender issued an invalid or unsupported command)
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0
byte value: 0

Has anyone registered a session with a MicroLogix via Ethernet/IP? is my request buffer correct?

looking forward to a response...

fed007
fed007
OK a hex value needed conversion


byte registerPacket[]= {101,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

x65 =101 HOWEVER now I get 105 as a status error code on the reply!

"Unsupported encapsulation protocol version"

any clues?
fed007
posting to this forum is helping me solve my problems!

I just answered my own question, once again. Make sure the version ID is supplied and the extra bytes for the data portion.

(Once I am done I will have an easy to use API on the market) contact me at fed007 at hotmail dot com

The rest should fall in place ;)

Till my next question...


fed007
Guest_Peter Nachtwey
Writing a Ethernet/IP application layer is quite a challenge. It will take months to do it right. I know because we have done it and our product is Ethernet/IP certified. I would look at Rog Gage's ABEL and CELL libraries which are written in C for Linux but it should give a lot of clues about how to approach writting these application layers.

Sorry, I don't have an NET-ENI device to try your experiment.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.