Industrial Ethernet/IP or CIP communication to an Allen Bradley SLC
Shane M
Posts: 58
I need to talk to an Allen Bradley SLC via Ethernet IP to read registers.
I have the pink internet module that will communicate via UDP.
I understand I need to communicate via port 2222 in UDP.· However I can't find out any more.
I may be wrong to assume the PINK would do it.· Though I'm pretty sure it will based on my reading so far.
Does anyone have experience with this.· I would pay for your time if I could get some sample code started.· I have an SLC to test with.
Thanks in advance.· Shane
I have the pink internet module that will communicate via UDP.
I understand I need to communicate via port 2222 in UDP.· However I can't find out any more.
I may be wrong to assume the PINK would do it.· Though I'm pretty sure it will based on my reading so far.
Does anyone have experience with this.· I would pay for your time if I could get some sample code started.· I have an SLC to test with.
Thanks in advance.· Shane
Comments
If you're going to use a Stamp with the PINK, post any further messages to the Stamp forum. If you're planning to use a Propeller, continue with this thread.
Do you have the Allen Bradley SLC documentation that describes the UDP messages needed and the responses?
If you are going to use a Propeller, then the FullDuplexSerial driver is the usual way to do serial I/O. There is an Extended FullDuplexSerial object in the Object Exchange that can help you handle strings and numeric data received from the PINK.
I would do more information gathering before nailing down hardware. Do you have a working connection to the SLC now?(just what is an SLC anyway?)
Would it be possible to put a hub on that connection and use something like Ethereal on linux to start grabbing packets.
Are there any tight timing constraints. Is all communication ack'd at the application layer?
As far as experience with ethernet goes, do a search for Harrison. He has written an IP stack for the propeller that uses a less expensive solution(enc28j60) than the pink module.
http://harrisonpham.com/dp/proptcp
For hardware, check out:
http://ucontroller.com/documentation/PropNICDoc.html
and
http://shop.ebay.com/i.html?_nkw=enc28j60&_sacat=0&_trksid=p3286.m270.l1313&_odkw=enc28j6o&_osacat=0
I have nothing against the PINK, but I haven't read much about it and it is kind of pricey and seems like overkill for the application you are talking about.
I hope this helps,
Doug
Post Edited (hinv) : 9/5/2009 5:18:26 AM GMT
@Shane, I do not know the PINK module and haven't got time to read its documentation. It is some time now that I am testing the TIBBO platform. For testing/development pourposes I have taken the EM1000 because of the storage (1MB) and IOs. The smallest one is EM203(64KB). It comes preprogrammed as a serial device server but you can change the firmware and obtain the full TIOS platform (programmable in basic). This way you can handle the communication with it and exchange only the needed data with the prop. It depends on your (prop) application requirements, if you want to handle the tcp/ip stack by prop or not.
With the EM1000 I have never used all the program storage and when I have some spare time I want try to boot the prop from it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates)
Doug
Etherent/IP is a difficult application layer to implement. I would strip down the goal to be able to transfer only N files or maybe F files too but you can get by with just reading and writing N files. To read and write B, I, and O files you will need to COP the data to and from the N files.
I see a few problems.
The Ethernet/IP protocol isn't always 32 bit aligned. There will be a lot of data shuffling to access bytes and words. I have implemented DF1 on a DSP that only has DINTs and it was painful to access the bytes within the DINTs. It requires a lot of shifting and masking.
2. Even a minimal Ethernet/IP stack will be around 10KB above the TCP/IP stack. That is just for the code. It may be much bigger because 32 bit controllers often have bigger code sizes than 16 bit computers. Especially when they can't manipulate bytes within a COG.
3. The memory required for buffers and for each connection will eat up too much of the available ram. If you limit the transfers so that only one transfer can be in progress at one time then you may have a chance. You will also have to limit the size of a TCP/IP transfer to sizes where the packets will not fragment.
4. The propeller chip is much better at replacing the PLC itself. Just think about it. Scan times in the 100 microsecond range. I don't think the Propeller chip is a good choice for the Ethernet. I would consider using SPI to talk a more Ethernet friendly micro controller and use the propeller chip(s) to replace the PLC and do the industrial I/O.
Their communication modules are overly expensive and as I have found out over the 26+ years dealing with them they no longer are the high quality solution. When Rockwell purchased them the strong AB brand was not treated well
If I were ever to be appointed to head the AB/Rockwell software operations the first thing I would do is start hiring replacements for everyone except those who designed the ControlLogix series (minus the communication of course).
I would be very interested to see what you end up with.
So far all comments are helpful.
Peter has encouraged me because I ONLY need to read N registers (integers). All I need to do is read that value. Not write. Not COP (I believe is the object oriented protocol). Nothing else.
And btw I agree 100% on Allen Bradleys approach and current posture.
More info would be appreciated if this narrows it down.
Also as a side note. I already communicate to the plc via rs232. However newer slc/plc units don't have serial ports. For once I'm just trying to plan ahead. [noparse]:)[/noparse].
Shane
I'm trying to reduce this to the most basic components.· If I can connect via UDP port 2222 and I have the SLC address.· I'm thinking I just need to know what characters to SEND.· Then figure out what to do with what I get back.
Many of the protocol charts I read keep comparing this to SMTP, POP3, and other UDP protocols.· They all work on the same principal.· So I am looking for those final keys to the puzzle.
Shane
It also says the protocol standard is PCCC.· http://www.ctiplcio.com/manual/abeth.htm· So far this is the closest I have to an answer.· I'm still researching right now.
Thanks!
Erik, on AB Drives (something I have dealt with in depth) you also have to be very careful of the version of the drive. For example a PowerFlex 70 with Enhanced Control and Standard Control
AB priced "Enhanced Control" lower to encourage people to buy this and it did have additional features. HOWEVER and it is a big HOWEVER, if you have this drive on a network originally configured for "Standard Control" (which had a mix of 16 and 32 bit words) the communications would get all screwed up attempting to communicate with an Enhanced Control drive which had all 32 bit words.
I had a customer who, in an attempt to save money, bought a slew of Enhanced Control drives for backup (without consulting me) and of course they needed one late one Sunday and could not get their SCADA system to communicate. They were not happy.
Shane
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shane Merem
www.websiteforge.com
www.magnusoft.com
·
dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shane Merem
www.websiteforge.com
www.magnusoft.com
·