How ottowayi/pycomm3 works
Main Components
a) Core Components:
• CIP Driver (Base Layer)
• LogixDriver (PLC-specific Layer)
• SLCDriver (Legacy Layer)
• Packet Handling System
• Data Type System
b) External Interfaces:
• Ethernet/IP Network Interface
• PLC Devices (ControlLogix, CompactLogix, Micro800, SLC500)
[Network Layer]
• ↑↓
[Socket Layer]
• ↑↓
[CIP Protocol Layer]
• ↑↓
[Driver Layer]
• ↑↓
[Client Application]
Component Details
a) Network Layer:
• Ethernet/IP connection to PLCs
• Supported PLC types as separate components
b) Socket Layer (pycomm3/socket_.py):
• Handles raw communication
• TCP/IP socket management
c) CIP Protocol Layer:
• Packet handling (pycomm3/packets/)
• CIP services (pycomm3/cip/)
• Object library and data types
d) Driver Layer:
• Three drivers with their relationships
• Inheritance from CIPDriver
• Main services for each driver
Important Details
a) Driver Capabilities:
• CIPDriver: Show generic messaging, device discovery
• LogixDriver: Show tag read/write, time sync
• SLCDriver: Show data file operations
b) Data Flow:
• Bidirectional communication paths
• Packet transformation stages
• Fragmentation handling points
Implementation Notes
• Use rectangles for modules/components
• Use diamonds for decision points
• Notes for key features like:
• Multiple Service Packet handling
• Tag list uploading
• Structure reading/writing
• Automatic type conversion