Skip to main content

Read/Write Rockwell Automation Logix based PLC's

Project description


This project will allow you to easily read/write values from tags in Rockwell Automation Logix based PLC's over Ethernet I/P using Python. PLC models inclued CompactLogix, ControlLogix and Micro8xx. Python2 and Python3 are both supported.

Getting Started

There are currently no dependencies so you can get going quickly without having to install any other prerequiste packages.


You can clone the repo with the following:

git clone
cd pylogix
python install --user

Or you can install with pip (Latest version):

pip install git+

To install previous version before major changes (0.3.7):

pip install git+

Verifying Installation

To verify the installation on Linux, open the terminal and use the following commands:

import pylogix

Your First Script:

The cloned repository will come with many examples, I'll give one here. We'll read one simple tag and print out the value. All methods will return the Response class, which contains TagName, Value and Status.

from pylogix import PLC
with comm as PLC()
    comm.IPAddress = ''
    ret = comm.Read('MyTagName')
    print(ret.TagName, ret.Value, ret.Status)

NOTE: If your PLC is in a slot other than zero (like can be done with ControLogix), then you can specify the slot with the following:

comm.ProcessorSlot = 2

NOTE: If you are working with a Micro8xx PLC, you must set the Micro800 flag since the path is different:

comm.Micro800 = True

Other Features

Pylogix has features other than simply reading/writing. You can see all of them in the examples, I'll also list them here

  • Discover()
  • GetPLCTime()
  • SetPLCTime()
  • GetTagList()
  • GetModuleProperties(slot=0)


  • Burt Peterson - Initial work
  • Dustin Roeder - Maintainer - dmroeder
  • Fernando B. - Contributor - kodaman2
  • Ottowayi - Contributor - ottowayi


This project is licensed under Apache 2.0 License - see the LICENSE file for details.


  • Archie of AdvancedHMI for all kinds pointers and suggestions.
  • Thanks to ottowayi for general python and good practice advice
  • Thanks to all of the users that have tested and provided feedback.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pylogix, version 0.4.4
Filename, size File type Python version Upload date Hashes
Filename, size pylogix-0.4.4-py2.py3-none-any.whl (36.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pylogix-0.4.4.tar.gz (31.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page