Search code examples
python-2.7plcindustrial

Translating PLC FileAddress/StartAddress to EtherNet/IP @<class>/<instance>/<attribute>


We're evaluating cpppo to talk to various Rockwell Automation PLCs. We have address ranges in form "N25:00" (N = integer, file number 25, file offset 0), but EtherNet/IP seems to want @<class>/<instance>/<attribute>.

How do you translate from one to the other?

If tags were defined in these PLCs, is there a way to get a list of them, or information about them? We have no ability to change the PLCs, and usually can't see the ladder logic/configuration in them.

cpppo's list_identity, list_interfaces, and list_services all work, but don't return anything that seems to translate:

List Services  0 from ('10.91.xxx.yyy', 44818): {
    "count": 1,
    "item[0].communications_service.capability": 32,
    "item[0].communications_service.service_name": "Communications",
    "item[0].communications_service.version": 1,
    "item[0].length": 20,
    "item[0].type_id": 256
}

List Interfaces  0 from ('10.91.xxx.yyy', 44818): {
    "count": 0
}

Solution

  • You left out an important detail info. What kind of Rockwell PLC? The N25:00 address could be the older PLC type like SLC5, PLC5 series. On the other hand Ethernet/IP is used in the newer tag-based PLC like Compactlogix, ControlLogix PLC.

    btw, there's PyLogix that will talk to the newer type PLC.