pjkundert / cpppo

Communications Protocol Python Parser and Originator -- EtherNet/IP CIP
https://hardconsulting.com/products/6-cpppo-enip-api
Other
332 stars 109 forks source link

Probing for Tags #43

Open nisargpandyadattus opened 6 years ago

nisargpandyadattus commented 6 years ago

Hi, Is there any facility available like probing in which we can query for tags from the PLC directly to get to know which are the tags configured?

pjkundert commented 6 years ago

Nope. Like every other part of the protocol, we'd need to sniff the activity using Wireshark, and then reverse-engineer the protocol elements used. Not documented, in any of the thousands of pages of documentation that I've read.

kyle-github commented 6 years ago

It turns out that AB does document this. In their own "special" way. I got this from a user of my library and I thought I would pass along the joy for the season:

Logix5000 Data Access Programming Manual

Have fun. I love that the tag instance numbers come back in 32-bit quantities, but you can only use 16-bit instance IDs when requesting the next batch.

kyle-github commented 6 years ago

Attribute 7 gives the size of one element and attribute 8 gives the array dimensions (all 3 at once each as a u32).

pjkundert commented 6 years ago

Thanks for that! I'll have a look. Pull requests accepted!!