{"id":24351,"library":"pylogix","title":"pylogix","description":"pylogix is a Python library for reading and writing Rockwell Automation Logix-based PLCs (ControlLogix, CompactLogix, MicroLogix, etc.) over Ethernet/IP. Current version is 1.1.5, released occasionally with bug fixes and minor enhancements.","status":"active","version":"1.1.5","language":"python","source_language":"en","source_url":"https://github.com/dmroeder/pylogix","tags":["plc","rockwell","automation","ethernet/ip","logix"],"install":[{"cmd":"pip install pylogix","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Correct import for the PLC class.","symbol":"PLC","correct":"from pylogix import PLC"}],"quickstart":{"code":"from pylogix import PLC\n\nwith PLC() as comm:\n    comm.IPAddress = '192.168.1.10'\n    ret = comm.Read('MyTag')\n    if ret.Value is not None:\n        print(ret.Value)","lang":"python","description":"Basic read operation: initialize PLC, set IP, read a tag, and print the value."},"warnings":[{"fix":"Set comm.IPAddress immediately before calling Read/Write, or use 'with PLC() as comm:' which resets on exit.","message":"The PLC object modifies its internal state (like IPAddress) after each read/write call. Always set IPAddress before each transaction or use a context manager.","severity":"gotcha","affected_versions":"all"},{"fix":"Verify tag name in the PLC’s tag database; use the full path including program scope if needed.","message":"Tag names must be exact and case-sensitive. Rockwell PLCs often require the full path (e.g., 'Program:MainProgram.MyTag').","severity":"gotcha","affected_versions":"all"},{"fix":"Update to use 'from pylogix import PLC' and instantiate PLC() object, then call .Read() and .Write().","message":"Version 0.7.0 changed the API: 'read' and 'write' functions were replaced by methods on the PLC object. Old code using 'from pylogix import read' breaks.","severity":"breaking","affected_versions":"<0.7.0"}],"env_vars":null,"search_vec":"'1.1.5':26 'autom':12,37 'base':15 'bug':30 'compactlogix':18 'controllogix':17 'current':23 'enhanc':34 'etc':20 'ethernet/ip':22,38 'fix':31 'librari':6 'logix':14,39 'logix-bas':13 'micrologix':19 'minor':33 'occasion':28 'plc':35 'plcs':16 'pylogix':1,2 'python':5 'read':8 'releas':27 'rockwel':11,36 'version':24 'write':10","created_at":"2026-05-01T08:12:36.784865+00:00","updated_at":"2026-05-01T08:12:36.784865+00:00","problems":[{"fix":"Use 'from pylogix import PLC' and then call plc.Read() instead.","cause":"Using old import 'from pylogix import read' after upgrading to version >=0.7.0.","error":"AttributeError: module 'pylogix' has no attribute 'read'"},{"fix":"Verify IP address, ensure PLC is on the same subnet, and check firewall settings. If using a ControlLogix, set comm.ProcessorSlot if not 0.","cause":"Incorrect IP address, PLC not reachable, or wrong CIP path.","error":"pylogix.exceptions.ConnectionError: Unable to connect to the PLC"},{"fix":"Use the exact tag path including program scope (e.g., 'Program:MainProgram.MyTag') and confirm case sensitivity.","cause":"Tag name does not exist or incorrect path (e.g., missing program scope).","error":"pylogix.exceptions.TagError: Tag Not Found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.1.5","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/dmroeder/pylogix","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pylogix/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","serialization","communication"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}